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) <noreply@anthropic.com>
This commit is contained in:
another-simple-pixel
2026-05-16 09:26:23 -07:00
parent 3a9ece8d1e
commit 4d9319d12a
2 changed files with 42 additions and 37 deletions
@@ -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) {
@@ -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 {