From 181f72fa1f735904232bf26b21a7d222f6acdfab Mon Sep 17 00:00:00 2001 From: Evgeny Date: Tue, 19 Nov 2024 15:26:41 +0000 Subject: [PATCH] ios: texts about operators (#5213) * ios: texts about operators * remove comment * button for conditions --- .../Onboarding/ChooseServerOperators.swift | 24 ++++++++++++------- .../Views/Onboarding/CreateProfile.swift | 6 +++-- .../Shared/Views/Onboarding/SimpleXInfo.swift | 1 - .../NetworkAndServers/OperatorView.swift | 13 ++++------ apps/ios/SimpleXChat/APITypes.swift | 5 +++- 5 files changed, 29 insertions(+), 20 deletions(-) diff --git a/apps/ios/Shared/Views/Onboarding/ChooseServerOperators.swift b/apps/ios/Shared/Views/Onboarding/ChooseServerOperators.swift index 248c1b34c4..4b886ad9be 100644 --- a/apps/ios/Shared/Views/Onboarding/ChooseServerOperators.swift +++ b/apps/ios/Shared/Views/Onboarding/ChooseServerOperators.swift @@ -70,6 +70,11 @@ struct ChooseServerOperators: View { ForEach(serverOperators) { srvOperator in operatorCheckView(srvOperator) } + Text("You can configure servers via settings.") + .font(.footnote) + .multilineTextAlignment(.center) + .frame(maxWidth: .infinity, alignment: .center) +// .padding(.horizontal, 32) Spacer() @@ -83,10 +88,12 @@ struct ChooseServerOperators: View { continueButton() } if onboarding { - Text("You can disable operators and configure your servers in Network & servers settings.") - .multilineTextAlignment(.center) - .font(.footnote) - .padding(.horizontal, 32) + Button("Conditions of use") { + // TODO open accepted conditions + } + .font(.callout) + .foregroundColor(reviewForOperators.isEmpty ? .accentColor : .clear) + .padding(.top) } } .padding(.bottom) @@ -136,7 +143,7 @@ struct ChooseServerOperators: View { showInfoSheet = true } - Text("Select operators, whose servers you will be using.") + Text("Select network operators to use.") } } @@ -320,14 +327,15 @@ struct ChooseServerOperators: View { struct ChooseServerOperatorsInfoView: View { var body: some View { VStack(alignment: .leading) { - Text("Why choose multiple operators") + Text("Network operators") .font(.largeTitle) + .bold() .padding(.vertical) ScrollView { VStack(alignment: .leading) { Group { - Text("Selecting multiple operators improves protection of your communication graph.") - Text("TODO Better explanation") + Text("When more than one network operator is enabled, the app will use the servers of different operators for each conversation.") + Text("For example, if you receive messages via SimpleX Chat server, the app will use one of Flux servers for private routing.") } .padding(.bottom) } diff --git a/apps/ios/Shared/Views/Onboarding/CreateProfile.swift b/apps/ios/Shared/Views/Onboarding/CreateProfile.swift index 9d1f9f4709..b9f569e96d 100644 --- a/apps/ios/Shared/Views/Onboarding/CreateProfile.swift +++ b/apps/ios/Shared/Views/Onboarding/CreateProfile.swift @@ -90,8 +90,10 @@ struct CreateFirstProfile: View { var body: some View { VStack(alignment: .leading, spacing: 20) { Text("Your profile, contacts and delivered messages are stored on your device.") + .font(.callout) .foregroundColor(theme.colors.secondary) Text("The profile is only shared with your contacts.") + .font(.callout) .foregroundColor(theme.colors.secondary) HStack { @@ -114,8 +116,8 @@ struct CreateFirstProfile: View { .padding(.horizontal) .padding(.vertical, 10) .background( - RoundedRectangle(cornerRadius: 16, style: .continuous) - .fill(Color(uiColor: .secondarySystemGroupedBackground)) + RoundedRectangle(cornerRadius: 10, style: .continuous) + .fill(Color(uiColor: .tertiarySystemFill)) ) } .padding(.top) diff --git a/apps/ios/Shared/Views/Onboarding/SimpleXInfo.swift b/apps/ios/Shared/Views/Onboarding/SimpleXInfo.swift index 2e077e9d95..ea3627871e 100644 --- a/apps/ios/Shared/Views/Onboarding/SimpleXInfo.swift +++ b/apps/ios/Shared/Views/Onboarding/SimpleXInfo.swift @@ -144,7 +144,6 @@ struct SimpleXInfo: View { CreateFirstProfile() .navigationTitle("Create your profile") .navigationBarTitleDisplayMode(.large) - .modifier(ThemedBackground(grouped: true)) } private func userExistsFallbackButton() -> some View { diff --git a/apps/ios/Shared/Views/UserSettings/NetworkAndServers/OperatorView.swift b/apps/ios/Shared/Views/UserSettings/NetworkAndServers/OperatorView.swift index ef02e94e3f..63586e2121 100644 --- a/apps/ios/Shared/Views/UserSettings/NetworkAndServers/OperatorView.swift +++ b/apps/ios/Shared/Views/UserSettings/NetworkAndServers/OperatorView.swift @@ -257,14 +257,11 @@ struct OperatorView: View { .modifier(ThemedBackground(grouped: true)) .navigationBarTitleDisplayMode(.large) } label: { - HStack { - Image(userServers[operatorIndex].operator_.logo(colorScheme)) - .resizable() - .scaledToFit() - .grayscale(userServers[operatorIndex].operator_.enabled ? 0.0 : 1.0) - .frame(width: 24, height: 24) - Text(userServers[operatorIndex].operator_.tradeName) - } + Image(userServers[operatorIndex].operator_.largeLogo(colorScheme)) + .resizable() + .scaledToFit() + .grayscale(userServers[operatorIndex].operator_.enabled ? 0.0 : 1.0) + .frame(height: 40) } } diff --git a/apps/ios/SimpleXChat/APITypes.swift b/apps/ios/SimpleXChat/APITypes.swift index 5470059e92..016a8213c3 100644 --- a/apps/ios/SimpleXChat/APITypes.swift +++ b/apps/ios/SimpleXChat/APITypes.swift @@ -1221,7 +1221,10 @@ public struct ServerOperatorInfo: Decodable { public let operatorsInfo: Dictionary = [ .simplex: ServerOperatorInfo( - description: ["SimpleX Chat preset servers"], + description: [ + "SimpleX Chat is the first communication network that has no user profile IDs of any kind, not even random numbers or keys that identify the users.", + "SimpleX Chat Ltd develops the communication software for SimpleX network." + ], website: "https://simplex.chat", logo: "decentralized", largeLogo: "logo",