From 757a86852c9c0a86a01566557fa3ebc984dad308 Mon Sep 17 00:00:00 2001 From: Cuong-Tran Date: Wed, 28 May 2025 18:30:47 +0700 Subject: [PATCH] Buy Me a Coffee (#953) * Update expired Discord link * Buy me a coffee * Refactor * move it down --- .github/FUNDING.yml | 15 ++++ CODE_OF_CONDUCT.md | 2 +- CONTRIBUTING.md | 2 +- README.md | 19 ++--- .../eu/kanade/presentation/more/MoreScreen.kt | 40 +++++++++++ .../more/settings/screen/about/AboutScreen.kt | 2 +- app/src/main/res/drawable/ic_bmc_button.xml | 71 +++++++++++++++++++ .../kotlin/tachiyomi/core/common/Constants.kt | 2 + 8 files changed, 142 insertions(+), 11 deletions(-) create mode 100644 .github/FUNDING.yml create mode 100644 app/src/main/res/drawable/ic_bmc_button.xml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..c3cf749b9 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,15 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +polar: # Replace with a single Polar username +buy_me_a_coffee: cuongtrantm +thanks_dev: # Replace with a single thanks.dev username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6c1d94a44..1508eb4b2 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -60,7 +60,7 @@ representative at an online or offline event. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community moderators responsible for enforcement at -the [Discord server](https://discord.gg/Nft8MxpR). +the [Discord server](https://discord.gg/85jB7V5AJR). All complaints will be reviewed and investigated promptly and fairly. All community moderators are obligated to respect the privacy and security of the diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7679060a3..880a994b3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,7 @@ Before you start, please note that the ability to use following technologies is ## Getting help -- Join [the Discord server](https://discord.gg/Nft8MxpR) for online help and to ask questions while developing. +- Join [the Discord server](https://discord.gg/85jB7V5AJR) for online help and to ask questions while developing. # Translations diff --git a/README.md b/README.md index f10c88341..904b2df80 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ *Requires Android 8.0 or higher.* -[![Discord](https://img.shields.io/discord/1195734228319617024.svg?label=&labelColor=6A7EC2&color=7389D8&logo=discord&logoColor=FFFFFF)](https://discord.gg/Nft8MxpR) +[![Discord](https://img.shields.io/discord/1195734228319617024.svg?label=&labelColor=6A7EC2&color=7389D8&logo=discord&logoColor=FFFFFF)](https://discord.gg/85jB7V5AJR) [![CI](https://img.shields.io/github/actions/workflow/status/komikku-app/komikku/build_push.yml?labelColor=27303D&label=CI)](https://github.com/komikku-app/komikku/actions/workflows/build_push.yml) [![License: Apache-2.0](https://img.shields.io/github/license/komikku-app/komikku?labelColor=27303D&color=0877d2)](/LICENSE) [![Translation status](https://img.shields.io/weblate/progress/komikku-app?labelColor=27303D&color=946300)](https://hosted.weblate.org/engage/komikku-app/) @@ -19,6 +19,11 @@ A free and open source manga reader which is based off TachiyomiSY & Mihon/Tachi ![screenshots of app](./.github/readme-images/screens.png) +
+Buy me a coffee + +
+ ## Features ### Komikku's unique features: @@ -121,8 +126,10 @@ Pull requests are welcome. For major changes, please open an issue first to disc
Issues +[Website](https://komikku-app.github.io/) + 1. **Before reporting a new issue, take a look at the [FAQ](https://mihon.app/docs/faq/general), the [changelog](https://github.com/komikku-app/komikku/releases) and the already opened [issues](https://github.com/komikku-app/komikku/issues).** -2. If you are unsure, ask here: [![Discord](https://img.shields.io/discord/1195734228319617024.svg?label=&labelColor=6A7EC2&color=7389D8&logo=discord&logoColor=FFFFFF)](https://discord.gg/Nft8MxpR) +2. If you are unsure, ask here: [![Discord](https://img.shields.io/discord/1195734228319617024.svg?label=&labelColor=6A7EC2&color=7389D8&logo=discord&logoColor=FFFFFF)](https://discord.gg/85jB7V5AJR)
@@ -164,16 +171,12 @@ Thank you to all the people who have contributed! Komikku app contributors +![Visitor Count](https://count.getloli.com/get/@komikku-app?theme=capoo-2) + ### Disclaimer The developer(s) of this application does not have any affiliation with the content providers available, and this application hosts zero content. -## FAQ - -* Komikku [website](https://komikku-app.github.io/) / [Discord](https://discord.gg/85jB7V5AJR) - -* Mihon [website](https://mihon.app/) / [Discord](https://discord.gg/Nft8MxpR) - ## License Copyright 2015 Javier Tomás diff --git a/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt b/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt index 830563a2f..653c9d09b 100644 --- a/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/MoreScreen.kt @@ -3,6 +3,10 @@ package eu.kanade.presentation.more import androidx.compose.animation.graphics.res.animatedVectorResource import androidx.compose.animation.graphics.res.rememberAnimatedVectorPainter import androidx.compose.animation.graphics.vector.AnimatedImageVector +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.outlined.HelpOutline import androidx.compose.material.icons.automirrored.outlined.Label @@ -16,13 +20,23 @@ import androidx.compose.material.icons.outlined.QueryStats import androidx.compose.material.icons.outlined.Settings import androidx.compose.material.icons.outlined.Storage import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.Icon import androidx.compose.runtime.Composable import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.rememberVectorPainter +import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalUriHandler +import androidx.compose.ui.res.vectorResource +import androidx.compose.ui.unit.dp import eu.kanade.presentation.more.settings.widget.SwitchPreferenceWidget import eu.kanade.presentation.more.settings.widget.TextPreferenceWidget import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.more.DownloadQueueState +import eu.kanade.tachiyomi.util.system.openInBrowser import exh.pref.DelegateSourcePreferences import tachiyomi.core.common.Constants import tachiyomi.domain.UnsortedPreferences @@ -215,6 +229,32 @@ fun MoreScreen( onPreferenceClick = { uriHandler.openUri(Constants.URL_HELP) }, ) } + // KMK --> + item { + Sponsor() + } + // KMK <-- } } } + +// KMK --> +@Composable +fun Sponsor() { + val context = LocalContext.current + Column( + modifier = Modifier.fillMaxWidth() + .padding(16.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + val painter = rememberVectorPainter(ImageVector.vectorResource(R.drawable.ic_bmc_button)) + Icon( + painter = painter, + contentDescription = "Buy me a coffee", + tint = Color.Unspecified, + modifier = Modifier + .clickable { context.openInBrowser(Constants.URL_BUY_ME_A_COFFEE) }, + ) + } +} +// KMK <-- diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/about/AboutScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/about/AboutScreen.kt index 48df38d35..6cbd058a1 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/about/AboutScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/about/AboutScreen.kt @@ -265,7 +265,7 @@ class AboutScreen : Screen() { LinkIcon( label = "Discord", icon = CustomIcons.Discord, - url = "https://discord.gg/Nft8MxpR", + url = "https://discord.gg/85jB7V5AJR", ) // LinkIcon( // label = "X", diff --git a/app/src/main/res/drawable/ic_bmc_button.xml b/app/src/main/res/drawable/ic_bmc_button.xml new file mode 100644 index 000000000..938f63440 --- /dev/null +++ b/app/src/main/res/drawable/ic_bmc_button.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/common/src/main/kotlin/tachiyomi/core/common/Constants.kt b/core/common/src/main/kotlin/tachiyomi/core/common/Constants.kt index c96422bae..4ebae412a 100644 --- a/core/common/src/main/kotlin/tachiyomi/core/common/Constants.kt +++ b/core/common/src/main/kotlin/tachiyomi/core/common/Constants.kt @@ -1,6 +1,8 @@ package tachiyomi.core.common object Constants { + const val URL_BUY_ME_A_COFFEE = "https://buymeacoffee.com/cuongtrantm" + const val URL_HELP = "https://komikku-app.github.io/docs/guides/troubleshooting/" const val URL_HELP_UPCOMING = "https://komikku-app.github.io/docs/faq/updates/upcoming"