mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-11 08:12:26 +01:00
support: Liberapay only until GitHub Sponsors is approved, and "support" instead of "donate", since giving to the LLC isn't tax-deductible
This commit is contained in:
1 parent
815a75ad6d
commit
35bd239c2f
3 files changed
+7
-20
No files matched your search
@@ -15,9 +15,8 @@ import androidx.compose.runtime.Composable
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
|
||||||
/** Where Gearslip lives outside the app: donations, the chat room, and the code. */
|
/** Where Gearslip lives outside the app: support, the chat room, and the code. */
|
||||||
internal object GearslipLinks {
|
internal object GearslipLinks {
|
||||||
const val SPONSORS = "https://github.com/sponsors/Seb3thehacker"
|
|
||||||
const val LIBERAPAY = "https://liberapay.com/Seb3thehacker"
|
const val LIBERAPAY = "https://liberapay.com/Seb3thehacker"
|
||||||
const val MATRIX = "https://matrix.to/#/!mf0_mgBd5KqKpc9FfX_wHp1jFCcwAtPrndIn_oGIyMk?via=matrix.org"
|
const val MATRIX = "https://matrix.to/#/!mf0_mgBd5KqKpc9FfX_wHp1jFCcwAtPrndIn_oGIyMk?via=matrix.org"
|
||||||
const val SOURCE = "https://github.com/Seb3thehacker/gearslip"
|
const val SOURCE = "https://github.com/Seb3thehacker/gearslip"
|
||||||
@@ -30,7 +29,7 @@ internal object GearslipLinks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The two ways to donate, each opening in the browser. */
|
/** The way to support Gearslip, opening in the browser. */
|
||||||
@Composable
|
@Composable
|
||||||
internal fun DonateRows() {
|
internal fun DonateRows() {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
@@ -41,14 +40,6 @@ internal fun DonateRows() {
|
|||||||
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
SettingsRow(
|
|
||||||
"GitHub Sponsors",
|
|
||||||
Modifier.clickable { GearslipLinks.open(context, GearslipLinks.SPONSORS) },
|
|
||||||
subtitle = "Give once or monthly",
|
|
||||||
icon = Icons.Filled.Favorite,
|
|
||||||
trailing = arrow,
|
|
||||||
)
|
|
||||||
SettingsDivider()
|
|
||||||
SettingsRow(
|
SettingsRow(
|
||||||
"Liberapay",
|
"Liberapay",
|
||||||
Modifier.clickable { GearslipLinks.open(context, GearslipLinks.LIBERAPAY) },
|
Modifier.clickable { GearslipLinks.open(context, GearslipLinks.LIBERAPAY) },
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import androidx.compose.material.icons.filled.Favorite
|
|||||||
import androidx.compose.material3.AlertDialog
|
import androidx.compose.material3.AlertDialog
|
||||||
import androidx.compose.material3.Button
|
import androidx.compose.material3.Button
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.OutlinedButton
|
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.material3.TextButton
|
import androidx.compose.material3.TextButton
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
@@ -96,17 +95,14 @@ internal fun DonateDialog(live: Boolean) {
|
|||||||
title = { Text("Glad that drive worked") },
|
title = { Text("Glad that drive worked") },
|
||||||
text = {
|
text = {
|
||||||
Text(
|
Text(
|
||||||
"Gearslip is free, with no ads and no tracking. If it gets you on the road, a " +
|
"Gearslip is free, with no ads and no tracking. If it gets you on the road, your " +
|
||||||
"donation keeps it going.",
|
"support keeps it going.",
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
confirmButton = {
|
confirmButton = {
|
||||||
Column(Modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
Column(Modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||||
Button(onClick = { give(GearslipLinks.SPONSORS) }, Modifier.fillMaxWidth()) {
|
Button(onClick = { give(GearslipLinks.LIBERAPAY) }, Modifier.fillMaxWidth()) {
|
||||||
Text("Donate on GitHub")
|
Text("Support on Liberapay")
|
||||||
}
|
|
||||||
OutlinedButton(onClick = { give(GearslipLinks.LIBERAPAY) }, Modifier.fillMaxWidth()) {
|
|
||||||
Text("Donate on Liberapay")
|
|
||||||
}
|
}
|
||||||
TextButton(onClick = { DonatePrompt.answer(context, donated = false) }, Modifier.fillMaxWidth()) {
|
TextButton(onClick = { DonatePrompt.answer(context, donated = false) }, Modifier.fillMaxWidth()) {
|
||||||
Text("Not now")
|
Text("Not now")
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ fun SettingsScreen(
|
|||||||
Spacer(Modifier.height(0.dp))
|
Spacer(Modifier.height(0.dp))
|
||||||
SettingsSection(
|
SettingsSection(
|
||||||
"Support Gearslip",
|
"Support Gearslip",
|
||||||
footer = "Gearslip is free, with no ads and no tracking. Donations keep it going.",
|
footer = "Gearslip is free, with no ads and no tracking. Your support keeps it going.",
|
||||||
) { DonateRows() }
|
) { DonateRows() }
|
||||||
ConnectionSection()
|
ConnectionSection()
|
||||||
HelpSection(onOpenHelp, onOpenCarPreview, onOpenLogs)
|
HelpSection(onOpenHelp, onOpenCarPreview, onOpenLogs)
|
||||||
|
|||||||
Reference in new issue
Block a user