mirror of
https://github.com/kalarina-bit/Fogwave.git
synced 2026-11-22 08:06:09 +00:00
Add donation card and move repository links to GitHub
This commit is contained in:
@@ -49,7 +49,8 @@ import cc.skysparkle.fogwave.ui.theme.AppThemeState
|
||||
import cc.skysparkle.fogwave.ui.theme.GeoColors
|
||||
import cc.skysparkle.fogwave.ui.theme.LocalGeoColors
|
||||
|
||||
private const val REPOSITORY_URL = "https://git.skysparkle.cc/kalarina/Fogwave"
|
||||
private const val REPOSITORY_URL = "https://github.com/kalarina-bit/Fogwave"
|
||||
private const val DONATE_URL = "https://ko-fi.com/skysparkle"
|
||||
private const val PRIVACY_POLICY_URL = "https://skysparkle.cc/privacy?lang=en"
|
||||
|
||||
@Composable
|
||||
@@ -64,6 +65,7 @@ fun AboutPanel(modifier: Modifier = Modifier) {
|
||||
verticalArrangement = Arrangement.spacedBy(10.dp)
|
||||
) {
|
||||
AppHeader()
|
||||
SupportCard(onDonate = { context.openUrl(DONATE_URL) })
|
||||
|
||||
SectionLabel(stringResource(R.string.about_appearance))
|
||||
GroupCard {
|
||||
@@ -168,6 +170,57 @@ private fun AppHeader() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Asks for a donation: the app icon, a short note and one button. */
|
||||
@Composable
|
||||
private fun SupportCard(onDonate: () -> Unit) {
|
||||
val colors = LocalGeoColors.current
|
||||
GroupCard(contentPadding = 16.dp) {
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(14.dp)
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.size(44.dp)
|
||||
.clip(RoundedCornerShape(14.dp))
|
||||
.background(colors.primaryContainer),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
AppIcon(resId = R.drawable.ic_fogwave_logo, size = 32.dp)
|
||||
}
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
RowTitle(stringResource(R.string.support_title))
|
||||
RowSubtitle(stringResource(R.string.support_text), maxLines = 4)
|
||||
}
|
||||
}
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.padding(top = 14.dp)
|
||||
.fillMaxWidth()
|
||||
.height(46.dp)
|
||||
.clip(CircleShape)
|
||||
.background(colors.accentLavender)
|
||||
.clickable(
|
||||
onClickLabel = stringResource(R.string.about_open_in_browser),
|
||||
role = Role.Button,
|
||||
onClick = onDonate
|
||||
)
|
||||
.testTag("donate_button"),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp, Alignment.CenterHorizontally)
|
||||
) {
|
||||
AppIcon(resId = R.drawable.ic_heart_fill, tint = colors.onAccentLavender, size = 18.dp)
|
||||
Text(
|
||||
text = stringResource(R.string.support_button),
|
||||
style = MaterialTheme.typography.labelLarge.copy(
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = colors.onAccentLavender
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun StylePicker() {
|
||||
val context = LocalContext.current
|
||||
|
||||
@@ -129,4 +129,7 @@
|
||||
<string name="eq_gain_db">%1$s dB</string>
|
||||
<string name="eq_freq_hz">%1$s Hz</string>
|
||||
<string name="eq_freq_khz">%1$s kHz</string>
|
||||
<string name="support_title">Fogwave unterstützen</string>
|
||||
<string name="support_text">Fogwave ist kostenlos, quelloffen und werbefrei. Wenn dir die App gefällt, hilft eine kleine Spende, das Projekt weiterzuführen.</string>
|
||||
<string name="support_button">Auf Ko-fi spenden</string>
|
||||
</resources>
|
||||
|
||||
@@ -128,4 +128,7 @@
|
||||
<string name="eq_gain_db">%1$s dB</string>
|
||||
<string name="eq_freq_hz">%1$s Hz</string>
|
||||
<string name="eq_freq_khz">%1$s kHz</string>
|
||||
<string name="support_title">Fogwave を応援する</string>
|
||||
<string name="support_text">Fogwave は無料・オープンソースで、広告もありません。気に入っていただけたら、少額の寄付がプロジェクトの継続を支えます。</string>
|
||||
<string name="support_button">Ko-fi で寄付する</string>
|
||||
</resources>
|
||||
|
||||
@@ -131,4 +131,7 @@
|
||||
<string name="eq_gain_db">%1$s dB</string>
|
||||
<string name="eq_freq_hz">%1$s Hz</string>
|
||||
<string name="eq_freq_khz">%1$s kHz</string>
|
||||
<string name="support_title">Paremti Fogwave</string>
|
||||
<string name="support_text">Fogwave nemokama, atvirojo kodo ir be reklamų. Jei programėlė patinka, nedidelė auka padeda projektui gyvuoti.</string>
|
||||
<string name="support_button">Paaukoti per Ko-fi</string>
|
||||
</resources>
|
||||
|
||||
@@ -131,4 +131,7 @@
|
||||
<string name="eq_gain_db">%1$s дБ</string>
|
||||
<string name="eq_freq_hz">%1$s Гц</string>
|
||||
<string name="eq_freq_khz">%1$s кГц</string>
|
||||
<string name="support_title">Поддержать Fogwave</string>
|
||||
<string name="support_text">Fogwave бесплатное, с открытым кодом и без рекламы. Если приложение нравится, небольшое пожертвование помогает проекту развиваться.</string>
|
||||
<string name="support_button">Пожертвовать через Ko-fi</string>
|
||||
</resources>
|
||||
|
||||
@@ -128,4 +128,7 @@
|
||||
<string name="eq_gain_db">%1$s dB</string>
|
||||
<string name="eq_freq_hz">%1$s Hz</string>
|
||||
<string name="eq_freq_khz">%1$s kHz</string>
|
||||
<string name="support_title">支持 Fogwave</string>
|
||||
<string name="support_text">Fogwave 免费、开源且无广告。如果你喜欢它,一笔小小的捐助能帮助项目持续下去。</string>
|
||||
<string name="support_button">通过 Ko-fi 捐助</string>
|
||||
</resources>
|
||||
|
||||
@@ -130,4 +130,7 @@
|
||||
<string name="eq_gain_db">%1$s dB</string>
|
||||
<string name="eq_freq_hz">%1$s Hz</string>
|
||||
<string name="eq_freq_khz">%1$s kHz</string>
|
||||
<string name="support_title">Support Fogwave</string>
|
||||
<string name="support_text">Fogwave is free, open source and has no ads. If you enjoy it, a small donation helps keep the project going.</string>
|
||||
<string name="support_button">Donate on Ko-fi</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user