From bf8a65fadf1dc2f10781c8e97cf93973d4f401e3 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 9 Apr 2023 00:14:09 +1000 Subject: [PATCH] Update release notes (#302) --- assets/release_notes.md | 1 + lib/settings/release.dart | 20 +++++++++++++++++--- pubspec.yaml | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/assets/release_notes.md b/assets/release_notes.md index 1eed3e45..6a858f7e 100644 --- a/assets/release_notes.md +++ b/assets/release_notes.md @@ -4,6 +4,7 @@ ### 0.11.0 - April 2023 --- +- Major UI updates - [see the documentation](https://docs.inventree.org/en/latest/app/app/) - Adds globally accessible action button for "search" - Adds globally accessible action button for "barcode scan" - Implement context actions using floating actions buttons diff --git a/lib/settings/release.dart b/lib/settings/release.dart index 728a7626..6502a909 100644 --- a/lib/settings/release.dart +++ b/lib/settings/release.dart @@ -10,6 +10,16 @@ class ReleaseNotesWidget extends StatelessWidget { final String releaseNotes; + // Callback function when a link is clicked in the markdown + Future openLink(String url) async { + + final link = Uri.parse(url); + + if (await canLaunchUrl(link)) { + await launchUrl(link); + } + } + @override Widget build (BuildContext context) { return Scaffold( @@ -19,6 +29,12 @@ class ReleaseNotesWidget extends StatelessWidget { body: Markdown( selectable: false, data: releaseNotes, + onTapLink: (url, href, title) { + var link = href ?? ""; + if (link.isNotEmpty) { + openLink(link); + } + }, ) ); } @@ -31,9 +47,7 @@ class CreditsWidget extends StatelessWidget { final String credits; - /* - * Callback function when a link is clicked in the markdown - */ + // Callback function when a link is clicked in the markdown Future openLink(String url) async { final link = Uri.parse(url); diff --git a/pubspec.yaml b/pubspec.yaml index 634682a0..7f8eae90 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: inventree description: InvenTree stock management -version: 0.10.2+57 +version: 0.11.0+58 environment: sdk: ">=2.16.0 <3.0.0"