mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-04 15:20:19 +00:00
android, desktop: operators info on onboarding (#5341)
This commit is contained in:
+44
-6
@@ -1,7 +1,11 @@
|
||||
package chat.simplex.common.views.onboarding
|
||||
|
||||
import SectionBottomSpacer
|
||||
import SectionDividerSpaced
|
||||
import SectionItemView
|
||||
import SectionTextFooter
|
||||
import SectionView
|
||||
import TextIconSpaced
|
||||
import androidx.compose.foundation.*
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.*
|
||||
@@ -12,8 +16,8 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import chat.simplex.common.model.*
|
||||
import chat.simplex.common.model.ChatController.appPrefs
|
||||
import chat.simplex.common.model.ServerOperator
|
||||
import chat.simplex.common.platform.*
|
||||
import chat.simplex.common.ui.theme.*
|
||||
import chat.simplex.common.views.helpers.*
|
||||
@@ -339,11 +343,45 @@ private fun enabledOperators(operators: List<ServerOperator>, selectedOperatorId
|
||||
|
||||
@Composable
|
||||
private fun ChooseServerOperatorsInfoView() {
|
||||
ColumnWithScrollBar(Modifier.padding(horizontal = DEFAULT_PADDING)) {
|
||||
AppBarTitle(stringResource(MR.strings.onboarding_network_operators), withPadding = false)
|
||||
ReadableText(stringResource(MR.strings.onboarding_network_operators_app_will_use_different_operators))
|
||||
ReadableText(stringResource(MR.strings.onboarding_network_operators_cant_see_who_talks_to_whom))
|
||||
ReadableText(stringResource(MR.strings.onboarding_network_operators_app_will_use_for_routing))
|
||||
ColumnWithScrollBar {
|
||||
AppBarTitle(stringResource(MR.strings.onboarding_network_operators))
|
||||
|
||||
Column(
|
||||
Modifier.padding(horizontal = DEFAULT_PADDING)
|
||||
) {
|
||||
ReadableText(stringResource(MR.strings.onboarding_network_operators_app_will_use_different_operators))
|
||||
ReadableText(stringResource(MR.strings.onboarding_network_operators_cant_see_who_talks_to_whom))
|
||||
ReadableText(stringResource(MR.strings.onboarding_network_operators_app_will_use_for_routing))
|
||||
}
|
||||
|
||||
SectionDividerSpaced()
|
||||
|
||||
SectionView(title = stringResource(MR.strings.onboarding_network_about_operators).uppercase()) {
|
||||
chatModel.conditions.value.serverOperators.forEach { op ->
|
||||
ServerOperatorRow(op)
|
||||
}
|
||||
}
|
||||
SectionBottomSpacer()
|
||||
}
|
||||
}
|
||||
|
||||
@Composable()
|
||||
private fun ServerOperatorRow(
|
||||
operator: ServerOperator
|
||||
) {
|
||||
SectionItemView(
|
||||
{
|
||||
ModalManager.start.showModalCloseable { close ->
|
||||
OperatorInfoView(operator)
|
||||
}
|
||||
}
|
||||
) {
|
||||
Image(
|
||||
painterResource(operator.logo),
|
||||
operator.tradeName,
|
||||
modifier = Modifier.size(24.dp)
|
||||
)
|
||||
TextIconSpaced()
|
||||
Text(operator.tradeName)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -410,7 +410,7 @@ fun OperatorViewLayout(
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun OperatorInfoView(serverOperator: ServerOperator) {
|
||||
fun OperatorInfoView(serverOperator: ServerOperator) {
|
||||
ColumnWithScrollBar {
|
||||
AppBarTitle(stringResource(MR.strings.operator_info_title))
|
||||
|
||||
|
||||
@@ -1080,6 +1080,7 @@
|
||||
<string name="onboarding_network_operators_app_will_use_different_operators">The app protects your privacy by using different operators in each conversation.</string>
|
||||
<string name="onboarding_network_operators_cant_see_who_talks_to_whom">When more than one operator is enabled, none of them has metadata to learn who communicates with whom.</string>
|
||||
<string name="onboarding_network_operators_app_will_use_for_routing">For example, if your contact receives messages via a SimpleX Chat server, your app will deliver them via a Flux server.</string>
|
||||
<string name="onboarding_network_about_operators">About operators</string>
|
||||
<string name="onboarding_select_network_operators_to_use">Select network operators to use.</string>
|
||||
<string name="how_it_helps_privacy">How it helps privacy</string>
|
||||
<string name="onboarding_network_operators_configure_via_settings">You can configure servers via settings.</string>
|
||||
|
||||
Reference in New Issue
Block a user