Add donation link

This commit is contained in:
Ming Ming 2022-05-17 19:27:23 +08:00
parent f4c588fd9e
commit c6a21ee606
4 changed files with 23 additions and 0 deletions

View file

@ -14,3 +14,5 @@ const editPhotosUrl = "https://bit.ly/3v82oKA";
const collectionTypesUrl = "https://bit.ly/3OwSiNq";
const contributorsUrl = "https://bit.ly/3QhlQQs";
const videoPreviewUrl = "https://bit.ly/4c7cazP";
const donateUrl = "https://bit.ly/3wQOHPZ";

View file

@ -1532,6 +1532,10 @@
},
"fileNotFound": "File not found",
"donationTitle": "Buy me a coffee",
"donationButtonLabel": "BUY ME A COFFEE",
"donationShortMessage": "Want to help?",
"errorUnauthenticated": "Unauthenticated access. Please sign-in again if the problem continues",
"@errorUnauthenticated": {
"description": "Error message when server responds with HTTP401"

View file

@ -74,6 +74,15 @@ class Changelog extends StatelessWidget {
Widget _buildContent(BuildContext context) {
return Column(
children: [
_ChangelogBanner(
title: Text(L10n.global().donationShortMessage),
action: TextButton(
onPressed: () {
launch(help_util.donateUrl);
},
child: Text(L10n.global().donationButtonLabel),
),
),
Expanded(
child: ListView.builder(
itemCount: _changelogs.length,

View file

@ -6,6 +6,7 @@ import 'package:logging/logging.dart';
import 'package:nc_photos/app_localizations.dart';
import 'package:nc_photos/controller/pref_controller.dart';
import 'package:nc_photos/debug_util.dart';
import 'package:nc_photos/help_utils.dart' as help_util;
import 'package:nc_photos/k.dart' as k;
import 'package:nc_photos/language_util.dart' as language_util;
import 'package:nc_photos/mobile/platform.dart'
@ -138,6 +139,13 @@ class _SettingsState extends State<Settings> {
}
},
),
ListTile(
leading: const Icon(Icons.coffee_outlined),
title: Text(L10n.global().donationTitle),
onTap: () {
launch(help_util.donateUrl);
},
),
ListTile(
title: Text(L10n.global().settingsSourceCodeTitle),
onTap: () {