Add Liberapay alongside Ko-fi for donations (#430)
Release — F-Droid repo + Gitea/Codeberg release + Play / detect (push) Successful in 10s
Release — F-Droid repo + Gitea/Codeberg release + Play / release (push) Skipped
Release — F-Droid repo + Gitea/Codeberg release + Play / play (push) Skipped
Renovate / renovate (push) Successful in 2m1s
Release — F-Droid repo + Gitea/Codeberg release + Play / detect (push) Successful in 10s
Release — F-Droid repo + Gitea/Codeberg release + Play / release (push) Skipped
Release — F-Droid repo + Gitea/Codeberg release + Play / play (push) Skipped
Renovate / renovate (push) Successful in 2m1s
Adds Liberapay as a second donation option next to Ko-fi. - Settings: "Support development" now opens a full-screen picker with Ko-fi (one-off tips) and Liberapay (recurring donations) instead of linking straight to Ko-fi. - README: Liberapay badge next to the Ko-fi badge, plus a short Support section. No issue for this one. Co-authored-by: Jean-Luc Makiola <business@jeanlucmakiola.de> Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/430
This commit is contained in:
1 parent
b2fcc55018
commit
5d10f773ca
3 files changed
+50
-4
No files matched your search
@@ -15,6 +15,7 @@ import androidx.compose.foundation.layout.requiredSize
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Autorenew
|
||||
import androidx.compose.material.icons.filled.Backup
|
||||
import androidx.compose.material.icons.filled.BugReport
|
||||
import androidx.compose.material.icons.filled.Cake
|
||||
@@ -23,6 +24,7 @@ import androidx.compose.material.icons.filled.Code
|
||||
import androidx.compose.material.icons.filled.Favorite
|
||||
import androidx.compose.material.icons.filled.Gavel
|
||||
import androidx.compose.material.icons.filled.Language
|
||||
import androidx.compose.material.icons.filled.LocalCafe
|
||||
import androidx.compose.material.icons.filled.Notifications
|
||||
import androidx.compose.material.icons.filled.Palette
|
||||
import androidx.compose.material.icons.filled.PrivacyTip
|
||||
@@ -56,6 +58,7 @@ import de.jeanlucmakiola.calendula.ui.common.rememberCalendarSlideSpec
|
||||
import de.jeanlucmakiola.calendula.ui.licences.LicencesScreen
|
||||
import de.jeanlucmakiola.floret.components.AboutCard
|
||||
import de.jeanlucmakiola.floret.components.CollapsingScaffold
|
||||
import de.jeanlucmakiola.floret.components.FullScreenPicker
|
||||
import de.jeanlucmakiola.floret.components.GroupedListInset
|
||||
import de.jeanlucmakiola.floret.components.GroupedRow
|
||||
import de.jeanlucmakiola.floret.components.OptionPicker
|
||||
@@ -392,17 +395,46 @@ private fun AboutCard() {
|
||||
)
|
||||
}
|
||||
|
||||
/** "Support development", as the closing row of the About card's group. */
|
||||
/**
|
||||
* "Support development", as the closing row of the About card's group. Opens a
|
||||
* picker of the donation platforms.
|
||||
*/
|
||||
@Composable
|
||||
private fun SupportRow() {
|
||||
val context = LocalContext.current
|
||||
val url = stringResource(R.string.about_support_url)
|
||||
var showPicker by rememberSaveable { mutableStateOf(false) }
|
||||
|
||||
GroupedRow(
|
||||
title = stringResource(R.string.settings_about_support),
|
||||
position = Position.Bottom,
|
||||
leading = { CategoryIcon(Icons.Default.Favorite, ChipAccent.Primary) },
|
||||
onClick = { openUrl(context, url) },
|
||||
onClick = { showPicker = true },
|
||||
)
|
||||
|
||||
if (showPicker) {
|
||||
val kofiUrl = stringResource(R.string.about_support_kofi_url)
|
||||
val liberapayUrl = stringResource(R.string.about_support_liberapay_url)
|
||||
FullScreenPicker(
|
||||
title = stringResource(R.string.settings_about_support),
|
||||
onDismiss = { showPicker = false },
|
||||
predictiveBack = true,
|
||||
) {
|
||||
GroupedRow(
|
||||
title = stringResource(R.string.settings_support_kofi),
|
||||
summary = stringResource(R.string.settings_support_kofi_hint),
|
||||
position = Position.Top,
|
||||
leading = { CategoryIcon(Icons.Default.LocalCafe, ChipAccent.Primary) },
|
||||
onClick = { openUrl(context, kofiUrl) },
|
||||
)
|
||||
GroupedRow(
|
||||
title = stringResource(R.string.settings_support_liberapay),
|
||||
summary = stringResource(R.string.settings_support_liberapay_hint),
|
||||
position = Position.Bottom,
|
||||
leading = { CategoryIcon(Icons.Default.Autorenew, ChipAccent.Primary) },
|
||||
onClick = { openUrl(context, liberapayUrl) },
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -681,6 +681,10 @@
|
||||
<string name="settings_licences_subtitle">The projects Calendula is built on</string>
|
||||
<string name="settings_about_privacy">Privacy policy</string>
|
||||
<string name="settings_about_support">Support development</string>
|
||||
<string name="settings_support_kofi">Ko-fi</string>
|
||||
<string name="settings_support_kofi_hint">One-off tips</string>
|
||||
<string name="settings_support_liberapay">Liberapay</string>
|
||||
<string name="settings_support_liberapay_hint">Recurring donations</string>
|
||||
<string name="settings_about_version">Version %1$s</string>
|
||||
<string name="settings_about_logo_desc">Calendula app icon</string>
|
||||
<string name="settings_report_problem">Report a problem</string>
|
||||
@@ -834,7 +838,8 @@
|
||||
<string name="about_source_url" translatable="false">https://codeberg.org/jlmakiola/calendula</string>
|
||||
<string name="about_license_url" translatable="false">https://codeberg.org/jlmakiola/calendula/src/branch/main/LICENSE</string>
|
||||
<string name="about_privacy_url" translatable="false">https://jeanlucmakiola.de/calendula/privacy</string>
|
||||
<string name="about_support_url" translatable="false">https://ko-fi.com/jeanlucmakiola</string>
|
||||
<string name="about_support_kofi_url" translatable="false">https://ko-fi.com/jeanlucmakiola</string>
|
||||
<string name="about_support_liberapay_url" translatable="false">https://liberapay.com/Jean-Luc_Makiola/donate</string>
|
||||
<string name="about_translate_url" translatable="false">https://weblate.dev.jeanlucmakiola.de/engage/calendula/</string>
|
||||
|
||||
<!-- Crash reporting: a captured report the user can submit, by hand, as a
|
||||
|
||||
Reference in new issue
Block a user