Skip to content

Commit

Permalink
feat(#21): add donation link to about
Browse files Browse the repository at this point in the history
  • Loading branch information
RossComputerGuy committed Jun 15, 2023
1 parent bbfbbc6 commit a4c2a39
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
8 changes: 1 addition & 7 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion i18n/main.arb
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,6 @@
"feedbackViewSettings": "Settings view",
"fullApplicationTitle": "ExpidusOS File Manager",
"settingsTheme": "Theme",
"donationMessage": "Enjoying the app? Please donate."
"donationMessage": "Enjoying the app? Please donate.",
"aboutHeadingFunding": "Donations"
}
3 changes: 2 additions & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,6 @@
"feedbackViewSettings": "Settings view",
"fullApplicationTitle": "ExpidusOS File Manager",
"settingsTheme": "Theme",
"donationMessage": "Enjoying the app? Please donate."
"donationMessage": "Enjoying the app? Please donate.",
"aboutHeadingFunding": "Donations"
}
23 changes: 23 additions & 0 deletions lib/views/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,29 @@ class About extends StatelessWidget {
),
),
),
...((FileManagerApp.getPubSpec(context).unParsedYaml!['funding'] as List<dynamic>).isEmpty ? [] : [
Padding(
padding: const EdgeInsets.only(bottom: 16.0),
child: Text(
AppLocalizations.of(context)!.aboutHeadingFunding,
style: Theme.of(context).textTheme.displayMedium,
),
),
Column(
children: (FileManagerApp.getPubSpec(context).unParsedYaml!['funding'] as List<dynamic>).map((link) =>
ListTile(
tileColor: Theme.of(context).cardTheme.color ?? Theme.of(context).cardColor,
shape: Theme.of(context).cardTheme.shape,
contentPadding: Theme.of(context).cardTheme.margin,
title: Text(
link as String,
style: Theme.of(context).textTheme.labelLarge!.copyWith(color: Theme.of(context).colorScheme.tertiary),
),
onTap: () => launchUrlString(link, mode: LaunchMode.externalApplication),
)
).toList(),
)
]),
Padding(
padding: const EdgeInsets.only(bottom: 16.0),
child: Text(
Expand Down

0 comments on commit a4c2a39

Please sign in to comment.