mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
App Polish number 4 (#1142)
* Add dedicated placeholder screen instead of using the splash screen. * Reorder message actions.
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
1B2DADC008EE211AF1DA5292 /* NotificationManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30ED584467DB380E3CEFB1DB /* NotificationManagerTests.swift */; };
|
||||
1B4B3E847BF944DB2C1C217F /* BackgroundTaskServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAE73D571D4F9C36DD45255A /* BackgroundTaskServiceProtocol.swift */; };
|
||||
1B88BB631F7FC45A213BB554 /* TimelineItemSender.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55AEEF8142DF1B59DB40FB93 /* TimelineItemSender.swift */; };
|
||||
1BA04D05EBC6646958B1BE60 /* PlaceholderScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF34A2FD6797535C95AC918D /* PlaceholderScreenCoordinator.swift */; };
|
||||
1C409A26A99F0371C47AFA51 /* UserDiscoveryServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F615A00DB223FF3280204D2 /* UserDiscoveryServiceProtocol.swift */; };
|
||||
1C9BB74711E5F24C77B7FED0 /* RoomMembersListScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AEA0B743847CFA5B3C38EE4 /* RoomMembersListScreenCoordinator.swift */; };
|
||||
1D69E31913DF66426985909B /* EmojiPickerScreenViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11151E78D6BB2B04A8FBD389 /* EmojiPickerScreenViewModelProtocol.swift */; };
|
||||
@@ -1209,6 +1210,7 @@
|
||||
BE89A8BD65CCE3FCC925CA14 /* TimelineItemReplyDetails.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineItemReplyDetails.swift; sourceTree = "<group>"; };
|
||||
BEA38B9851CFCC4D67F5587D /* EmojiPickerScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiPickerScreenCoordinator.swift; sourceTree = "<group>"; };
|
||||
BEBA759D1347CFFB3D84ED1F /* UserSessionStoreProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSessionStoreProtocol.swift; sourceTree = "<group>"; };
|
||||
BF34A2FD6797535C95AC918D /* PlaceholderScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaceholderScreenCoordinator.swift; sourceTree = "<group>"; };
|
||||
BFDCAC6CAAD65A2C24EA9C4B /* Dictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dictionary.swift; sourceTree = "<group>"; };
|
||||
BFEA446F8618DBA79A9239CC /* MessageForwardingScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageForwardingScreen.swift; sourceTree = "<group>"; };
|
||||
C024C151639C4E1B91FCC68B /* ElementXAttributeScope.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElementXAttributeScope.swift; sourceTree = "<group>"; };
|
||||
@@ -2771,6 +2773,7 @@
|
||||
A448A3A8F764174C60CD0CA1 /* Other */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BF34A2FD6797535C95AC918D /* PlaceholderScreenCoordinator.swift */,
|
||||
854BCEAF2A832176FAACD2CB /* SplashScreenCoordinator.swift */,
|
||||
);
|
||||
path = Other;
|
||||
@@ -4155,6 +4158,7 @@
|
||||
80D00A7C62AAB44F54725C43 /* PermalinkBuilder.swift in Sources */,
|
||||
962A4F8AD6312804E2C6BB6E /* PhotoLibraryPicker.swift in Sources */,
|
||||
9D79B94493FB32249F7E472F /* PlaceholderAvatarImage.swift in Sources */,
|
||||
1BA04D05EBC6646958B1BE60 /* PlaceholderScreenCoordinator.swift in Sources */,
|
||||
DF504B10A4918F971A57BEF2 /* PostHogAnalyticsClient.swift in Sources */,
|
||||
2835FD52F3F618D07F799B3D /* Publisher.swift in Sources */,
|
||||
743790BF6A5B0577EA74AF14 /* ReadMarkerRoomTimelineItem.swift in Sources */,
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<svg width="110" height="110" viewBox="0 0 110 110" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M55 110C85.3757 110 110 85.3757 110 55C110 24.6243 85.3757 0 55 0C24.6243 0 0 24.6243 0 55C0 85.3757 24.6243 110 55 110Z" fill="#0DBD8B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M44.9439 25.627C44.9439 23.4069 46.7474 21.6072 48.9721 21.6072C64.0505 21.6072 76.2739 33.8053 76.2739 48.8523C76.2739 51.0724 74.4705 52.8721 72.2458 52.8721C70.0211 52.8721 68.2176 51.0724 68.2176 48.8523C68.2176 38.2454 59.6011 29.6468 48.9721 29.6468C46.7474 29.6468 44.9439 27.8471 44.9439 25.627Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M84.3646 44.8325C86.5893 44.8325 88.3928 46.6322 88.3928 48.8523C88.3928 63.8994 76.1693 76.0975 61.091 76.0975C58.8663 76.0975 57.0628 74.2977 57.0628 72.0777C57.0628 69.8576 58.8663 68.0579 61.091 68.0579C71.7199 68.0579 80.3364 59.4592 80.3364 48.8523C80.3364 46.6322 82.1399 44.8325 84.3646 44.8325Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M65.1188 84.3729C65.1188 86.593 63.3153 88.3927 61.0906 88.3927C46.0122 88.3927 33.7888 76.1946 33.7888 61.1476C33.7888 58.9275 35.5923 57.1278 37.817 57.1278C40.0416 57.1278 41.8451 58.9275 41.8451 61.1476C41.8451 71.7545 50.4616 80.3531 61.0906 80.3531C63.3153 80.3531 65.1188 82.1528 65.1188 84.3729Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.6348 65.1674C23.4101 65.1674 21.6066 63.3677 21.6066 61.1476C21.6066 46.1005 33.8301 33.9024 48.9085 33.9024C51.1332 33.9024 52.9366 35.7022 52.9366 37.9222C52.9366 40.1423 51.1332 41.942 48.9085 41.942C38.2795 41.942 29.663 50.5407 29.663 61.1476C29.663 63.3677 27.8595 65.1674 25.6348 65.1674Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -1,19 +1,8 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "launch_screen_logo.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "launch_screen_logo@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "launch_screen_logo@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
"filename" : "AppLogo.svg",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
@@ -21,6 +10,6 @@
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
"preserves-vector-representation" : true
|
||||
}
|
||||
}
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 6.0 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB |
@@ -322,7 +322,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
||||
fatalError("User session not setup")
|
||||
}
|
||||
|
||||
let navigationSplitCoordinator = NavigationSplitCoordinator(placeholderCoordinator: SplashScreenCoordinator())
|
||||
let navigationSplitCoordinator = NavigationSplitCoordinator(placeholderCoordinator: PlaceholderScreenCoordinator())
|
||||
let userSessionFlowCoordinator = UserSessionFlowCoordinator(userSession: userSession,
|
||||
navigationSplitCoordinator: navigationSplitCoordinator,
|
||||
bugReportService: ServiceLocator.shared.bugReportService,
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
//
|
||||
// Copyright 2023 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
class PlaceholderScreenCoordinator: CoordinatorProtocol {
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(PlaceholderScreen())
|
||||
}
|
||||
}
|
||||
|
||||
/// The app's splash screen. This screen is shown after the LaunchScreen
|
||||
/// until the app is ready to show the relevant coordinator. The design of
|
||||
/// these 2 screens are matched.
|
||||
struct PlaceholderScreen: View {
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
|
||||
private let outerShape = RoundedRectangle(cornerRadius: 44)
|
||||
private var isLight: Bool { colorScheme == .light }
|
||||
|
||||
var body: some View {
|
||||
image
|
||||
.accessibilityHidden(true)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.background()
|
||||
.environment(\.backgroundStyle, AnyShapeStyle(Color.compound.bgCanvasDefault))
|
||||
.toolbar(.hidden, for: .automatic)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
var image: some View {
|
||||
if isLight {
|
||||
logo
|
||||
} else {
|
||||
darkLogo
|
||||
}
|
||||
}
|
||||
|
||||
var logo: some View {
|
||||
Image(asset: Asset.Images.appLogo)
|
||||
.padding(24)
|
||||
.background(.white.opacity(0.4))
|
||||
.clipShape(outerShape)
|
||||
.background {
|
||||
outerShape.fill(Color.white)
|
||||
.shadow(color: Color(red: 0.11, green: 0.11, blue: 0.13).opacity(0.08), radius: 16, y: 8)
|
||||
|
||||
outerShape.fill(Color.white)
|
||||
.shadow(color: Color(red: 0.11, green: 0.11, blue: 0.13).opacity(0.5), radius: 16, y: 8)
|
||||
.blendMode(.overlay)
|
||||
}
|
||||
.overlay {
|
||||
outerShape
|
||||
.inset(by: 0.25)
|
||||
.stroke(.white, lineWidth: 0.5)
|
||||
}
|
||||
}
|
||||
|
||||
var darkLogo: some View {
|
||||
Image(asset: Asset.Images.appLogo)
|
||||
.shadow(color: .black.opacity(0.2), radius: 0.5, y: 2)
|
||||
.shadow(color: Color(red: 0.05, green: 0.74, blue: 0.55).opacity(0.2), radius: 16)
|
||||
.padding(24)
|
||||
.background {
|
||||
LinearGradient(stops: [.init(color: .white.opacity(0.05), location: 0.00),
|
||||
.init(color: .white.opacity(0), location: 1.00)],
|
||||
startPoint: UnitPoint(x: 0, y: 0),
|
||||
endPoint: UnitPoint(x: 1, y: 1))
|
||||
.blendMode(.multiply)
|
||||
}
|
||||
.clipShape(outerShape)
|
||||
.shadow(color: .black.opacity(0.9), radius: 80, x: 0, y: 1)
|
||||
.overlay {
|
||||
outerShape
|
||||
.inset(by: 0.25)
|
||||
.stroke(.white.opacity(0.9), lineWidth: 0.5)
|
||||
.blendMode(.overlay)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct PlaceholderScreen_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
PlaceholderScreen()
|
||||
.previewDisplayName("Screen")
|
||||
|
||||
NavigationSplitView {
|
||||
List {
|
||||
ForEach("Nothing to see here".split(separator: " "), id: \.self) { word in
|
||||
Text(word)
|
||||
}
|
||||
}
|
||||
} detail: {
|
||||
PlaceholderScreen()
|
||||
}
|
||||
.previewDisplayName("Split View")
|
||||
.previewInterfaceOrientation(.landscapeLeft)
|
||||
}
|
||||
}
|
||||
@@ -356,15 +356,19 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
]
|
||||
|
||||
if timelineItem is EventBasedMessageTimelineItemProtocol {
|
||||
actions.append(contentsOf: [.forward(itemID: itemId), .copy])
|
||||
actions.append(.forward(itemID: itemId))
|
||||
}
|
||||
|
||||
actions.append(.copyPermalink)
|
||||
|
||||
if item.isEditable {
|
||||
actions.append(.edit)
|
||||
}
|
||||
|
||||
if timelineItem is EventBasedMessageTimelineItemProtocol {
|
||||
actions.append(.copy)
|
||||
}
|
||||
|
||||
actions.append(.copyPermalink)
|
||||
|
||||
if item.isOutgoing {
|
||||
actions.append(.redact)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user