diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt index c1c6c29095..972b93a0bf 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt @@ -3606,7 +3606,7 @@ enum class OperatorTag { } data class ServerOperatorInfo( - val description: String, + val description: List, val website: String, val logo: ImageResource, val largeLogo: ImageResource, @@ -3615,7 +3615,10 @@ data class ServerOperatorInfo( ) val operatorsInfo: Map = mapOf( OperatorTag.SimpleX to ServerOperatorInfo( - description = "SimpleX Chat preset servers", + description = listOf( + "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 = MR.images.decentralized, largeLogo = MR.images.logo, @@ -3623,20 +3626,18 @@ val operatorsInfo: Map = mapOf( largeLogoDarkMode = MR.images.logo_light ), OperatorTag.Flux to ServerOperatorInfo( - description = "Flux is the largest decentralized cloud infrastructure, leveraging a global network of user-operated computational nodes. Flux offers a powerful, scalable, and affordable platform designed to support individuals, businesses, and cutting-edge technologies like AI. With high uptime and worldwide distribution, Flux ensures reliable, accessible cloud computing for all.", + description = listOf( + "Flux is the largest decentralized cloud infrastructure, leveraging a global network of user-operated computational nodes.", + "Flux offers a powerful, scalable, and affordable platform designed to support individuals, businesses, and cutting-edge technologies like AI. With high uptime and worldwide distribution, Flux ensures reliable, accessible cloud computing for all." + ), website = "https://runonflux.com", - logo = MR.images.decentralized, - largeLogo = MR.images.logo, - logoDarkMode = MR.images.decentralized_light, - largeLogoDarkMode = MR.images.logo_light - // LALAL -// logo = "flux_logo_symbol", -// largeLogo = "flux_logo", -// logoDarkMode = "flux_logo_symbol", -// largeLogoDarkMode = "flux_logo-light" + logo = MR.images.flux_logo_symbol, + largeLogo = MR.images.flux_logo, + logoDarkMode = MR.images.flux_logo_symbol, + largeLogoDarkMode = MR.images.flux_logo_light ), OperatorTag.XYZ to ServerOperatorInfo( - description = "XYZ servers", + description = listOf("XYZ servers"), website = "XYZ website", logo = MR.images.shield, largeLogo = MR.images.logo, @@ -3644,7 +3645,7 @@ val operatorsInfo: Map = mapOf( largeLogoDarkMode = MR.images.logo_light ), OperatorTag.Demo to ServerOperatorInfo( - description = "Demo operator", + description = listOf("Demo operator"), website = "Demo website", logo = MR.images.decentralized, largeLogo = MR.images.logo, @@ -3729,7 +3730,7 @@ data class ServerOperator( ) { companion object { val dummyOperatorInfo = ServerOperatorInfo( - description = "Default", + description = listOf("Default"), website = "Default", logo = MR.images.decentralized, largeLogo = MR.images.logo, @@ -3814,13 +3815,17 @@ data class ServerOperator( } } - val logo: ImageResource get() { - return if (CurrentColors.value.base == DefaultTheme.LIGHT) info.logo else info.logoDarkMode - } + val logo: ImageResource + @Composable + get() { + return if (isInDarkTheme()) info.logoDarkMode else info.logo + } - val largeLogo: ImageResource get() { - return if (CurrentColors.value.base == DefaultTheme.LIGHT) info.largeLogo else info.largeLogoDarkMode - } + val largeLogo: ImageResource + @Composable + get() { + return if (isInDarkTheme()) info.largeLogoDarkMode else info.largeLogo + } } @Serializable diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/onboarding/ChooseServerOperators.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/onboarding/ChooseServerOperators.kt index 5b885ee754..2d47e4fab2 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/onboarding/ChooseServerOperators.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/onboarding/ChooseServerOperators.kt @@ -2,8 +2,7 @@ package chat.simplex.common.views.onboarding import SectionBottomSpacer import SectionTextFooter -import androidx.compose.foundation.BorderStroke -import androidx.compose.foundation.background +import androidx.compose.foundation.* import androidx.compose.foundation.layout.* import androidx.compose.foundation.shape.* import androidx.compose.material.* @@ -127,7 +126,7 @@ private fun OperatorCheckView(serverOperator: ServerOperator, selectedOperatorId shape = RoundedCornerShape(18.dp) ) { Row(Modifier.padding(DEFAULT_PADDING_HALF), verticalAlignment = Alignment.CenterVertically) { - Icon(painterResource(serverOperator.largeLogo), null, Modifier.height(48.dp)) + Image(painterResource(serverOperator.largeLogo), null, Modifier.height(48.dp)) Spacer(Modifier.width(DEFAULT_PADDING_HALF).weight(1f)) CircleCheckbox(checked) } diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/networkAndServers/OperatorView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/networkAndServers/OperatorView.kt index 9ea1a18e6c..0991bb2fb5 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/networkAndServers/OperatorView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/networkAndServers/OperatorView.kt @@ -139,16 +139,7 @@ fun OperatorViewLayout( Column { SectionView(generalGetString(MR.strings.operator).uppercase()) { SectionItemView({ ModalManager.start.showModalCloseable { _ -> OperatorInfoView(operator) } }) { - Image( - painterResource(operator.logo), - operator.tradeName, - modifier = Modifier.size(24.dp), - colorFilter = if (operator.enabled) null else ColorFilter.colorMatrix(ColorMatrix().apply { - setToSaturation(0f) - }) - ) - TextIconSpaced() - Text(operator.tradeName, color = MaterialTheme.colors.onBackground) + Image(painterResource(operator.largeLogo), null, Modifier.height(48.dp)) } UseOperatorToggle( scope = scope, @@ -401,10 +392,29 @@ private fun OperatorInfoView(serverOperator: ServerOperator) { SectionView { SectionItemView { - Text(serverOperator.info.description) + Column(verticalArrangement = Arrangement.spacedBy(10.dp)) { + Image(painterResource(serverOperator.largeLogo), null, Modifier.height(48.dp)) + if (serverOperator.legalName != null) { + Text(serverOperator.legalName) + } + } } } + + SectionDividerSpaced(maxBottomPadding = false) + + SectionView { + SectionItemView { + Column(verticalArrangement = Arrangement.spacedBy(10.dp)) { + serverOperator.info.description.forEach { d -> + Text(d) + } + } + } + } + SectionDividerSpaced() + SectionView(generalGetString(MR.strings.operator_website).uppercase()) { SectionItemView { val website = serverOperator.info.website @@ -524,7 +534,6 @@ private fun SingleOperatorUsageConditionsView( Column(modifier = Modifier.weight(1f).padding(end = DEFAULT_PADDING, start = DEFAULT_PADDING, bottom = DEFAULT_PADDING, top = DEFAULT_PADDING_HALF)) { ConditionsTextView(rhId) } - AcceptConditionsButton(close) } } diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/images/flux_logo@4x.png b/apps/multiplatform/common/src/commonMain/resources/MR/images/flux_logo@4x.png new file mode 100644 index 0000000000..87f1373d75 Binary files /dev/null and b/apps/multiplatform/common/src/commonMain/resources/MR/images/flux_logo@4x.png differ diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/images/flux_logo_light@4x.png b/apps/multiplatform/common/src/commonMain/resources/MR/images/flux_logo_light@4x.png new file mode 100644 index 0000000000..e1d6dda4fe Binary files /dev/null and b/apps/multiplatform/common/src/commonMain/resources/MR/images/flux_logo_light@4x.png differ diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/images/flux_logo_symbol@4x.png b/apps/multiplatform/common/src/commonMain/resources/MR/images/flux_logo_symbol@4x.png new file mode 100644 index 0000000000..0793b0ee85 Binary files /dev/null and b/apps/multiplatform/common/src/commonMain/resources/MR/images/flux_logo_symbol@4x.png differ