added licenses page

This commit is contained in:
Daniel
2026-01-02 13:25:41 +01:00
parent 5087caf78a
commit 68768434cc
18 changed files with 99 additions and 10 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

@@ -214,8 +214,8 @@ class _SettingsPageState extends State<SettingsPage> {
const SizedBox(height: 24),
_buildSectionTitle(context, localizations.about),
_buyMeACoffeeButton(context, "Buy Me a Coffee"),
_buildLicensesButton(context, state, localizations),
_buildVersionCard(context, state, localizations),
const SizedBox(height: 24),
],
),
@@ -729,4 +729,56 @@ class _SettingsPageState extends State<SettingsPage> {
),
);
}
Widget _buildLicensesButton(
BuildContext context,
SettingsState state,
AppLocalizations localizations,
) {
return Card(
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
elevation: 3,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.0)),
child: InkWell(
borderRadius: BorderRadius.circular(8.0),
onTap: () {
showLicensePage(
context: context,
applicationName: 'Calibre Web Companion',
applicationVersion:
"${state.appVersion ?? ''} (${state.buildNumber ?? ''})",
applicationIcon: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset('assets/icon.png', width: 60, height: 60),
),
useRootNavigator: true,
);
},
child: Padding(
padding: const EdgeInsets.all(16),
child: Row(
children: [
Icon(
Icons.description_outlined,
size: 28,
color: Theme.of(context).colorScheme.secondary,
),
const SizedBox(width: 16),
Expanded(
child: Text(
localizations.licenses,
style: Theme.of(context).textTheme.titleMedium,
),
),
Icon(
Icons.arrow_forward_ios,
size: 16,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
],
),
),
),
);
}
}
+2 -1
View File
@@ -352,5 +352,6 @@
"testing": "Testen...",
"saveCredentials": "Anmeldeinformationen speichern",
"testConnection": "Verbindung testen",
"appendsBookLorePath": "Es wird automatisch '/api/v1/opds' an die BookLore-URL angehängt, falls nicht vorhanden."
"appendsBookLorePath": "Es wird automatisch '/api/v1/opds' an die BookLore-URL angehängt, falls nicht vorhanden.",
"licenses": "Lizenzen"
}
+2 -1
View File
@@ -352,5 +352,6 @@
"testing": "Testing...",
"saveCredentials": "Save Credentials",
"testConnection": "Test Connection",
"appendsBookLorePath": "Appends '/api/v1/opds' to the BookLore URL if not present."
"appendsBookLorePath": "Appends '/api/v1/opds' to the BookLore URL if not present.",
"licenses": "Licenses"
}
+2 -1
View File
@@ -352,5 +352,6 @@
"testing": "Probando...",
"saveCredentials": "Guardar credenciales",
"testConnection": "Probar conexión",
"appendsBookLorePath": "Se añade '/api/v1/opds' automáticamente a la URL de BookLore si no está presente."
"appendsBookLorePath": "Se añade '/api/v1/opds' automáticamente a la URL de BookLore si no está presente.",
"licenses": "Licencias"
}
+3 -1
View File
@@ -118,5 +118,7 @@
"removing": "Eemaldan",
"@removing": {},
"appendsBookLorePath": "BookLore URL-le lisatakse automaatselt '/api/v1/opds', kui see pole olemas.",
"@appendsBookLorePath": {}
"@appendsBookLorePath": {},
"licenses": "Litsentsid",
"@licenses": {}
}
+2 -1
View File
@@ -352,5 +352,6 @@
"testing": "Test en cours...",
"saveCredentials": "Enregistrer les identifiants",
"testConnection": "Tester la connexion",
"appendsBookLorePath": "Ajoute '/api/v1/opds' à l'URL de BookLore si elle n'est pas présente."
"appendsBookLorePath": "Ajoute '/api/v1/opds' à l'URL de BookLore si elle n'est pas présente.",
"licenses": "Licences"
}
+3 -1
View File
@@ -704,5 +704,7 @@
"testConnection": "Testa la Connessione",
"@testConnection": {},
"appendsBookLorePath": "Aggiunge /booklore al percorso di base",
"@appendsBookLorePath": {}
"@appendsBookLorePath": {},
"licenses": "Licenze",
"@licenses": {}
}
+6
View File
@@ -2222,6 +2222,12 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Appends \'/api/v1/opds\' to the BookLore URL if not present.'**
String get appendsBookLorePath;
/// No description provided for @licenses.
///
/// In en, this message translates to:
/// **'Licenses'**
String get licenses;
}
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
+3
View File
@@ -1088,4 +1088,7 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get appendsBookLorePath => 'Es wird automatisch \'/api/v1/opds\' an die BookLore-URL angehängt, falls nicht vorhanden.';
@override
String get licenses => 'Lizenzen';
}
+3
View File
@@ -1088,4 +1088,7 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get appendsBookLorePath => 'Appends \'/api/v1/opds\' to the BookLore URL if not present.';
@override
String get licenses => 'Licenses';
}
+3
View File
@@ -1088,4 +1088,7 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get appendsBookLorePath => 'Se añade \'/api/v1/opds\' automáticamente a la URL de BookLore si no está presente.';
@override
String get licenses => 'Licencias';
}
+3
View File
@@ -1088,4 +1088,7 @@ class AppLocalizationsEt extends AppLocalizations {
@override
String get appendsBookLorePath => 'BookLore URL-le lisatakse automaatselt \'/api/v1/opds\', kui see pole olemas.';
@override
String get licenses => 'Litsentsid';
}
+3
View File
@@ -1088,4 +1088,7 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get appendsBookLorePath => 'Ajoute \'/api/v1/opds\' à l\'URL de BookLore si elle n\'est pas présente.';
@override
String get licenses => 'Licences';
}
+3
View File
@@ -1088,4 +1088,7 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get appendsBookLorePath => 'Aggiunge /booklore al percorso di base';
@override
String get licenses => 'Licenze';
}
+3
View File
@@ -1088,4 +1088,7 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get appendsBookLorePath => 'Adiciona /book/lore ao final da URL do livro';
@override
String get licenses => 'Licenças';
}
+3 -1
View File
@@ -705,5 +705,7 @@
"listView": "Listar",
"@listView": {},
"appendsBookLorePath": "Adiciona /book/lore ao final da URL do livro",
"@appendsBookLorePath": {}
"@appendsBookLorePath": {},
"licenses": "Licenças",
"@licenses": {}
}
+2 -2
View File
@@ -102,8 +102,8 @@ flutter:
generate: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
assets:
- assets/icon.png
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see