diff --git a/assets/credits.md b/assets/credits.md new file mode 100644 index 00000000..766be7a6 --- /dev/null +++ b/assets/credits.md @@ -0,0 +1,6 @@ +## InvenTree App Credits +--- + +**Sound Files** + +Some sound files have been sourced from [https://www.zapsplat.com](https://www.zapsplat.com) \ No newline at end of file diff --git a/lib/l10n b/lib/l10n index 77f9c0b0..807a0191 160000 --- a/lib/l10n +++ b/lib/l10n @@ -1 +1 @@ -Subproject commit 77f9c0b023ca0622a60b6e4ee4a44d9c02dc4a03 +Subproject commit 807a0191b4b68a7887ee366dfbe58e2d009207f7 diff --git a/lib/settings/about.dart b/lib/settings/about.dart index 6cde69ad..228ff00b 100644 --- a/lib/settings/about.dart +++ b/lib/settings/about.dart @@ -27,6 +27,16 @@ class InvenTreeAboutWidget extends StatelessWidget { ); } + void _credits(BuildContext context) async { + + String notes = await rootBundle.loadString("assets/credits.md"); + + Navigator.push( + context, + MaterialPageRoute(builder: (context) => CreditsWidget(notes)) + ); + } + @override Widget build(BuildContext context) { @@ -114,6 +124,17 @@ class InvenTreeAboutWidget extends StatelessWidget { ) ); + tiles.add( + ListTile( + title: Text(I18N.of(context).credits), + subtitle: Text("Additional app credits"), + leading: FaIcon(FontAwesomeIcons.bullhorn), + onTap: () { + _credits(context); + } + ) + ); + return Scaffold( appBar: AppBar( title: Text(I18N.of(context).appAbout), diff --git a/lib/settings/release.dart b/lib/settings/release.dart index df5c6099..e5b2c513 100644 --- a/lib/settings/release.dart +++ b/lib/settings/release.dart @@ -24,4 +24,25 @@ class ReleaseNotesWidget extends StatelessWidget { ) ); } +} + + +class CreditsWidget extends StatelessWidget { + + final String credits; + + CreditsWidget(this.credits); + + @override + Widget build (BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text(I18N.of(context).credits), + ), + body: Markdown( + selectable: false, + data: credits + ) + ); + } } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 8fadc6d5..a8a39b90 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -64,6 +64,7 @@ flutter: assets: - assets/image/icon.png - assets/release_notes.md + - assets/credits.md - assets/sounds/barcode_scan.mp3 - assets/sounds/barcode_error.mp3 - assets/sounds/server_error.mp3