mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
parent
e9a272c120
commit
dab23c23e7
@ -21,19 +21,9 @@
|
|||||||
"session_verification_screen_emojis_title" = "Lets check if these";
|
"session_verification_screen_emojis_title" = "Lets check if these";
|
||||||
"session_verification_screen_emojis_message" = "Open Element on one of your other sessions to compare.";
|
"session_verification_screen_emojis_message" = "Open Element on one of your other sessions to compare.";
|
||||||
|
|
||||||
// MARK: - Authentication
|
|
||||||
|
|
||||||
"authentication_login_title" = "Welcome back!";
|
|
||||||
"authentication_login_forgot_password" = "Forgot password";
|
|
||||||
|
|
||||||
"authentication_server_info_title" = "Choose your server to store your data";
|
|
||||||
"authentication_server_info_matrix_description" = "Join millions for free on the largest public server";
|
|
||||||
|
|
||||||
"server_selection_title" = "Choose your server";
|
|
||||||
"server_selection_message" = "What is the address of your server? A server is like a home for all your data.";
|
|
||||||
"server_selection_server_url" = "Server URL";
|
|
||||||
"server_selection_server_footer" = "You can only connect to a server that has already been set up";
|
"server_selection_server_footer" = "You can only connect to a server that has already been set up";
|
||||||
"server_selection_generic_error" = "Cannot find a server at this URL, please check it is correct.";
|
|
||||||
|
|
||||||
"login_mobile_device" = "Mobile";
|
"login_mobile_device" = "Mobile";
|
||||||
"login_tablet_device" = "Tablet";
|
"login_tablet_device" = "Tablet";
|
||||||
|
|
||||||
|
"a11y_all_chats_user_avatar_menu" = "Main menu";
|
||||||
|
@ -10,18 +10,12 @@ import Foundation
|
|||||||
// swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length
|
// swiftlint:disable explicit_type_interface function_parameter_count identifier_name line_length
|
||||||
// swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces
|
// swiftlint:disable nesting type_body_length type_name vertical_whitespace_opening_braces
|
||||||
extension ElementL10n {
|
extension ElementL10n {
|
||||||
|
/// Main menu
|
||||||
|
public static let a11yAllChatsUserAvatarMenu = ElementL10n.tr("Untranslated", "a11y_all_chats_user_avatar_menu")
|
||||||
/// Confirm
|
/// Confirm
|
||||||
public static let actionConfirm = ElementL10n.tr("Untranslated", "action_confirm")
|
public static let actionConfirm = ElementL10n.tr("Untranslated", "action_confirm")
|
||||||
/// Match
|
/// Match
|
||||||
public static let actionMatch = ElementL10n.tr("Untranslated", "action_match")
|
public static let actionMatch = ElementL10n.tr("Untranslated", "action_match")
|
||||||
/// Forgot password
|
|
||||||
public static let authenticationLoginForgotPassword = ElementL10n.tr("Untranslated", "authentication_login_forgot_password")
|
|
||||||
/// Welcome back!
|
|
||||||
public static let authenticationLoginTitle = ElementL10n.tr("Untranslated", "authentication_login_title")
|
|
||||||
/// Join millions for free on the largest public server
|
|
||||||
public static let authenticationServerInfoMatrixDescription = ElementL10n.tr("Untranslated", "authentication_server_info_matrix_description")
|
|
||||||
/// Choose your server to store your data
|
|
||||||
public static let authenticationServerInfoTitle = ElementL10n.tr("Untranslated", "authentication_server_info_title")
|
|
||||||
/// Mobile
|
/// Mobile
|
||||||
public static let loginMobileDevice = ElementL10n.tr("Untranslated", "login_mobile_device")
|
public static let loginMobileDevice = ElementL10n.tr("Untranslated", "login_mobile_device")
|
||||||
/// Tablet
|
/// Tablet
|
||||||
@ -40,16 +34,8 @@ extension ElementL10n {
|
|||||||
public static let screenshotDetectedMessage = ElementL10n.tr("Untranslated", "screenshot_detected_message")
|
public static let screenshotDetectedMessage = ElementL10n.tr("Untranslated", "screenshot_detected_message")
|
||||||
/// You took a screenshot
|
/// You took a screenshot
|
||||||
public static let screenshotDetectedTitle = ElementL10n.tr("Untranslated", "screenshot_detected_title")
|
public static let screenshotDetectedTitle = ElementL10n.tr("Untranslated", "screenshot_detected_title")
|
||||||
/// Cannot find a server at this URL, please check it is correct.
|
|
||||||
public static let serverSelectionGenericError = ElementL10n.tr("Untranslated", "server_selection_generic_error")
|
|
||||||
/// What is the address of your server? A server is like a home for all your data.
|
|
||||||
public static let serverSelectionMessage = ElementL10n.tr("Untranslated", "server_selection_message")
|
|
||||||
/// You can only connect to a server that has already been set up
|
/// You can only connect to a server that has already been set up
|
||||||
public static let serverSelectionServerFooter = ElementL10n.tr("Untranslated", "server_selection_server_footer")
|
public static let serverSelectionServerFooter = ElementL10n.tr("Untranslated", "server_selection_server_footer")
|
||||||
/// Server URL
|
|
||||||
public static let serverSelectionServerUrl = ElementL10n.tr("Untranslated", "server_selection_server_url")
|
|
||||||
/// Choose your server
|
|
||||||
public static let serverSelectionTitle = ElementL10n.tr("Untranslated", "server_selection_title")
|
|
||||||
/// Looks like you’re using a new device. Verify its you.
|
/// Looks like you’re using a new device. Verify its you.
|
||||||
public static let sessionVerificationBannerMessage = ElementL10n.tr("Untranslated", "session_verification_banner_message")
|
public static let sessionVerificationBannerMessage = ElementL10n.tr("Untranslated", "session_verification_banner_message")
|
||||||
/// Help keep your messages secure
|
/// Help keep your messages secure
|
||||||
|
@ -64,7 +64,7 @@ struct LoginScreen: View {
|
|||||||
|
|
||||||
/// The header containing a Welcome Back title.
|
/// The header containing a Welcome Back title.
|
||||||
var header: some View {
|
var header: some View {
|
||||||
Text(ElementL10n.authenticationLoginTitle)
|
Text(ElementL10n.ftueAuthWelcomeBackTitle)
|
||||||
.font(.element.title2Bold)
|
.font(.element.title2Bold)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
.foregroundColor(.element.primaryContent)
|
.foregroundColor(.element.primaryContent)
|
||||||
@ -102,7 +102,7 @@ struct LoginScreen: View {
|
|||||||
.accessibilityIdentifier("passwordTextField")
|
.accessibilityIdentifier("passwordTextField")
|
||||||
|
|
||||||
Button { context.send(viewAction: .forgotPassword) } label: {
|
Button { context.send(viewAction: .forgotPassword) } label: {
|
||||||
Text(ElementL10n.authenticationLoginForgotPassword)
|
Text(ElementL10n.ftueAuthForgotPassword)
|
||||||
.font(.element.body)
|
.font(.element.body)
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||||
|
@ -30,7 +30,7 @@ struct LoginServerInfoSection: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading, spacing: 4) {
|
VStack(alignment: .leading, spacing: 4) {
|
||||||
Text(ElementL10n.authenticationServerInfoTitle)
|
Text(ElementL10n.ftueAuthSignInChooseServerHeader)
|
||||||
.font(.element.subheadline)
|
.font(.element.subheadline)
|
||||||
.foregroundColor(.element.secondaryContent)
|
.foregroundColor(.element.secondaryContent)
|
||||||
|
|
||||||
|
@ -52,12 +52,12 @@ struct ServerSelectionScreen: View {
|
|||||||
AuthenticationIconImage(image: Asset.Images.serverSelectionIcon)
|
AuthenticationIconImage(image: Asset.Images.serverSelectionIcon)
|
||||||
.padding(.bottom, 8)
|
.padding(.bottom, 8)
|
||||||
|
|
||||||
Text(ElementL10n.serverSelectionTitle)
|
Text(ElementL10n.ftueAuthChooseServerTitle)
|
||||||
.font(.element.title2Bold)
|
.font(.element.title2Bold)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
.foregroundColor(.element.primaryContent)
|
.foregroundColor(.element.primaryContent)
|
||||||
|
|
||||||
Text(ElementL10n.serverSelectionMessage)
|
Text(ElementL10n.ftueAuthChooseServerSubtitle)
|
||||||
.font(.element.body)
|
.font(.element.body)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
.foregroundColor(.element.secondaryContent)
|
.foregroundColor(.element.secondaryContent)
|
||||||
@ -67,7 +67,7 @@ struct ServerSelectionScreen: View {
|
|||||||
/// The text field and confirm button where the user enters a server URL.
|
/// The text field and confirm button where the user enters a server URL.
|
||||||
var serverForm: some View {
|
var serverForm: some View {
|
||||||
VStack(alignment: .leading, spacing: 12) {
|
VStack(alignment: .leading, spacing: 12) {
|
||||||
TextField(ElementL10n.serverSelectionServerUrl, text: $context.homeserverAddress)
|
TextField(ElementL10n.ftueAuthChooseServerEntryHint, text: $context.homeserverAddress)
|
||||||
.focused($isTextFieldFocused)
|
.focused($isTextFieldFocused)
|
||||||
.textFieldStyle(.elementInput(footerText: context.viewState.footerMessage,
|
.textFieldStyle(.elementInput(footerText: context.viewState.footerMessage,
|
||||||
isError: context.viewState.isShowingFooterError))
|
isError: context.viewState.isShowingFooterError))
|
||||||
|
@ -96,7 +96,7 @@ struct SoftLogoutScreen: View {
|
|||||||
.accessibilityIdentifier("passwordTextField")
|
.accessibilityIdentifier("passwordTextField")
|
||||||
|
|
||||||
Button { context.send(viewAction: .forgotPassword) } label: {
|
Button { context.send(viewAction: .forgotPassword) } label: {
|
||||||
Text(ElementL10n.authenticationLoginForgotPassword)
|
Text(ElementL10n.ftueAuthForgotPassword)
|
||||||
.font(.element.body)
|
.font(.element.body)
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||||
|
@ -49,7 +49,6 @@ struct BugReportScreen: View {
|
|||||||
}
|
}
|
||||||
.navigationTitle(ElementL10n.titleActivityBugReport)
|
.navigationTitle(ElementL10n.titleActivityBugReport)
|
||||||
}
|
}
|
||||||
.background(Color.element.background, ignoresSafeAreaEdges: .all)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The main content of the view to be shown in a scroll view.
|
/// The main content of the view to be shown in a scroll view.
|
||||||
|
@ -91,6 +91,7 @@ struct HomeScreen: View {
|
|||||||
} message: {
|
} message: {
|
||||||
Text(ElementL10n.actionSignOutConfirmationSimple)
|
Text(ElementL10n.actionSignOutConfirmationSimple)
|
||||||
}
|
}
|
||||||
|
.accessibilityLabel(ElementL10n.a11yAllChatsUserAvatarMenu)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
|
@ -33,10 +33,12 @@ struct HomeScreenRoomCell: View {
|
|||||||
.scaledToFill()
|
.scaledToFill()
|
||||||
.frame(width: avatarSize, height: avatarSize)
|
.frame(width: avatarSize, height: avatarSize)
|
||||||
.clipShape(Circle())
|
.clipShape(Circle())
|
||||||
|
.accessibilityHidden(true)
|
||||||
} else {
|
} else {
|
||||||
PlaceholderAvatarImage(text: room.name, contentId: room.id)
|
PlaceholderAvatarImage(text: room.name, contentId: room.id)
|
||||||
.clipShape(Circle())
|
.clipShape(Circle())
|
||||||
.frame(width: avatarSize, height: avatarSize)
|
.frame(width: avatarSize, height: avatarSize)
|
||||||
|
.accessibilityHidden(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
HStack(alignment: .top) {
|
HStack(alignment: .top) {
|
||||||
@ -76,6 +78,7 @@ struct HomeScreenRoomCell: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(minHeight: 64.0)
|
.frame(minHeight: 64.0)
|
||||||
|
.accessibilityElement(children: .combine)
|
||||||
.task {
|
.task {
|
||||||
context.send(viewAction: .loadRoomData(roomIdentifier: room.id))
|
context.send(viewAction: .loadRoomData(roomIdentifier: room.id))
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@ struct RoomHeaderView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 8) {
|
||||||
roomAvatar
|
roomAvatar
|
||||||
|
.accessibilityHidden(true)
|
||||||
Text(context.viewState.roomTitle)
|
Text(context.viewState.roomTitle)
|
||||||
.font(.element.headline)
|
.font(.element.headline)
|
||||||
.accessibilityIdentifier("roomNameLabel")
|
.accessibilityIdentifier("roomNameLabel")
|
||||||
|
@ -60,12 +60,14 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
|||||||
.frame(height: 8)
|
.frame(height: 8)
|
||||||
HStack(alignment: .top, spacing: 4) {
|
HStack(alignment: .top, spacing: 4) {
|
||||||
TimelineSenderAvatarView(timelineItem: timelineItem)
|
TimelineSenderAvatarView(timelineItem: timelineItem)
|
||||||
|
.accessibilityHidden(true)
|
||||||
Text(timelineItem.senderDisplayName ?? timelineItem.senderId)
|
Text(timelineItem.senderDisplayName ?? timelineItem.senderId)
|
||||||
.font(.element.footnoteBold)
|
.font(.element.footnoteBold)
|
||||||
.foregroundColor(.element.primaryContent)
|
.foregroundColor(.element.primaryContent)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.padding(.vertical, senderNameVerticalPadding)
|
.padding(.vertical, senderNameVerticalPadding)
|
||||||
}
|
}
|
||||||
|
.accessibilityElement(children: .combine)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -75,6 +77,7 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
|||||||
// the centre aligned stroke width so we use -5 here
|
// the centre aligned stroke width so we use -5 here
|
||||||
VStack(alignment: alignment, spacing: -5) {
|
VStack(alignment: alignment, spacing: -5) {
|
||||||
styledContent
|
styledContent
|
||||||
|
.accessibilityElement(children: .combine)
|
||||||
|
|
||||||
if !timelineItem.properties.reactions.isEmpty {
|
if !timelineItem.properties.reactions.isEmpty {
|
||||||
TimelineReactionsView(reactions: timelineItem.properties.reactions,
|
TimelineReactionsView(reactions: timelineItem.properties.reactions,
|
||||||
@ -98,14 +101,13 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
|||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
var styledContentOutgoing: some View {
|
var styledContentOutgoing: some View {
|
||||||
if timelineItem.inGroupState == .single || timelineItem.inGroupState == .beginning {
|
let topPadding: CGFloat? = timelineItem.inGroupState == .single || timelineItem.inGroupState == .beginning ? 8 : 0
|
||||||
Spacer()
|
|
||||||
.frame(height: 8)
|
|
||||||
}
|
|
||||||
if shouldAvoidBubbling {
|
if shouldAvoidBubbling {
|
||||||
content()
|
content()
|
||||||
.frame(width: bubbleWidth)
|
.frame(width: bubbleWidth)
|
||||||
.cornerRadius(12, inGroupState: timelineItem.inGroupState)
|
.cornerRadius(12, inGroupState: timelineItem.inGroupState)
|
||||||
|
.padding(.top, topPadding)
|
||||||
} else {
|
} else {
|
||||||
VStack(alignment: .trailing, spacing: 4) {
|
VStack(alignment: .trailing, spacing: 4) {
|
||||||
content()
|
content()
|
||||||
@ -120,6 +122,7 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
|||||||
.padding(EdgeInsets(top: 6, leading: 12, bottom: 6, trailing: 12))
|
.padding(EdgeInsets(top: 6, leading: 12, bottom: 6, trailing: 12))
|
||||||
.background(Color.element.systemGray5)
|
.background(Color.element.systemGray5)
|
||||||
.cornerRadius(12, inGroupState: timelineItem.inGroupState)
|
.cornerRadius(12, inGroupState: timelineItem.inGroupState)
|
||||||
|
.padding(.top, topPadding)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +174,7 @@ struct TimelineItemBubbledStylerView_Previews: PreviewProvider {
|
|||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
static var body: some View {
|
static var body: some View {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading, spacing: 2) {
|
||||||
ForEach(1..<MockRoomTimelineController().timelineItems.count, id: \.self) { index in
|
ForEach(1..<MockRoomTimelineController().timelineItems.count, id: \.self) { index in
|
||||||
let item = MockRoomTimelineController().timelineItems[index]
|
let item = MockRoomTimelineController().timelineItems[index]
|
||||||
RoomTimelineViewFactory().buildTimelineViewFor(timelineItem: item)
|
RoomTimelineViewFactory().buildTimelineViewFor(timelineItem: item)
|
||||||
|
@ -46,7 +46,7 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
|
|||||||
TextRoomTimelineItem(id: UUID().uuidString,
|
TextRoomTimelineItem(id: UUID().uuidString,
|
||||||
text: "I can be around on Wednesday. How about some 🌮 instead? Like https://www.tortilla.co.uk/",
|
text: "I can be around on Wednesday. How about some 🌮 instead? Like https://www.tortilla.co.uk/",
|
||||||
timestamp: "10:11 AM",
|
timestamp: "10:11 AM",
|
||||||
inGroupState: .middle,
|
inGroupState: .end,
|
||||||
isOutgoing: false,
|
isOutgoing: false,
|
||||||
senderId: "",
|
senderId: "",
|
||||||
senderDisplayName: "Helena",
|
senderDisplayName: "Helena",
|
||||||
@ -59,7 +59,7 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
|
|||||||
TextRoomTimelineItem(id: UUID().uuidString,
|
TextRoomTimelineItem(id: UUID().uuidString,
|
||||||
text: "Wow, cool. Ok, lets go the usual place tomorrow?! Is that too soon? Here’s the menu, let me know what you want it’s on me!",
|
text: "Wow, cool. Ok, lets go the usual place tomorrow?! Is that too soon? Here’s the menu, let me know what you want it’s on me!",
|
||||||
timestamp: "5 PM",
|
timestamp: "5 PM",
|
||||||
inGroupState: .end,
|
inGroupState: .single,
|
||||||
isOutgoing: false,
|
isOutgoing: false,
|
||||||
senderId: "",
|
senderId: "",
|
||||||
senderDisplayName: "Helena",
|
senderDisplayName: "Helena",
|
||||||
@ -67,7 +67,7 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
|
|||||||
TextRoomTimelineItem(id: UUID().uuidString,
|
TextRoomTimelineItem(id: UUID().uuidString,
|
||||||
text: "And John's speech was amazing!",
|
text: "And John's speech was amazing!",
|
||||||
timestamp: "5 PM",
|
timestamp: "5 PM",
|
||||||
inGroupState: .single,
|
inGroupState: .beginning,
|
||||||
isOutgoing: true,
|
isOutgoing: true,
|
||||||
senderId: "",
|
senderId: "",
|
||||||
senderDisplayName: "Bob",
|
senderDisplayName: "Bob",
|
||||||
@ -75,7 +75,7 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
|
|||||||
TextRoomTimelineItem(id: UUID().uuidString,
|
TextRoomTimelineItem(id: UUID().uuidString,
|
||||||
text: "New home office set up!",
|
text: "New home office set up!",
|
||||||
timestamp: "5 PM",
|
timestamp: "5 PM",
|
||||||
inGroupState: .single,
|
inGroupState: .end,
|
||||||
isOutgoing: true,
|
isOutgoing: true,
|
||||||
senderId: "",
|
senderId: "",
|
||||||
senderDisplayName: "Bob",
|
senderDisplayName: "Bob",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user