Add Github sponsors link to about page

This commit is contained in:
MM20
2026-03-06 19:52:34 +01:00
parent 47ee433234
commit 218c1a5d54
3 changed files with 30 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.core.net.toUri
import androidx.lifecycle.viewmodel.compose.viewModel
import androidx.navigation3.runtime.NavKey
import de.mm20.launcher2.licenses.OpenSourceLicenses
@@ -78,6 +79,21 @@ fun AboutSettingsScreen() {
)
}
}
item {
PreferenceCategory(title = stringResource(id = R.string.preference_category_donate)) {
Preference(
icon = R.drawable.favorite_24px,
title = "GitHub Sponsors",
summary = "github.com/sponsors/MM2-0",
onClick = {
context.startActivity(Intent(Intent.ACTION_VIEW).apply {
data = "https://github.com/sponsors/MM2-0".toUri()
})
}
)
}
}
item {
PreferenceCategory(title = stringResource(id = R.string.preference_category_links)) {
Preference(
@@ -86,7 +102,7 @@ fun AboutSettingsScreen() {
summary = "github.com/MM2-0/Kvaesitso",
onClick = {
context.startActivity(Intent(Intent.ACTION_VIEW).apply {
data = Uri.parse("https://github.com/MM2-0/Kvaesitso")
data = "https://github.com/MM2-0/Kvaesitso".toUri()
})
}
)
@@ -96,7 +112,7 @@ fun AboutSettingsScreen() {
summary = "t.me/Kvaesitso",
onClick = {
context.startActivity(Intent(Intent.ACTION_VIEW).apply {
data = Uri.parse("https://t.me/Kvaesitso")
data = "https://t.me/Kvaesitso".toUri()
})
}
)
@@ -107,7 +123,7 @@ fun AboutSettingsScreen() {
onClick = {
context.startActivity(Intent(Intent.ACTION_VIEW).apply {
data =
Uri.parse("https://fdroid.mm20.de")
"https://fdroid.mm20.de".toUri()
})
}
)

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M451.5,808Q437,803 426,792L357,729Q251,632 165.5,536.5Q80,441 80,326Q80,232 143,169Q206,106 300,106Q353,106 400,128.5Q447,151 480,190Q513,151 560,128.5Q607,106 660,106Q754,106 817,169Q880,232 880,326Q880,441 795,537Q710,633 602,730L534,792Q523,803 508.5,808Q494,813 480,813Q466,813 451.5,808ZM442,270Q413,229 380,207.5Q347,186 300,186Q240,186 200,226Q160,266 160,326Q160,378 197,436.5Q234,495 285.5,550Q337,605 391.5,653Q446,701 480,732Q480,732 480,732Q480,732 480,732Q514,701 568.5,653Q623,605 674.5,550Q726,495 763,436.5Q800,378 800,326Q800,266 760,226Q720,186 660,186Q613,186 580,207.5Q547,229 518,270Q511,280 501,285Q491,290 480,290Q469,290 459,285Q449,280 442,270ZM480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Q480,459 480,459Z"/>
</vector>

View File

@@ -1109,4 +1109,5 @@
<string name="typo_preview_medium1">Hamburg</string>
<string name="typo_preview_medium2">Preview</string>
<string name="typo_preview_long">The quick brown fox\njumps over 1234790</string>
<string name="preference_category_donate">Support the development</string>
</resources>