mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-28 09:44:15 +00:00
Revert "AddGroupView/AddChannelView: wrap action buttons + toggles in SectionView card"
This reverts commit 4d9319d12a.
This commit is contained in:
+20
-22
@@ -311,29 +311,27 @@ private fun ProfileStepView(
|
||||
}
|
||||
Spacer(Modifier.height(8.dp))
|
||||
|
||||
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
|
||||
)
|
||||
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) {
|
||||
|
||||
+17
-20
@@ -1,7 +1,6 @@
|
||||
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.*
|
||||
@@ -151,26 +150,24 @@ fun AddGroupLayout(
|
||||
}
|
||||
Spacer(Modifier.height(8.dp))
|
||||
|
||||
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)
|
||||
)
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user