diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index be75d5c..44d817c 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -660,9 +660,9 @@ "description": "Text displayed as description for report issue button", "context": "Visible in the settings view" }, - "settingsMainDeveloper": "Main Developer", - "@settingsMainDeveloper": { - "description": "Text displayed as description for main developer button", + "settingsLicenses": " Licenses", + "@settingsLicenses": { + "description": "Text displayed as description for licenses button", "context": "Visible in the settings view" }, "settingsVersion": "Ollama App v{version}", diff --git a/lib/settings/about.dart b/lib/settings/about.dart index b5b3a81..854bfc2 100644 --- a/lib/settings/about.dart +++ b/lib/settings/about.dart @@ -123,13 +123,37 @@ class _ScreenSettingsAboutState extends State { mode: LaunchMode.inAppBrowserView, Uri.parse("$repoUrl/issues")); }), - button(AppLocalizations.of(context)!.settingsMainDeveloper, - Icons.developer_board_rounded, () { + button(AppLocalizations.of(context)!.settingsLicenses, + Icons.gavel_rounded, () { selectionHaptic(); - launchUrl( - mode: LaunchMode.inAppBrowserView, - Uri.parse( - repoUrl.substring(0, repoUrl.lastIndexOf('/')))); + String legal = "Copyright 2024 JHubi1"; + Widget icon = const Padding( + padding: EdgeInsets.all(16), + child: ImageIcon(AssetImage("assets/logo512.png"), + size: 48), + ); + if (desktopFeature()) { + showDialog( + context: context, + builder: (context) { + return Dialog( + child: ClipRRect( + borderRadius: BorderRadius.circular(28), + child: LicensePage( + applicationName: "Ollama App", + applicationVersion: currentVersion, + applicationIcon: icon, + applicationLegalese: legal), + )); + }); + } else { + showLicensePage( + context: context, + applicationName: "Ollama App", + applicationVersion: currentVersion, + applicationIcon: icon, + applicationLegalese: legal); + } }), const SizedBox(height: 16) ]), diff --git a/untranslated_messages.json b/untranslated_messages.json index c3704c3..685c551 100644 --- a/untranslated_messages.json +++ b/untranslated_messages.json @@ -16,7 +16,8 @@ "settingsTemporaryFixesNoFixes", "settingsVoiceTtsNotSupported", "settingsVoiceTtsNotSupportedDescription", - "settingsVoiceNotEnabled" + "settingsVoiceNotEnabled", + "settingsLicenses" ], "it": [ @@ -36,7 +37,8 @@ "settingsTemporaryFixesNoFixes", "settingsVoiceTtsNotSupported", "settingsVoiceTtsNotSupportedDescription", - "settingsVoiceNotEnabled" + "settingsVoiceNotEnabled", + "settingsLicenses" ], "tr": [ @@ -56,7 +58,8 @@ "settingsTemporaryFixesNoFixes", "settingsVoiceTtsNotSupported", "settingsVoiceTtsNotSupportedDescription", - "settingsVoiceNotEnabled" + "settingsVoiceNotEnabled", + "settingsLicenses" ], "zh": [ @@ -76,6 +79,7 @@ "settingsTemporaryFixesNoFixes", "settingsVoiceTtsNotSupported", "settingsVoiceTtsNotSupportedDescription", - "settingsVoiceNotEnabled" + "settingsVoiceNotEnabled", + "settingsLicenses" ] }