mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 11:58:32 +00:00
@@ -64,7 +64,7 @@ struct LoginScreen: View {
|
||||
|
||||
/// The header containing a Welcome Back title.
|
||||
var header: some View {
|
||||
Text(ElementL10n.authenticationLoginTitle)
|
||||
Text(ElementL10n.ftueAuthWelcomeBackTitle)
|
||||
.font(.element.title2Bold)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
@@ -102,7 +102,7 @@ struct LoginScreen: View {
|
||||
.accessibilityIdentifier("passwordTextField")
|
||||
|
||||
Button { context.send(viewAction: .forgotPassword) } label: {
|
||||
Text(ElementL10n.authenticationLoginForgotPassword)
|
||||
Text(ElementL10n.ftueAuthForgotPassword)
|
||||
.font(.element.body)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ struct LoginServerInfoSection: View {
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text(ElementL10n.authenticationServerInfoTitle)
|
||||
Text(ElementL10n.ftueAuthSignInChooseServerHeader)
|
||||
.font(.element.subheadline)
|
||||
.foregroundColor(.element.secondaryContent)
|
||||
|
||||
|
||||
+3
-3
@@ -52,12 +52,12 @@ struct ServerSelectionScreen: View {
|
||||
AuthenticationIconImage(image: Asset.Images.serverSelectionIcon)
|
||||
.padding(.bottom, 8)
|
||||
|
||||
Text(ElementL10n.serverSelectionTitle)
|
||||
Text(ElementL10n.ftueAuthChooseServerTitle)
|
||||
.font(.element.title2Bold)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
|
||||
Text(ElementL10n.serverSelectionMessage)
|
||||
Text(ElementL10n.ftueAuthChooseServerSubtitle)
|
||||
.font(.element.body)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.element.secondaryContent)
|
||||
@@ -67,7 +67,7 @@ struct ServerSelectionScreen: View {
|
||||
/// The text field and confirm button where the user enters a server URL.
|
||||
var serverForm: some View {
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
TextField(ElementL10n.serverSelectionServerUrl, text: $context.homeserverAddress)
|
||||
TextField(ElementL10n.ftueAuthChooseServerEntryHint, text: $context.homeserverAddress)
|
||||
.focused($isTextFieldFocused)
|
||||
.textFieldStyle(.elementInput(footerText: context.viewState.footerMessage,
|
||||
isError: context.viewState.isShowingFooterError))
|
||||
|
||||
@@ -96,7 +96,7 @@ struct SoftLogoutScreen: View {
|
||||
.accessibilityIdentifier("passwordTextField")
|
||||
|
||||
Button { context.send(viewAction: .forgotPassword) } label: {
|
||||
Text(ElementL10n.authenticationLoginForgotPassword)
|
||||
Text(ElementL10n.ftueAuthForgotPassword)
|
||||
.font(.element.body)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||
|
||||
@@ -49,7 +49,6 @@ struct BugReportScreen: View {
|
||||
}
|
||||
.navigationTitle(ElementL10n.titleActivityBugReport)
|
||||
}
|
||||
.background(Color.element.background, ignoresSafeAreaEdges: .all)
|
||||
}
|
||||
|
||||
/// The main content of the view to be shown in a scroll view.
|
||||
|
||||
@@ -91,6 +91,7 @@ struct HomeScreen: View {
|
||||
} message: {
|
||||
Text(ElementL10n.actionSignOutConfirmationSimple)
|
||||
}
|
||||
.accessibilityLabel(ElementL10n.a11yAllChatsUserAvatarMenu)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
|
||||
@@ -33,10 +33,12 @@ struct HomeScreenRoomCell: View {
|
||||
.scaledToFill()
|
||||
.frame(width: avatarSize, height: avatarSize)
|
||||
.clipShape(Circle())
|
||||
.accessibilityHidden(true)
|
||||
} else {
|
||||
PlaceholderAvatarImage(text: room.name, contentId: room.id)
|
||||
.clipShape(Circle())
|
||||
.frame(width: avatarSize, height: avatarSize)
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
|
||||
HStack(alignment: .top) {
|
||||
@@ -76,6 +78,7 @@ struct HomeScreenRoomCell: View {
|
||||
}
|
||||
}
|
||||
.frame(minHeight: 64.0)
|
||||
.accessibilityElement(children: .combine)
|
||||
.task {
|
||||
context.send(viewAction: .loadRoomData(roomIdentifier: room.id))
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ struct RoomHeaderView: View {
|
||||
var body: some View {
|
||||
HStack(spacing: 8) {
|
||||
roomAvatar
|
||||
.accessibilityHidden(true)
|
||||
Text(context.viewState.roomTitle)
|
||||
.font(.element.headline)
|
||||
.accessibilityIdentifier("roomNameLabel")
|
||||
|
||||
@@ -60,12 +60,14 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
||||
.frame(height: 8)
|
||||
HStack(alignment: .top, spacing: 4) {
|
||||
TimelineSenderAvatarView(timelineItem: timelineItem)
|
||||
.accessibilityHidden(true)
|
||||
Text(timelineItem.senderDisplayName ?? timelineItem.senderId)
|
||||
.font(.element.footnoteBold)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
.lineLimit(1)
|
||||
.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
|
||||
VStack(alignment: alignment, spacing: -5) {
|
||||
styledContent
|
||||
.accessibilityElement(children: .combine)
|
||||
|
||||
if !timelineItem.properties.reactions.isEmpty {
|
||||
TimelineReactionsView(reactions: timelineItem.properties.reactions,
|
||||
@@ -98,14 +101,13 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
||||
|
||||
@ViewBuilder
|
||||
var styledContentOutgoing: some View {
|
||||
if timelineItem.inGroupState == .single || timelineItem.inGroupState == .beginning {
|
||||
Spacer()
|
||||
.frame(height: 8)
|
||||
}
|
||||
let topPadding: CGFloat? = timelineItem.inGroupState == .single || timelineItem.inGroupState == .beginning ? 8 : 0
|
||||
|
||||
if shouldAvoidBubbling {
|
||||
content()
|
||||
.frame(width: bubbleWidth)
|
||||
.cornerRadius(12, inGroupState: timelineItem.inGroupState)
|
||||
.padding(.top, topPadding)
|
||||
} else {
|
||||
VStack(alignment: .trailing, spacing: 4) {
|
||||
content()
|
||||
@@ -120,6 +122,7 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
||||
.padding(EdgeInsets(top: 6, leading: 12, bottom: 6, trailing: 12))
|
||||
.background(Color.element.systemGray5)
|
||||
.cornerRadius(12, inGroupState: timelineItem.inGroupState)
|
||||
.padding(.top, topPadding)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +174,7 @@ struct TimelineItemBubbledStylerView_Previews: PreviewProvider {
|
||||
|
||||
@ViewBuilder
|
||||
static var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
ForEach(1..<MockRoomTimelineController().timelineItems.count, id: \.self) { index in
|
||||
let item = MockRoomTimelineController().timelineItems[index]
|
||||
RoomTimelineViewFactory().buildTimelineViewFor(timelineItem: item)
|
||||
|
||||
Reference in New Issue
Block a user