mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-23 00:18:27 +00:00
ui: crowdfunding card and page as before, slide says big channels pay (#8027)
This commit is contained in:
1 parent
4ef5fdc566
commit
215c02df71
10 files changed
+28
-18
No files matched your search
+1
-1
@@ -74,7 +74,7 @@ fun GetStakeBanner(showDismiss: Boolean, onTap: () -> Unit, onDismiss: () -> Uni
|
||||
fun openGetStake(modalManager: ModalManager) {
|
||||
appPrefs.getStakeBannerTapped.set(true)
|
||||
modalManager.showModalCloseable(cardScreen = true) { close ->
|
||||
GetStakeView(inCenterOfWindow = modalManager === ModalManager.center, close = close)
|
||||
GetStakeView(showFirstImage = true, inCenterOfWindow = modalManager === ModalManager.center, close = close)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+14
-7
@@ -1136,7 +1136,7 @@ fun isInUs(): Boolean =
|
||||
@Composable
|
||||
private fun InvestInSimpleXChatView(modalManager: ModalManager) {
|
||||
if (!crowdfundingAvailable()) return
|
||||
val showGetStake = { modalManager.showModalCloseable(cardScreen = true) { close -> GetStakeView(inCenterOfWindow = crowdfundingLayout.inCenterOfWindow(modalManager), close = close) } }
|
||||
val showGetStake = { modalManager.showModalCloseable(cardScreen = true) { close -> GetStakeView(showFirstImage = false, inCenterOfWindow = crowdfundingLayout.inCenterOfWindow(modalManager), close = close) } }
|
||||
Column(modifier = Modifier.padding(bottom = 12.dp)) {
|
||||
Text(
|
||||
generalGetString(MR.strings.v7_1_invest),
|
||||
@@ -1163,8 +1163,13 @@ private fun InvestInSimpleXChatView(modalManager: ModalManager) {
|
||||
)
|
||||
}
|
||||
Text(
|
||||
generalGetString(MR.strings.v7_1_invest_learn_more),
|
||||
color = MaterialTheme.colors.primary,
|
||||
buildAnnotatedString {
|
||||
append(generalGetString(MR.strings.v7_0_invest_descr))
|
||||
append(" ")
|
||||
withStyle(SpanStyle(color = MaterialTheme.colors.primary)) {
|
||||
append(generalGetString(MR.strings.learn_more))
|
||||
}
|
||||
},
|
||||
fontSize = 15.sp,
|
||||
modifier = Modifier
|
||||
.pointerHoverIcon(PointerIcon.Hand)
|
||||
@@ -1206,14 +1211,14 @@ private val getStakeSlides: List<CrowdfundingSlide> = listOf(
|
||||
),
|
||||
CrowdfundingSlide(
|
||||
MR.images.crowdfunding_4,
|
||||
"Revenue plan: businesses & channels pay",
|
||||
"Revenue plan: businesses & big channels pay",
|
||||
"SimpleX Chat plans to earn from the infrastructure and services that creators, businesses and large communities need as they grow.",
|
||||
"Read about how we plan to make SimpleX Chat and network profitable, and about all the investment terms on Wefunder."
|
||||
),
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun GetStakeView(inCenterOfWindow: Boolean = false, close: () -> Unit) {
|
||||
fun GetStakeView(showFirstImage: Boolean, inCenterOfWindow: Boolean = false, close: () -> Unit) {
|
||||
val uriHandler = LocalUriHandler.current
|
||||
val stopped = chatModel.chatRunning.value == false
|
||||
|
||||
@@ -1242,7 +1247,9 @@ fun GetStakeView(inCenterOfWindow: Boolean = false, close: () -> Unit) {
|
||||
// in the center of the window the page is wide enough for the title to fit on one line
|
||||
val title = "Invest in\nSimpleX Chat"
|
||||
AppBarTitle(if (inCenterOfWindow) title.replace("\n", " ") else title, withPadding = false)
|
||||
slideImage(getStakeSlides[0])
|
||||
if (showFirstImage) {
|
||||
slideImage(getStakeSlides[0])
|
||||
}
|
||||
Text(
|
||||
buildAnnotatedString {
|
||||
append(getStakeSlides[0].text)
|
||||
@@ -1253,7 +1260,7 @@ fun GetStakeView(inCenterOfWindow: Boolean = false, close: () -> Unit) {
|
||||
}
|
||||
}
|
||||
},
|
||||
Modifier.padding(top = 8.dp),
|
||||
Modifier.padding(top = if (showFirstImage) 8.dp else 0.dp),
|
||||
lineHeight = 24.sp
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ fun SettingsLayout(
|
||||
SettingsActionItem(
|
||||
painterResource(MR.images.ic_redeem),
|
||||
stringResource(MR.strings.v7_0_crowdfunding),
|
||||
{ ModalManager.start.showModalCloseable(cardScreen = true) { close -> GetStakeView(close = close) } }
|
||||
{ ModalManager.start.showModalCloseable(cardScreen = true) { close -> GetStakeView(showFirstImage = true, close = close) } }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2714,6 +2714,7 @@
|
||||
<string name="v6_5_safe_web_links_descr">- opt-in to send link previews.\n- use SOCKS proxy if enabled.\n- prevent hyperlink phishing.\n- remove link tracking.</string>
|
||||
<string name="v6_5_non_profit_governance">Non-profit governance</string>
|
||||
<string name="v6_5_non_profit_governance_descr">To make SimpleX Network last.</string>
|
||||
<string name="v7_0_invest_descr" translatable="false">Crowdfunding on Wefunder.</string>
|
||||
<string name="v7_0_crowdfunding" translatable="false">Crowdfunding on Wefunder</string>
|
||||
<string name="v7_0_invest_learn_more" translatable="false">Learn more on Wefunder</string>
|
||||
<string name="invest_banner_title" translatable="false">Invest in SimpleX Chat!</string>
|
||||
@@ -3357,7 +3358,6 @@
|
||||
<string name="badges_investor_offer_legend">Invest $1000+ and get a free legend badge.</string>
|
||||
<string name="badges_investor_offer_learn_more">Learn more on Wefunder</string>
|
||||
<string name="v7_1_invest">Own a part of SimpleX Chat! 🚀</string>
|
||||
<string name="v7_1_invest_learn_more">Learn more on Wefunder.</string>
|
||||
<string name="v7_1_supporter_badge_title">Supporter badges</string>
|
||||
<string name="v7_1_supporter_badge_body">Send larger files\navailable for longer.</string>
|
||||
<string name="v7_1_supporter_badge_descr">Larger files available for longer.</string>
|
||||
|
||||
Reference in new issue
Block a user