Add donation card and move repository links to GitHub

This commit is contained in:
2026-11-17 09:41:25 +02:00
parent 8a40e86d73
commit 05d4936c90
14 changed files with 75 additions and 10 deletions
@@ -6,8 +6,10 @@ import android.net.Uri
/** External links of the app, kept in one place. */
object AppLinks {
const val REPOSITORY = "https://git.skysparkle.cc/kalarina/Matewave"
const val REPOSITORY_LABEL = "git.skysparkle.cc/kalarina/Matewave"
const val REPOSITORY = "https://github.com/kalarina-bit/Matewave"
const val REPOSITORY_LABEL = "github.com/kalarina-bit/Matewave"
const val DONATE = "https://ko-fi.com/skysparkle"
const val DONATE_LABEL = "ko-fi.com/skysparkle"
const val PRIVACY_POLICY = "https://skysparkle.cc/privacy?lang=en"
/** Opens a link in the browser; does nothing if no app can open it. */
@@ -178,6 +178,23 @@ fun SettingsScreen(
onClick = { showAbout = true }
)
}
// Donation plaque with the app icon, last on the screen so it never gets in the way
ListGroup {
ListRow(
title = stringResource(R.string.support_title),
subtitle = stringResource(R.string.support_text),
leading = {
Image(
painter = painterResource(R.drawable.ic_launcher_card),
contentDescription = null,
modifier = Modifier.size(36.dp).clip(RoundedCornerShape(10.dp))
)
},
trailing = { cc.skysparkle.matewave.ui.components.AppIcon(R.drawable.ic_heart, size = 22.dp, tint = DonateRed) },
onClick = { cc.skysparkle.matewave.settings.AppLinks.open(context, cc.skysparkle.matewave.settings.AppLinks.DONATE) }
)
}
}
if (showAbout) {
@@ -232,6 +249,12 @@ fun SettingsScreen(
onOpenLicenses()
}
)
AboutRow(
iconRes = R.drawable.ic_heart,
title = stringResource(R.string.support_button),
subtitle = cc.skysparkle.matewave.settings.AppLinks.DONATE_LABEL,
onClick = { cc.skysparkle.matewave.settings.AppLinks.open(context, cc.skysparkle.matewave.settings.AppLinks.DONATE) }
)
AboutRow(
iconRes = R.drawable.ic_repo,
title = stringResource(R.string.settings_repo_title),
@@ -242,6 +265,8 @@ fun SettingsScreen(
}
}
private val DonateRed = Color(0xFFFF6B8A)
@Composable
private fun AboutRow(iconRes: Int, title: String, subtitle: String, onClick: () -> Unit) {
val rowShape = RoundedCornerShape(12.dp)