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",
|
"clientAddedSuccessfully": "Client added to the list successfully",
|
||||||
"addingClient": "Adding client...",
|
"addingClient": "Adding client...",
|
||||||
"clientNotAdded": "Client could not be added to the list",
|
"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",
|
"clientAddedSuccessfully": "Cliente añadido a la lista satisfactoriamente",
|
||||||
"addingClient": "Añadiendo cliente...",
|
"addingClient": "Añadiendo cliente...",
|
||||||
"clientNotAdded": "El cliente no se pudo añadir a la lista",
|
"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 'dart:convert';
|
||||||
|
|
||||||
import 'package:adguard_home_manager/screens/app_logs/app_log_details_modal.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:provider/provider.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';
|
import 'package:adguard_home_manager/providers/app_config_provider.dart';
|
||||||
|
|
||||||
|
@ -22,8 +24,8 @@ class AppLogs extends StatelessWidget {
|
||||||
ClipboardData(text: jsonEncode(logsString))
|
ClipboardData(text: jsonEncode(logsString))
|
||||||
);
|
);
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
const SnackBar(
|
SnackBar(
|
||||||
content: Text("Logs copied to the clipboard"),
|
content: Text(AppLocalizations.of(context)!.logsCopiedClipboard),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -31,14 +33,14 @@ class AppLogs extends StatelessWidget {
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text("Logs"),
|
title: Text(AppLocalizations.of(context)!.logs),
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: appConfigProvider.logs.isNotEmpty
|
onPressed: appConfigProvider.logs.isNotEmpty
|
||||||
? copyLogsClipboard
|
? copyLogsClipboard
|
||||||
: null,
|
: null,
|
||||||
icon: const Icon(Icons.share),
|
icon: const Icon(Icons.share),
|
||||||
tooltip: "Copy logs to clipboard",
|
tooltip: AppLocalizations.of(context)!.copyLogsClipboard,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
],
|
],
|
||||||
|
@ -61,10 +63,10 @@ class AppLogs extends StatelessWidget {
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
: const Center(
|
: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"No saved logs",
|
AppLocalizations.of(context)!.noSavedLogs,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
),
|
),
|
||||||
|
|
|
@ -9,6 +9,7 @@ class CustomListTile extends StatelessWidget {
|
||||||
final void Function()? onDoubleTap;
|
final void Function()? onDoubleTap;
|
||||||
final Widget? trailing;
|
final Widget? trailing;
|
||||||
final EdgeInsets? padding;
|
final EdgeInsets? padding;
|
||||||
|
final bool? disableRipple;
|
||||||
|
|
||||||
const CustomListTile({
|
const CustomListTile({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -19,7 +20,8 @@ class CustomListTile extends StatelessWidget {
|
||||||
this.onTap,
|
this.onTap,
|
||||||
this.onDoubleTap,
|
this.onDoubleTap,
|
||||||
this.trailing,
|
this.trailing,
|
||||||
this.padding
|
this.padding,
|
||||||
|
this.disableRipple
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -29,6 +31,9 @@ class CustomListTile extends StatelessWidget {
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
onDoubleTap: onDoubleTap,
|
onDoubleTap: onDoubleTap,
|
||||||
|
splashFactory: disableRipple == true
|
||||||
|
? NoSplash.splashFactory
|
||||||
|
: null,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: padding ?? const EdgeInsets.symmetric(
|
padding: padding ?? const EdgeInsets.symmetric(
|
||||||
vertical: 10,
|
vertical: 10,
|
||||||
|
|
|
@ -81,13 +81,14 @@ class Settings extends StatelessWidget {
|
||||||
CustomListTile(
|
CustomListTile(
|
||||||
label: AppLocalizations.of(context)!.appVersion,
|
label: AppLocalizations.of(context)!.appVersion,
|
||||||
description: appConfigProvider.getAppInfo!.version,
|
description: appConfigProvider.getAppInfo!.version,
|
||||||
|
onDoubleTap: () => Navigator.of(context).push(
|
||||||
|
MaterialPageRoute(builder: (context) => const AppLogs())
|
||||||
|
),
|
||||||
|
disableRipple: true,
|
||||||
),
|
),
|
||||||
CustomListTile(
|
CustomListTile(
|
||||||
label: AppLocalizations.of(context)!.createdBy,
|
label: AppLocalizations.of(context)!.createdBy,
|
||||||
description: "JGeek00",
|
description: "JGeek00",
|
||||||
onDoubleTap: () => Navigator.of(context).push(
|
|
||||||
MaterialPageRoute(builder: (context) => const AppLogs())
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue