Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Main Settings menu options #7803

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ import io.horizontalsystems.bankwallet.ui.compose.components.AppBar
import io.horizontalsystems.bankwallet.ui.compose.components.BadgeText
import io.horizontalsystems.bankwallet.ui.compose.components.CellSingleLineLawrenceSection
import io.horizontalsystems.bankwallet.ui.compose.components.CellUniversalLawrenceSection
import io.horizontalsystems.bankwallet.ui.compose.components.InfoText
import io.horizontalsystems.bankwallet.ui.compose.components.PremiumHeader
import io.horizontalsystems.bankwallet.ui.compose.components.RowUniversal
import io.horizontalsystems.bankwallet.ui.compose.components.VSpacer
import io.horizontalsystems.bankwallet.ui.compose.components.body_leah
import io.horizontalsystems.bankwallet.ui.compose.components.caption_grey
import io.horizontalsystems.bankwallet.ui.compose.components.cell.SectionPremiumUniversalLawrence
import io.horizontalsystems.bankwallet.ui.compose.components.subhead1_grey
import io.horizontalsystems.bankwallet.ui.compose.components.subhead1_jacob
import io.horizontalsystems.bankwallet.ui.helpers.LinkHelper

@Composable
Expand Down Expand Up @@ -282,91 +282,46 @@ private fun SettingSections(
)
)

VSpacer(24.dp)
VSpacer(32.dp)

Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 32.dp)
.height(32.dp),
verticalAlignment = Alignment.CenterVertically,
) {
subhead1_jacob(text = stringResource(id = R.string.Settings_JoinUnstoppables).uppercase())
}
CellUniversalLawrenceSection(
listOf({
HsSettingCell(
R.string.Settings_Telegram,
R.drawable.ic_telegram_filled_24,
ComposeAppTheme.colors.jacob,
onClick = {
LinkHelper.openLinkInAppBrowser(context, App.appConfigProvider.appTelegramLink)

stat(
page = StatPage.Settings,
event = StatEvent.Open(StatPage.ExternalTelegram)
)
}
)
}, {
HsSettingCell(
R.string.Settings_Twitter,
R.drawable.ic_twitter_filled_24,
ComposeAppTheme.colors.jacob,
onClick = {
LinkHelper.openLinkInAppBrowser(context, App.appConfigProvider.appTwitterLink)
listOf(
{
HsSettingCell(
R.string.Settings_BotSupport,
R.drawable.ic_ai_assistant_24,
onClick = {

stat(page = StatPage.Settings, event = StatEvent.Open(StatPage.ExternalTwitter))
}
)
})
)
InfoText(
text = stringResource(R.string.Settings_JoinUnstoppables_Description),
}
)
},
)
)

VSpacer(32.dp)

CellUniversalLawrenceSection(
listOf({
HsSettingCell(
R.string.Settings_Faq,
R.drawable.ic_faq_20,
onClick = {
navController.slideFromRight(R.id.faqListFragment)

stat(page = StatPage.Settings, event = StatEvent.Open(StatPage.Faq))
}
)
}, {
HsSettingCell(
R.string.Guides_Title,
R.drawable.ic_academy_20,
onClick = {
navController.slideFromRight(R.id.academyFragment)
VSpacer(24.dp)

stat(page = StatPage.Settings, event = StatEvent.Open(StatPage.Academy))
}
)
})
)
PremiumHeader()

VSpacer(32.dp)
SectionPremiumUniversalLawrence {
HsSettingCell(
R.string.Settings_VipSupport,
R.drawable.ic_support_yellow_24,
onClick = {

CellUniversalLawrenceSection(
listOf {
HsSettingCell(
R.string.Settings_Donate,
R.drawable.ic_heart_filled_24,
ComposeAppTheme.colors.jacob,
onClick = {
navController.slideFromRight(R.id.donateTokenSelectFragment)
}
)
Divider(
thickness = 1.dp,
color = ComposeAppTheme.colors.steel10,
)
HsSettingCell(
R.string.Settings_VipClub,
R.drawable.ic_club_yellow_24,
onClick = {

stat(page = StatPage.Settings, event = StatEvent.Open(StatPage.Donate))
}
)
}
)
}
)
}

VSpacer(32.dp)

Expand Down Expand Up @@ -415,6 +370,60 @@ private fun SettingSections(
})
)

VSpacer(24.dp)

Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 32.dp)
.height(32.dp),
verticalAlignment = Alignment.CenterVertically,
) {
subhead1_grey(text = stringResource(id = R.string.Settings_JoinUnstoppables).uppercase())
}
CellUniversalLawrenceSection(
listOf({
HsSettingCell(
R.string.Settings_Telegram,
R.drawable.ic_telegram_24,
onClick = {
LinkHelper.openLinkInAppBrowser(context, App.appConfigProvider.appTelegramLink)

stat(
page = StatPage.Settings,
event = StatEvent.Open(StatPage.ExternalTelegram)
)
}
)
}, {
HsSettingCell(
R.string.Settings_Twitter,
R.drawable.ic_twitter_24,
onClick = {
LinkHelper.openLinkInAppBrowser(context, App.appConfigProvider.appTwitterLink)

stat(page = StatPage.Settings, event = StatEvent.Open(StatPage.ExternalTwitter))
}
)
})
)

VSpacer(32.dp)

CellUniversalLawrenceSection(
listOf {
HsSettingCell(
R.string.Settings_Donate,
R.drawable.ic_heart_24,
onClick = {
navController.slideFromRight(R.id.donateTokenSelectFragment)

stat(page = StatPage.Settings, event = StatEvent.Open(StatPage.Donate))
}
)
}
)

VSpacer(32.dp)
}

Expand Down
15 changes: 15 additions & 0 deletions app/src/main/res/drawable/ic_ai_assistant_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M8,14C5.239,14 3,16.239 3,19V21C3,21.552 3.448,22 4,22C4.552,22 5,21.552 5,21V19C5,17.343 6.343,16 8,16H16C17.657,16 19,17.343 19,19V21C19,21.552 19.448,22 20,22C20.552,22 21,21.552 21,21V19C21,16.239 18.761,14 16,14H8Z"
android:fillColor="#808085"/>
<path
android:pathData="M12,4L17,9L12,14L7,9L12,4Z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#808085"/>
</vector>
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_telegram_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M8.625,20.4L7.765,13.897L3,11.729L20.4,4.2L17.823,20.4L12.529,16.607L8.625,20.4Z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#808085"/>
</vector>
13 changes: 13 additions & 0 deletions app/src/main/res/drawable/ic_twitter_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M8.509,16.77C0.655,13.279 4.146,5.424 4.146,5.424C5.921,7.952 8.313,9.68 11.4,9.6C11.4,7.8 11.901,5.826 13.916,5.057C15.112,4.6 16.85,4.833 17.929,5.807L21.6,4.8L19.8,9C19.8,19.036 10.255,22.879 2.4,18.515C4.571,18.601 6.712,17.99 8.509,16.77Z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#808085"
android:strokeLineCap="round"/>
</vector>
5 changes: 4 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,10 @@
<string name="Settings_AutoLock">Auto-Lock</string>
<string name="Settings_Telegram" translatable="false">Telegram</string>
<string name="Settings_Twitter" translatable="false">Twitter</string>
<string name="Settings_JoinUnstoppables">Be Unstoppable</string>
<string name="Settings_JoinUnstoppables">Join Unstoppables</string>
<string name="Settings_VipSupport">VIP Support</string>
<string name="Settings_VipClub">VIP Club</string>
<string name="Settings_BotSupport">BOT Support</string>
<string name="Settings_JoinUnstoppables_Description">Learn and master crypto via exclusive videos. Get to know us informally. Be the first to see things we work on.</string>

<string name="Settings_PersonalSupport">Personal Support</string>
Expand Down
18 changes: 18 additions & 0 deletions components/icons/src/main/res/drawable/ic_club_yellow_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,14.5C12.552,14.5 13,14.052 13,13.5V10.5C13,9.948 12.552,9.5 12,9.5C11.448,9.5 11,9.948 11,10.5L11,13.5C11,14.052 11.448,14.5 12,14.5Z"
android:fillColor="#FFA800"/>
<path
android:pathData="M12,6.5C12.552,6.5 13,6.948 13,7.5C13,8.052 12.552,8.5 12,8.5C11.448,8.5 11,8.052 11,7.5C11,6.948 11.448,6.5 12,6.5Z"
android:fillColor="#FFA800"/>
<path
android:pathData="M3,15V6C3,4.343 4.343,3 6,3H18C19.657,3 21,4.343 21,6V15C21,16.657 19.657,18 18,18H11L7,22V18H6C4.343,18 3,16.657 3,15Z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#FFA800"/>
</vector>
9 changes: 9 additions & 0 deletions components/icons/src/main/res/drawable/ic_heart_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,20L11.479,20.853C11.799,21.049 12.201,21.049 12.521,20.853L12,20ZM12,6L11.2,6.6C11.389,6.852 11.686,7 12,7C12.314,7 12.611,6.852 12.8,6.6L12,6ZM12,20C12.521,19.147 12.522,19.147 12.522,19.147C12.522,19.147 12.522,19.147 12.522,19.147C12.522,19.147 12.522,19.147 12.521,19.147C12.521,19.146 12.52,19.146 12.518,19.145C12.515,19.142 12.509,19.139 12.502,19.135C12.487,19.125 12.464,19.111 12.433,19.091C12.371,19.052 12.279,18.994 12.161,18.916C11.925,18.761 11.584,18.533 11.174,18.24C10.353,17.655 9.262,16.821 8.176,15.825C7.085,14.826 6.025,13.686 5.243,12.491C4.456,11.29 4,10.106 4,9H2C2,10.644 2.669,12.21 3.57,13.587C4.475,14.97 5.665,16.237 6.824,17.3C7.988,18.366 9.147,19.251 10.013,19.869C10.447,20.178 10.81,20.422 11.066,20.59C11.193,20.673 11.295,20.738 11.365,20.782C11.4,20.805 11.427,20.822 11.447,20.834C11.456,20.84 11.464,20.844 11.469,20.847C11.472,20.849 11.474,20.85 11.475,20.851C11.476,20.852 11.477,20.852 11.477,20.853C11.478,20.853 11.478,20.853 11.478,20.853C11.478,20.853 11.479,20.853 12,20ZM4,9C4,6.791 5.791,5 8,5V3C4.686,3 2,5.686 2,9H4ZM8,5C9.308,5 10.469,5.627 11.2,6.6L12.8,5.399C11.707,3.944 9.963,3 8,3V5ZM16,3C14.037,3 12.293,3.944 11.2,5.399L12.8,6.6C13.531,5.627 14.692,5 16,5V3ZM22,9C22,5.686 19.314,3 16,3V5C18.209,5 20,6.791 20,9H22ZM12,20C12.521,20.853 12.522,20.853 12.522,20.853C12.522,20.853 12.522,20.853 12.523,20.853C12.523,20.852 12.524,20.852 12.525,20.851C12.526,20.85 12.528,20.849 12.531,20.847C12.536,20.844 12.544,20.84 12.553,20.834C12.573,20.822 12.6,20.805 12.635,20.782C12.705,20.738 12.807,20.673 12.934,20.59C13.19,20.422 13.553,20.178 13.987,19.869C14.853,19.251 16.012,18.366 17.176,17.3C18.335,16.237 19.525,14.97 20.431,13.587C21.331,12.21 22,10.644 22,9H20C20,10.106 19.544,11.29 18.757,12.491C17.975,13.686 16.915,14.826 15.824,15.825C14.738,16.821 13.647,17.655 12.826,18.24C12.416,18.533 12.075,18.761 11.839,18.916C11.721,18.994 11.629,19.052 11.567,19.091C11.536,19.111 11.513,19.125 11.498,19.135C11.491,19.139 11.485,19.142 11.482,19.145C11.48,19.146 11.479,19.146 11.479,19.147C11.478,19.147 11.478,19.147 11.478,19.147C11.478,19.147 11.478,19.147 11.478,19.147C11.478,19.147 11.479,19.147 12,20Z"
android:fillColor="#808085"/>
</vector>
22 changes: 22 additions & 0 deletions components/icons/src/main/res/drawable/ic_support_yellow_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M1,13.5C1,11.015 3.015,9 5.5,9H7C7.552,9 8,9.448 8,10V17C8,17.552 7.552,18 7,18H5.5C3.015,18 1,15.985 1,13.5ZM5.5,11C4.119,11 3,12.119 3,13.5C3,14.881 4.119,16 5.5,16H6V11H5.5Z"
android:fillColor="#FFA800"
android:fillType="evenOdd"/>
<path
android:pathData="M23,13.5C23,11.015 20.985,9 18.5,9H17C16.448,9 16,9.448 16,10V17C16,17.552 16.448,18 17,18H18.5C20.985,18 23,15.985 23,13.5ZM18.5,11C19.881,11 21,12.119 21,13.5C21,14.881 19.881,16 18.5,16H18V11H18.5Z"
android:fillColor="#FFA800"
android:fillType="evenOdd"/>
<path
android:pathData="M4,9C4,4.582 7.582,1 12,1C16.418,1 20,4.582 20,9V11H18V9C18,5.686 15.314,3 12,3C8.686,3 6,5.686 6,9V11H4V9Z"
android:fillColor="#FFA800"
android:fillType="evenOdd"/>
<path
android:pathData="M16,20C17.105,20 18,19.105 18,18V17C18,16.448 18.448,16 19,16C19.552,16 20,16.448 20,17L20,18C20,20.209 18.209,22 16,22H15C14.448,22 14,21.552 14,21C14,20.448 14.448,20 15,20H16Z"
android:fillColor="#FFA800"
android:fillType="evenOdd"/>
</vector>
Loading