From 4d9319d12af6eebb2b344b1d8d627b4510c644ab Mon Sep 17 00:00:00 2001 From: another-simple-pixel Date: Sat, 16 May 2026 09:26:23 -0700 Subject: [PATCH] AddGroupView/AddChannelView: wrap action buttons + toggles in SectionView card In Create group and Create public channel screens the action buttons (Create / Configure relays) and incognito toggle were rendered as loose SectionItemViews on the gray canvas with no card chrome. Wrap them in SectionView so they read as a single card matching the iOS-style facelift. The display-name input above and the descriptive footer below stay outside the card (text input keeps its own padding, footer reads as caption). Added missing `import SectionView` in AddGroupView. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../common/views/newchat/AddChannelView.kt | 42 ++++++++++--------- .../common/views/newchat/AddGroupView.kt | 37 ++++++++-------- 2 files changed, 42 insertions(+), 37 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddChannelView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddChannelView.kt index 09372636ab..5f5b032efa 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddChannelView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddChannelView.kt @@ -311,27 +311,29 @@ private fun ProfileStepView( } Spacer(Modifier.height(8.dp)) - SettingsActionItem( - painterResource(MR.images.ic_wifi_tethering), - generalGetString(MR.strings.configure_relays), - click = { - ModalManager.start.showCustomModal { close -> - NetworkAndServersView(close) - } - }, - textColor = if (hasRelays.value) MaterialTheme.colors.primary else WarningOrange, - iconColor = if (hasRelays.value) MaterialTheme.colors.primary else WarningOrange - ) + SectionView { + SettingsActionItem( + painterResource(MR.images.ic_wifi_tethering), + generalGetString(MR.strings.configure_relays), + click = { + ModalManager.start.showCustomModal { close -> + NetworkAndServersView(close) + } + }, + textColor = if (hasRelays.value) MaterialTheme.colors.primary else WarningOrange, + iconColor = if (hasRelays.value) MaterialTheme.colors.primary else WarningOrange + ) - val canCreate = canCreateProfile(displayName.value) && hasRelays.value && !creationInProgress.value - SettingsActionItem( - painterResource(MR.images.ic_check), - generalGetString(MR.strings.create_channel_button), - click = createChannel, - textColor = MaterialTheme.colors.primary, - iconColor = MaterialTheme.colors.primary, - disabled = !canCreate - ) + val canCreate = canCreateProfile(displayName.value) && hasRelays.value && !creationInProgress.value + SettingsActionItem( + painterResource(MR.images.ic_check), + generalGetString(MR.strings.create_channel_button), + click = createChannel, + textColor = MaterialTheme.colors.primary, + iconColor = MaterialTheme.colors.primary, + disabled = !canCreate + ) + } SectionTextFooter( if (!hasRelays.value) { diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddGroupView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddGroupView.kt index a54d2e42e7..d57d5a251d 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddGroupView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddGroupView.kt @@ -1,6 +1,7 @@ package chat.simplex.common.views.newchat import SectionTextFooter +import SectionView import androidx.compose.desktop.ui.tooling.preview.Preview import androidx.compose.foundation.* import androidx.compose.foundation.layout.* @@ -150,24 +151,26 @@ fun AddGroupLayout( } Spacer(Modifier.height(8.dp)) - SettingsActionItem( - painterResource(MR.images.ic_check), - stringResource(MR.strings.create_group_button), - click = { - createGroup(incognito.value, GroupProfile( - displayName = displayName.value.trim(), - fullName = "", - shortDescr = null, - image = profileImage.value, - groupPreferences = GroupPreferences(history = GroupPreference(GroupFeatureEnabled.ON)) - )) - }, - textColor = MaterialTheme.colors.primary, - iconColor = MaterialTheme.colors.primary, - disabled = !canCreateProfile(displayName.value) - ) + SectionView { + SettingsActionItem( + painterResource(MR.images.ic_check), + stringResource(MR.strings.create_group_button), + click = { + createGroup(incognito.value, GroupProfile( + displayName = displayName.value.trim(), + fullName = "", + shortDescr = null, + image = profileImage.value, + groupPreferences = GroupPreferences(history = GroupPreference(GroupFeatureEnabled.ON)) + )) + }, + textColor = MaterialTheme.colors.primary, + iconColor = MaterialTheme.colors.primary, + disabled = !canCreateProfile(displayName.value) + ) - IncognitoToggle(incognitoPref, incognito) { ModalManager.start.showModal { IncognitoView() } } + IncognitoToggle(incognitoPref, incognito) { ModalManager.start.showModal { IncognitoView() } } + } SectionTextFooter( buildAnnotatedString {