Add link to mastodon in the about us widgets

This commit is contained in:
Roland Geider
2023-11-19 13:46:02 +01:00
parent bcbfa8ed5e
commit afba3a8cc9
3 changed files with 29 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ If you're not sure if something is a bug or not, feel free to file a bug anyway.
* **Discord:** <https://discord.gg/rPWFv6W>
* **Issue tracker:** <https://github.com/wger-project/flutter/issues>
* **Twitter:** <https://twitter.com/wger_project>
* **Mastodon:** <https://fosstodon.org/@wger>
## License

View File

@@ -463,6 +463,14 @@
"@aboutContactUsText": {
"description": "Text for contact us section in the about dialog"
},
"aboutMastodonTitle": "Mastodon",
"@aboutMastodonTitle": {
"description": "Title for mastodon section in the about dialog"
},
"aboutMastodonText": "Follow us on mastodon for updates and news about the project",
"@aboutMastodonText": {
"description": "Text for the mastodon section in the about dialog"
},
"aboutTranslationTitle": "Translation",
"@aboutTranslationTitle": {
"description": "Title for translation section in the about dialog"

View File

@@ -18,12 +18,14 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
import 'package:wger/helpers/misc.dart';
import 'package:wger/providers/auth.dart';
class AboutPage extends StatefulWidget {
static String routeName = '/AboutPage';
const AboutPage({Key? key}) : super(key: key);
@override
@@ -124,7 +126,7 @@ class _AboutPageState extends State<AboutPage> {
),
const SizedBox(height: 10),
ListTile(
leading: const Icon(Icons.chat),
leading: const Icon(FontAwesomeIcons.discord),
title: Text(AppLocalizations.of(context).aboutContactUsTitle),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -140,6 +142,23 @@ class _AboutPageState extends State<AboutPage> {
onTap: () async => launchURL('https://discord.gg/rPWFv6W', context),
),
const SizedBox(height: 10),
ListTile(
leading: const Icon(FontAwesomeIcons.mastodon),
title: Text(AppLocalizations.of(context).aboutMastodonTitle),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(AppLocalizations.of(context).aboutMastodonText),
const Text(
'https://fosstodon.org/@wger',
style: TextStyle(color: Colors.blue),
),
],
),
contentPadding: EdgeInsets.zero,
onTap: () async => launchURL('https://fosstodon.org/@wger', context),
),
const SizedBox(height: 10),
ListTile(
leading: const Icon(Icons.translate),
title: Text(AppLocalizations.of(context).aboutTranslationTitle),