mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-22 15:38:23 +00:00
ui: show "Why SimpleX is built." in About opened from Settings (#8111)
* ui: show "Why SimpleX is built." in About opened from Settings * docs: "Why SimpleX is built." in About opened from Settings * android, desktop: keep About and its text clear of the bottom bar * android, desktop: no blank bar above the text with the bottom bar * android, desktop: About and why-built references * ios: About from Settings references * ui: revert About's iOS spacer and preview, the text's pane and top space * docs: revert the About link notes in the apps' settings docs * android, desktop: update the why-built page's preview references * android, desktop: scroll the why-built page's text under the toolbar * ios: keep the About link at the bottom of the screen, as in onboarding --------- Co-authored-by: spaced4ndy-agents <342056592+spaced4ndy-agents@users.noreply.github.com>
This commit is contained in:
1 parent
32688964dc
commit
ca20b79545
5 files changed
+18
-16
No files matched your search
@@ -70,18 +70,18 @@ struct SimpleXInfo: View {
|
||||
.multilineTextAlignment(.center)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
|
||||
if onboarding {
|
||||
Spacer(minLength: 0)
|
||||
Spacer(minLength: 0)
|
||||
|
||||
if onboarding {
|
||||
createFirstProfileButton()
|
||||
.padding(.vertical, 10)
|
||||
}
|
||||
|
||||
Button {
|
||||
showWhyBuilt = true
|
||||
} label: {
|
||||
Label("Why SimpleX is built.", systemImage: "info.circle")
|
||||
.font(.headline)
|
||||
}
|
||||
Button {
|
||||
showWhyBuilt = true
|
||||
} label: {
|
||||
Label("Why SimpleX is built.", systemImage: "info.circle")
|
||||
.font(.headline)
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 25)
|
||||
|
||||
+2
@@ -15,6 +15,7 @@ import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import chat.simplex.common.model.*
|
||||
import chat.simplex.common.model.ChatController.appPrefs
|
||||
import chat.simplex.common.platform.*
|
||||
import chat.simplex.common.ui.theme.*
|
||||
import chat.simplex.common.views.chat.item.MarkdownText
|
||||
@@ -37,6 +38,7 @@ fun HowItWorks(user: User?, onboardingStage: SharedPreference<OnboardingStage>?
|
||||
ReadableText(MR.strings.why_built_p6, padding = paraPadding)
|
||||
ReadableText(MR.strings.why_built_p7, padding = paraPadding)
|
||||
ReadableText(MR.strings.why_built_tagline, padding = paraPadding)
|
||||
if (onboardingStage == null && appPrefs.oneHandUI.state.value) Spacer(Modifier.height(AppBarHeight * fontSizeSqrtMultiplier))
|
||||
}
|
||||
if (onboardingStage != null) {
|
||||
Column(
|
||||
|
||||
+8
-8
@@ -106,8 +106,10 @@ fun SimpleXInfoLayout(
|
||||
onboardingStage: SharedPreference<OnboardingStage>?
|
||||
) {
|
||||
val topBar = onboardingStage == null && !appPrefs.oneHandUI.state.value
|
||||
val bottomBar = onboardingStage == null && appPrefs.oneHandUI.state.value
|
||||
val barHeight = AppBarHeight * fontSizeSqrtMultiplier
|
||||
val modifier = Modifier.fillMaxSize().systemBarsPadding().padding(horizontal = DEFAULT_ONBOARDING_HORIZONTAL_PADDING)
|
||||
Column(if (topBar) modifier.padding(top = AppBarHeight * fontSizeSqrtMultiplier) else modifier, horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Column(modifier.padding(top = if (topBar) barHeight else 0.dp, bottom = if (bottomBar) barHeight else 0.dp), horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Box(Modifier.padding(top = DEFAULT_PADDING * 2).widthIn(max = if (appPlatform.isAndroid) 185.dp else 160.dp), contentAlignment = Alignment.Center) {
|
||||
SimpleXLogo()
|
||||
}
|
||||
@@ -151,15 +153,13 @@ fun SimpleXInfoLayout(
|
||||
}
|
||||
},
|
||||
button = {
|
||||
if (onboardingStage != null) {
|
||||
Column(Modifier.widthIn(max = if (appPlatform.isAndroid) 450.dp else 1000.dp), horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Column(Modifier.widthIn(max = if (appPlatform.isAndroid) 450.dp else 1000.dp), horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
if (onboardingStage != null) {
|
||||
OnboardingActionButton(user, onboardingStage)
|
||||
TextButtonBelowOnboardingButton(stringResource(MR.strings.why_simplex_is_built), icon = painterResource(MR.images.ic_info), onClick = {
|
||||
ModalManager.fullscreen.showModal { HowItWorks(user, onboardingStage) }
|
||||
})
|
||||
}
|
||||
} else {
|
||||
Spacer(Modifier)
|
||||
TextButtonBelowOnboardingButton(stringResource(MR.strings.why_simplex_is_built), icon = painterResource(MR.images.ic_info), onClick = {
|
||||
ModalManager.fullscreen.showModal { HowItWorks(user, onboardingStage) }
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 110 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 109 KiB |
Reference in new issue
Block a user