Skip to content

Commit

Permalink
Add link to mastodon in the about us widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandgeider committed Nov 19, 2023
1 parent bcbfa8e commit afba3a8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
21 changes: 20 additions & 1 deletion lib/widgets/core/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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),
Expand Down

0 comments on commit afba3a8

Please sign in to comment.