mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 14:02:48 +00:00
Added logs screen translations
This commit is contained in:
parent
191bae78bb
commit
a8e7ab80e4
5 changed files with 30 additions and 14 deletions
|
@ -95,5 +95,9 @@
|
|||
"clientAddedSuccessfully": "Client added to the list successfully",
|
||||
"addingClient": "Adding client...",
|
||||
"clientNotAdded": "Client could not be added to the list",
|
||||
"clientAnotherList": "This client is yet in another list"
|
||||
"clientAnotherList": "This client is yet in another list",
|
||||
"noSavedLogs": "No saved logs",
|
||||
"logs": "Logs",
|
||||
"copyLogsClipboard": "Copy logs to clipboard",
|
||||
"logsCopiedClipboard": "Logs copied to clipboard"
|
||||
}
|
|
@ -95,5 +95,9 @@
|
|||
"clientAddedSuccessfully": "Cliente añadido a la lista satisfactoriamente",
|
||||
"addingClient": "Añadiendo cliente...",
|
||||
"clientNotAdded": "El cliente no se pudo añadir a la lista",
|
||||
"clientAnotherList": "El cliente ya está en otra lista"
|
||||
"clientAnotherList": "El cliente ya está en otra lista",
|
||||
"noSavedLogs": "No hay logs guardados",
|
||||
"logs": "Registros",
|
||||
"copyLogsClipboard": "Copiar logs al portapapeles",
|
||||
"logsCopiedClipboard": "Registros copiados al portapapeles"
|
||||
}
|
|
@ -2,10 +2,12 @@
|
|||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:adguard_home_manager/screens/app_logs/app_log_details_modal.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
import 'package:adguard_home_manager/screens/app_logs/app_log_details_modal.dart';
|
||||
|
||||
import 'package:adguard_home_manager/providers/app_config_provider.dart';
|
||||
|
||||
|
@ -22,8 +24,8 @@ class AppLogs extends StatelessWidget {
|
|||
ClipboardData(text: jsonEncode(logsString))
|
||||
);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text("Logs copied to the clipboard"),
|
||||
SnackBar(
|
||||
content: Text(AppLocalizations.of(context)!.logsCopiedClipboard),
|
||||
backgroundColor: Colors.black,
|
||||
)
|
||||
);
|
||||
|
@ -31,14 +33,14 @@ class AppLogs extends StatelessWidget {
|
|||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("Logs"),
|
||||
title: Text(AppLocalizations.of(context)!.logs),
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: appConfigProvider.logs.isNotEmpty
|
||||
? copyLogsClipboard
|
||||
: null,
|
||||
icon: const Icon(Icons.share),
|
||||
tooltip: "Copy logs to clipboard",
|
||||
tooltip: AppLocalizations.of(context)!.copyLogsClipboard,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
],
|
||||
|
@ -61,10 +63,10 @@ class AppLogs extends StatelessWidget {
|
|||
},
|
||||
)
|
||||
)
|
||||
: const Center(
|
||||
: Center(
|
||||
child: Text(
|
||||
"No saved logs",
|
||||
style: TextStyle(
|
||||
AppLocalizations.of(context)!.noSavedLogs,
|
||||
style: const TextStyle(
|
||||
fontSize: 24,
|
||||
color: Colors.grey,
|
||||
),
|
||||
|
|
|
@ -9,6 +9,7 @@ class CustomListTile extends StatelessWidget {
|
|||
final void Function()? onDoubleTap;
|
||||
final Widget? trailing;
|
||||
final EdgeInsets? padding;
|
||||
final bool? disableRipple;
|
||||
|
||||
const CustomListTile({
|
||||
Key? key,
|
||||
|
@ -19,7 +20,8 @@ class CustomListTile extends StatelessWidget {
|
|||
this.onTap,
|
||||
this.onDoubleTap,
|
||||
this.trailing,
|
||||
this.padding
|
||||
this.padding,
|
||||
this.disableRipple
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
@ -29,6 +31,9 @@ class CustomListTile extends StatelessWidget {
|
|||
child: InkWell(
|
||||
onTap: onTap,
|
||||
onDoubleTap: onDoubleTap,
|
||||
splashFactory: disableRipple == true
|
||||
? NoSplash.splashFactory
|
||||
: null,
|
||||
child: Container(
|
||||
padding: padding ?? const EdgeInsets.symmetric(
|
||||
vertical: 10,
|
||||
|
|
|
@ -81,13 +81,14 @@ class Settings extends StatelessWidget {
|
|||
CustomListTile(
|
||||
label: AppLocalizations.of(context)!.appVersion,
|
||||
description: appConfigProvider.getAppInfo!.version,
|
||||
onDoubleTap: () => Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (context) => const AppLogs())
|
||||
),
|
||||
disableRipple: true,
|
||||
),
|
||||
CustomListTile(
|
||||
label: AppLocalizations.of(context)!.createdBy,
|
||||
description: "JGeek00",
|
||||
onDoubleTap: () => Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (context) => const AppLogs())
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue