diff --git a/lib/features/app_drawer/view/app_drawer.dart b/lib/features/app_drawer/view/app_drawer.dart index 18c523f..1a778a5 100644 --- a/lib/features/app_drawer/view/app_drawer.dart +++ b/lib/features/app_drawer/view/app_drawer.dart @@ -1,3 +1,4 @@ +import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -9,6 +10,7 @@ import 'package:paperless_mobile/features/settings/view/settings_page.dart'; import 'package:paperless_mobile/generated/l10n/app_localizations.dart'; import 'package:url_launcher/link.dart'; +import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher_string.dart'; class AppDrawer extends StatelessWidget { @@ -42,7 +44,10 @@ class AppDrawer extends StatelessWidget { leading: const Icon(Icons.bug_report_outlined), title: Text(S.of(context)!.reportABug), onTap: () { - launchUrlString('https://github.com/astubenbord/paperless-mobile/issues/new'); + launchUrlString( + 'https://github.com/astubenbord/paperless-mobile/issues/new', + mode: LaunchMode.externalApplication, + ); }, ), ListTile( @@ -55,9 +60,21 @@ class AppDrawer extends StatelessWidget { height: 24, ), ), - title: Text(S.of(context)!.donateCoffee), + title: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(S.of(context)!.donateCoffee), + Icon( + Icons.open_in_new, + size: 16, + ) + ], + ), onTap: () { - launchUrlString("https://www.buymeacoffee.com/astubenbord"); + launchUrlString( + "https://www.buymeacoffee.com/astubenbord", + mode: LaunchMode.externalApplication, + ); }, ), ListTile( @@ -91,14 +108,30 @@ class AppDrawer extends StatelessWidget { applicationVersion: packageInfo.version + '+' + packageInfo.buildNumber, children: [ Text(S.of(context)!.developedBy('Anton Stubenbord')), - Link( - uri: Uri.parse('https://github.com/astubenbord/paperless-mobile'), - builder: (context, followLink) => GestureDetector( - onTap: followLink, - child: Text( - 'https://github.com/astubenbord/paperless-mobile', - style: TextStyle(color: Theme.of(context).colorScheme.tertiary), - ), + const SizedBox(height: 16), + Text( + "Source Code", + style: Theme.of(context).textTheme.titleMedium, + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: S.of(context)!.findTheSourceCodeOn, + ), + TextSpan( + text: ' GitHub', + style: const TextStyle(color: Colors.blue), + recognizer: TapGestureRecognizer() + ..onTap = () { + launchUrlString( + 'https://github.com/astubenbord/paperless-mobile', + mode: LaunchMode.externalApplication, + ); + }, + ), + const TextSpan(text: '.'), + ], ), ), const SizedBox(height: 16), @@ -112,22 +145,41 @@ class AppDrawer extends StatelessWidget { } Widget _buildOnboardingImageCredits() { - return Link( - uri: Uri.parse( - 'https://www.freepik.com/free-vector/business-team-working-cogwheel-mechanism-together_8270974.htm#query=setting&position=4&from_view=author'), - builder: (context, followLink) => Wrap( + return RichText( + text: TextSpan( children: [ - const Text('Onboarding images by '), - GestureDetector( - onTap: followLink, - child: Text( - 'pch.vector', - style: TextStyle(color: Theme.of(context).colorScheme.tertiary), - ), + TextSpan( + text: 'Onboarding images by ', + ), + TextSpan( + text: 'pch.vector', + style: TextStyle(color: Colors.blue), + recognizer: TapGestureRecognizer() + ..onTap = () { + launchUrlString( + 'https://www.freepik.com/free-vector/business-team-working-cogwheel-mechanism-together_8270974.htm#query=setting&position=4&from_view=author'); + }, + ), + TextSpan( + text: ' on Freepik.', ), - const Text(' on Freepik.') ], ), ); } } + +//Wrap( + // children: [ + // const Text('Onboarding images by '), + // GestureDetector( + // onTap: followLink, + // child: RichText( + + // 'pch.vector', + // style: TextStyle(color: Colors.blue), + // ), + // ), + // const Text(' on Freepik.') + // ], + // ) diff --git a/lib/l10n/intl_ca.arb b/lib/l10n/intl_ca.arb index cd2817f..471bc5e 100644 --- a/lib/l10n/intl_ca.arb +++ b/lib/l10n/intl_ca.arb @@ -1,5 +1,5 @@ { - "developedBy": "Desenvolupat per {name}", + "developedBy": "Desenvolupat per {name}.", "@developedBy": { "placeholders": { "name": {} @@ -761,5 +761,10 @@ "switchToNewAccount": "Vols canviar al nou compte? Pots canviar en qualsevol moment.", "@switchToNewAccount": { "description": "Content of the dialog shown after adding an account, asking the user whether to switch to the newly added account or not." + }, + "sourceCode": "Source Code", + "findTheSourceCodeOn": "Find the source code on", + "@findTheSourceCodeOn": { + "description": "Text before link to Paperless Mobile GitHub" } } \ No newline at end of file diff --git a/lib/l10n/intl_cs.arb b/lib/l10n/intl_cs.arb index a3233cc..6fecad7 100644 --- a/lib/l10n/intl_cs.arb +++ b/lib/l10n/intl_cs.arb @@ -1,5 +1,5 @@ { - "developedBy": "Vyvíjí {name}", + "developedBy": "Vyvíjí {name}.", "@developedBy": { "placeholders": { "name": {} @@ -761,5 +761,10 @@ "switchToNewAccount": "Do you want to switch to the new account? You can switch back at any time.", "@switchToNewAccount": { "description": "Content of the dialog shown after adding an account, asking the user whether to switch to the newly added account or not." + }, + "sourceCode": "Source Code", + "findTheSourceCodeOn": "Find the source code on", + "@findTheSourceCodeOn": { + "description": "Text before link to Paperless Mobile GitHub" } } \ No newline at end of file diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index 5cfa63a..f1251bc 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -1,5 +1,5 @@ { - "developedBy": "Entwickelt von {name}", + "developedBy": "Entwickelt von {name}.", "@developedBy": { "placeholders": { "name": {} @@ -761,5 +761,10 @@ "switchToNewAccount": "Möchtest du zum neuen Account wechseln? Du kannst jederzeit zurückwechseln.", "@switchToNewAccount": { "description": "Content of the dialog shown after adding an account, asking the user whether to switch to the newly added account or not." + }, + "sourceCode": "Source Code", + "findTheSourceCodeOn": "Finde den Code auf", + "@findTheSourceCodeOn": { + "description": "Text before link to Paperless Mobile GitHub" } } \ No newline at end of file diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 110c5d0..c0a9d2b 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -1,5 +1,5 @@ { - "developedBy": "Developed by {name}", + "developedBy": "Developed by {name}.", "@developedBy": { "placeholders": { "name": {} @@ -761,5 +761,10 @@ "switchToNewAccount": "Do you want to switch to the new account? You can switch back at any time.", "@switchToNewAccount": { "description": "Content of the dialog shown after adding an account, asking the user whether to switch to the newly added account or not." + }, + "sourceCode": "Source Code", + "findTheSourceCodeOn": "Find the source code on", + "@findTheSourceCodeOn": { + "description": "Text before link to Paperless Mobile GitHub" } } \ No newline at end of file diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index 745b1ab..acdc5f5 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -1,5 +1,5 @@ { - "developedBy": "Développé par {name}", + "developedBy": "Développé par {name}.", "@developedBy": { "placeholders": { "name": {} @@ -761,5 +761,10 @@ "switchToNewAccount": "Do you want to switch to the new account? You can switch back at any time.", "@switchToNewAccount": { "description": "Content of the dialog shown after adding an account, asking the user whether to switch to the newly added account or not." + }, + "sourceCode": "Source Code", + "findTheSourceCodeOn": "Find the source code on", + "@findTheSourceCodeOn": { + "description": "Text before link to Paperless Mobile GitHub" } } \ No newline at end of file diff --git a/lib/l10n/intl_pl.arb b/lib/l10n/intl_pl.arb index d715ccb..e06d3ff 100644 --- a/lib/l10n/intl_pl.arb +++ b/lib/l10n/intl_pl.arb @@ -1,5 +1,5 @@ { - "developedBy": "Stworzone przez {name}", + "developedBy": "Stworzone przez {name}.", "@developedBy": { "placeholders": { "name": {} @@ -761,5 +761,10 @@ "switchToNewAccount": "Do you want to switch to the new account? You can switch back at any time.", "@switchToNewAccount": { "description": "Content of the dialog shown after adding an account, asking the user whether to switch to the newly added account or not." + }, + "sourceCode": "Source Code", + "findTheSourceCodeOn": "Find the source code on", + "@findTheSourceCodeOn": { + "description": "Text before link to Paperless Mobile GitHub" } } \ No newline at end of file diff --git a/lib/l10n/intl_ru.arb b/lib/l10n/intl_ru.arb index 771e24c..8269f2b 100644 --- a/lib/l10n/intl_ru.arb +++ b/lib/l10n/intl_ru.arb @@ -1,5 +1,5 @@ { - "developedBy": "Разработано {name}", + "developedBy": "Разработано {name}.", "@developedBy": { "placeholders": { "name": {} @@ -761,5 +761,10 @@ "switchToNewAccount": "Do you want to switch to the new account? You can switch back at any time.", "@switchToNewAccount": { "description": "Content of the dialog shown after adding an account, asking the user whether to switch to the newly added account or not." + }, + "sourceCode": "Source Code", + "findTheSourceCodeOn": "Find the source code on", + "@findTheSourceCodeOn": { + "description": "Text before link to Paperless Mobile GitHub" } } \ No newline at end of file diff --git a/lib/l10n/intl_tr.arb b/lib/l10n/intl_tr.arb index e144a80..9941169 100644 --- a/lib/l10n/intl_tr.arb +++ b/lib/l10n/intl_tr.arb @@ -1,5 +1,5 @@ { - "developedBy": "Developed by {name}", + "developedBy": "Developed by {name}.", "@developedBy": { "placeholders": { "name": {} @@ -761,5 +761,10 @@ "switchToNewAccount": "Do you want to switch to the new account? You can switch back at any time.", "@switchToNewAccount": { "description": "Content of the dialog shown after adding an account, asking the user whether to switch to the newly added account or not." + }, + "sourceCode": "Source Code", + "findTheSourceCodeOn": "Find the source code on", + "@findTheSourceCodeOn": { + "description": "Text before link to Paperless Mobile GitHub" } } \ No newline at end of file