Added version number in settings

This commit is contained in:
JHubi1 2024-06-08 17:50:20 +02:00
parent 42fa6b065a
commit 2e1f8c1935
No known key found for this signature in database
GPG Key ID: 7BF82570CBBBD050
2 changed files with 17 additions and 1 deletions

View File

@ -422,5 +422,16 @@
"@settingsMainDeveloper": { "@settingsMainDeveloper": {
"description": "Text displayed as description for main developer button", "description": "Text displayed as description for main developer button",
"context": "Visible in the settings view" "context": "Visible in the settings view"
},
"settingsVersion": "Ollama App v{version}",
"@settingsVersion": {
"description": "Text displayed as description for version",
"context": "Visible in the settings view",
"placeholders": {
"version": {
"type": "String",
"description": "Version number of the app"
}
}
} }
} }

View File

@ -84,6 +84,11 @@ class _ScreenSettingsAboutState extends State<ScreenSettingsAbout> {
Expanded( Expanded(
child: ListView(children: [ child: ListView(children: [
// const SizedBox(height: 16), // const SizedBox(height: 16),
button(
AppLocalizations.of(context)!
.settingsVersion(currentVersion ?? "0.0.1"),
Icons.verified_rounded,
null),
(updateStatus == "notAvailable") (updateStatus == "notAvailable")
? const SizedBox.shrink() ? const SizedBox.shrink()
: button( : button(
@ -160,7 +165,7 @@ class _ScreenSettingsAboutState extends State<ScreenSettingsAbout> {
mode: LaunchMode.inAppBrowserView, mode: LaunchMode.inAppBrowserView,
Uri.parse( Uri.parse(
repoUrl.substring(0, repoUrl.lastIndexOf('/')))); repoUrl.substring(0, repoUrl.lastIndexOf('/'))));
}), })
]), ]),
), ),
const SizedBox(height: 16) const SizedBox(height: 16)