Add link to release notes

This commit is contained in:
Hillel Coren 2022-03-20 11:44:03 +02:00
parent e6d40f0b12
commit 630336a374
3 changed files with 13 additions and 1 deletions

View File

@ -43,6 +43,8 @@ const String kFacebookUrl = 'https://www.facebook.com/invoiceninja';
const String kYouTubeUrl = const String kYouTubeUrl =
'https://www.youtube.com/channel/UCXAHcBvhW05PDtWYIq7WDFA/videos'; 'https://www.youtube.com/channel/UCXAHcBvhW05PDtWYIq7WDFA/videos';
const String kReleaseNotesUrl =
'https://github.com/invoiceninja/invoiceninja/wiki/Release-notes';
const String kDocsUrl = 'https://invoiceninja.github.io/docs'; const String kDocsUrl = 'https://invoiceninja.github.io/docs';
const String kDocsCustomDomainUrl = const String kDocsCustomDomainUrl =
'https://invoiceninja.github.io/docs/hosted-custom-domain'; 'https://invoiceninja.github.io/docs/hosted-custom-domain';

View File

@ -113,7 +113,12 @@ class _UpdateDialogState extends State<UpdateDialog> {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
), ),
if (!account.isUpdateAvailable) if (account.isUpdateAvailable)
TextButton(
child: Text(localization.releaseNotes.toUpperCase()),
onPressed: () => launch(kReleaseNotesUrl),
)
else
TextButton( TextButton(
child: Text(localization.viewChanges.toUpperCase()), child: Text(localization.viewChanges.toUpperCase()),
onPressed: () => launch(kGitHubDiffUrl.replaceFirst( onPressed: () => launch(kGitHubDiffUrl.replaceFirst(

View File

@ -16,6 +16,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = { static final Map<String, Map<String, String>> _localizedValues = {
'en': { 'en': {
// STARTER: lang key - do not remove comment // STARTER: lang key - do not remove comment
'release_notes': 'Release Notes',
'upgrade_to_view_reports': 'Upgrade your plan to view reports', 'upgrade_to_view_reports': 'Upgrade your plan to view reports',
'started_tasks': 'Successfully started :value tasks', 'started_tasks': 'Successfully started :value tasks',
'stopped_tasks': 'Successfully stopped :value tasks', 'stopped_tasks': 'Successfully stopped :value tasks',
@ -74165,6 +74166,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
_localizedValues[localeCode]['upgrade_to_view_reports'] ?? _localizedValues[localeCode]['upgrade_to_view_reports'] ??
_localizedValues['en']['upgrade_to_view_reports']; _localizedValues['en']['upgrade_to_view_reports'];
String get releaseNotes =>
_localizedValues[localeCode]['release_notes'] ??
_localizedValues['en']['release_notes'];
// STARTER: lang field - do not remove comment // STARTER: lang field - do not remove comment
String lookup(String key) { String lookup(String key) {