added licenses page
This commit is contained in:
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -704,5 +704,7 @@
|
||||
"testConnection": "Testa la Connessione",
|
||||
"@testConnection": {},
|
||||
"appendsBookLorePath": "Aggiunge /booklore al percorso di base",
|
||||
"@appendsBookLorePath": {}
|
||||
"@appendsBookLorePath": {},
|
||||
"licenses": "Licenze",
|
||||
"@licenses": {}
|
||||
}
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -1088,4 +1088,7 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get appendsBookLorePath => 'Aggiunge /booklore al percorso di base';
|
||||
|
||||
@override
|
||||
String get licenses => 'Licenze';
|
||||
}
|
||||
|
||||
@@ -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
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user