mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 14:02:48 +00:00
Some UI changes
This commit is contained in:
parent
26d89730ef
commit
4beaa862e9
15 changed files with 244 additions and 141 deletions
|
@ -2,12 +2,14 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
|
||||
Map<String, dynamic> getFilteredStatus(BuildContext context, String filterKey) {
|
||||
Map<String, dynamic> getFilteredStatus(BuildContext context, String filterKey, bool isRow) {
|
||||
switch (filterKey) {
|
||||
case 'NotFilteredNotFound':
|
||||
return {
|
||||
'filtered': false,
|
||||
'label': AppLocalizations.of(context)!.processed,
|
||||
'label': isRow == true
|
||||
? AppLocalizations.of(context)!.processedRow
|
||||
: AppLocalizations.of(context)!.processed,
|
||||
'color': Colors.green,
|
||||
'icon': Icons.verified_user_rounded,
|
||||
};
|
||||
|
@ -15,7 +17,9 @@ Map<String, dynamic> getFilteredStatus(BuildContext context, String filterKey) {
|
|||
case 'NotFilteredWhiteList':
|
||||
return {
|
||||
'filtered': false,
|
||||
'label': AppLocalizations.of(context)!.processedWhitelist,
|
||||
'label': isRow == true
|
||||
? AppLocalizations.of(context)!.processedWhitelistRow
|
||||
: AppLocalizations.of(context)!.processedWhitelist,
|
||||
'color': Colors.green,
|
||||
'icon': Icons.verified_user_rounded,
|
||||
};
|
||||
|
@ -23,7 +27,9 @@ Map<String, dynamic> getFilteredStatus(BuildContext context, String filterKey) {
|
|||
case 'NotFilteredError':
|
||||
return {
|
||||
'filtered': false,
|
||||
'label': AppLocalizations.of(context)!.processedError,
|
||||
'label': isRow == true
|
||||
? AppLocalizations.of(context)!.processedErrorRow
|
||||
: AppLocalizations.of(context)!.processedError,
|
||||
'color': Colors.green,
|
||||
'icon': Icons.verified_user_rounded,
|
||||
};
|
||||
|
@ -31,7 +37,9 @@ Map<String, dynamic> getFilteredStatus(BuildContext context, String filterKey) {
|
|||
case 'FilteredBlackList':
|
||||
return {
|
||||
'filtered': true,
|
||||
'label': AppLocalizations.of(context)!.blockedBlacklist,
|
||||
'label': isRow == true
|
||||
? AppLocalizations.of(context)!.blockedBlacklistRow
|
||||
: AppLocalizations.of(context)!.blockedBlacklist,
|
||||
'color': Colors.red,
|
||||
'icon': Icons.gpp_bad_rounded,
|
||||
};
|
||||
|
@ -39,7 +47,9 @@ Map<String, dynamic> getFilteredStatus(BuildContext context, String filterKey) {
|
|||
case 'FilteredSafeBrowsing':
|
||||
return {
|
||||
'filtered': true,
|
||||
'label': AppLocalizations.of(context)!.blockedSafeBrowsing,
|
||||
'label': isRow == true
|
||||
? AppLocalizations.of(context)!.blockedSafeBrowsingRow
|
||||
: AppLocalizations.of(context)!.blockedSafeBrowsing,
|
||||
'color': Colors.red,
|
||||
'icon': Icons.gpp_bad_rounded,
|
||||
};
|
||||
|
@ -47,7 +57,9 @@ Map<String, dynamic> getFilteredStatus(BuildContext context, String filterKey) {
|
|||
case 'FilteredParental':
|
||||
return {
|
||||
'filtered': true,
|
||||
'label': AppLocalizations.of(context)!.blockedParental,
|
||||
'label': isRow == true
|
||||
? AppLocalizations.of(context)!.blockedParentalRow
|
||||
: AppLocalizations.of(context)!.blockedParental,
|
||||
'color': Colors.red,
|
||||
'icon': Icons.gpp_bad_rounded,
|
||||
};
|
||||
|
@ -55,7 +67,9 @@ Map<String, dynamic> getFilteredStatus(BuildContext context, String filterKey) {
|
|||
case 'FilteredInvalid':
|
||||
return {
|
||||
'filtered': true,
|
||||
'label': AppLocalizations.of(context)!.blockedInvalid,
|
||||
'label': isRow == true
|
||||
? AppLocalizations.of(context)!.blockedInvalidRow
|
||||
: AppLocalizations.of(context)!.blockedInvalid,
|
||||
'color': Colors.red,
|
||||
'icon': Icons.gpp_bad_rounded,
|
||||
};
|
||||
|
@ -63,7 +77,9 @@ Map<String, dynamic> getFilteredStatus(BuildContext context, String filterKey) {
|
|||
case 'FilteredSafeSearch':
|
||||
return {
|
||||
'filtered': true,
|
||||
'label': AppLocalizations.of(context)!.blockedSafeSearch,
|
||||
'label': isRow == true
|
||||
? AppLocalizations.of(context)!.blockedSafeSearchRow
|
||||
: AppLocalizations.of(context)!.blockedSafeSearch,
|
||||
'color': Colors.red,
|
||||
'icon': Icons.gpp_bad_rounded,
|
||||
};
|
||||
|
@ -71,7 +87,9 @@ Map<String, dynamic> getFilteredStatus(BuildContext context, String filterKey) {
|
|||
case 'FilteredBlockedService':
|
||||
return {
|
||||
'filtered': true,
|
||||
'label': AppLocalizations.of(context)!.blockedService,
|
||||
'label': isRow == true
|
||||
? AppLocalizations.of(context)!.blockedServiceRow
|
||||
: AppLocalizations.of(context)!.blockedService,
|
||||
'color': Colors.red,
|
||||
'icon': Icons.gpp_bad_rounded,
|
||||
};
|
||||
|
|
|
@ -109,15 +109,24 @@
|
|||
"restartAppTakeEffect": "Restart the application",
|
||||
"loadingLogs": "Loading logs...",
|
||||
"logsNotLoaded": "Logs list could not be loaded",
|
||||
"processed": "Processed (no list)",
|
||||
"blockedBlacklist": "Blocked (blacklist)",
|
||||
"blockedSafeBrowsing": "Blocked (safe browsing)",
|
||||
"blockedParental": "Blocked (parental filtering)",
|
||||
"blockedInvalid": "Blocked (invalid)",
|
||||
"blockedSafeSearch": "Blocked (safe search)",
|
||||
"blockedService": "Blocked (blocked service)",
|
||||
"processedWhitelist": "Processed (whitelist)",
|
||||
"processedError": "Processed (error)",
|
||||
"processed": "Processed\nNo list",
|
||||
"processedRow": "Processed (no list)",
|
||||
"blockedBlacklist": "Blocked\nBlacklist",
|
||||
"blockedBlacklistRow": "Blocked (blacklist)",
|
||||
"blockedSafeBrowsing": "Blocked\nSafe browsing",
|
||||
"blockedSafeBrowsingRow": "Blocked (safe browsing)",
|
||||
"blockedParental": "Blocked\nParental filtering",
|
||||
"blockedParentalRow": "Blocked (parental filtering)",
|
||||
"blockedInvalid": "Blocked\nInvalid",
|
||||
"blockedInvalidRow": "Blocked (invalid)",
|
||||
"blockedSafeSearch": "Blocked\nSafe search",
|
||||
"blockedSafeSearchRow": "Blocked (safe search)",
|
||||
"blockedService": "Blocked\nBlocked service",
|
||||
"blockedServiceRow": "Blocked (blocked service)",
|
||||
"processedWhitelist": "Processed\nWhitelist",
|
||||
"processedWhitelistRow": "Processed (whitelist)",
|
||||
"processedError": "Processed\nError",
|
||||
"processedErrorRow": "Processed (error)",
|
||||
"rewrite": "Rewrite",
|
||||
"status": "Status",
|
||||
"result": "Result",
|
||||
|
|
|
@ -109,15 +109,24 @@
|
|||
"restartAppTakeEffect": "Reinicia la aplicación para que se apliquen los cambios.",
|
||||
"loadingLogs": "Cargando registros...",
|
||||
"logsNotLoaded": "No se pudieron cargar los registros",
|
||||
"processed": "Procesada (sin lista)",
|
||||
"blockedBlacklist": "Bloqueada (lista negra)",
|
||||
"blockedSafeBrowsing": "Bloqueada (navegación segura)",
|
||||
"blockedParental": "Bloqueada (control parental)",
|
||||
"blockedInvalid": "Bloqueada (inválida)",
|
||||
"blockedSafeSearch": "Bloqueada (búsqueda segura)",
|
||||
"blockedService": "Bloqueada (servicio bloqueado)",
|
||||
"processedWhitelist": "Procesada (lista blanca)",
|
||||
"processedError": "Procesada (error)",
|
||||
"processed": "Procesada\nSin lista",
|
||||
"processedRow": "Procesada (sin lista)",
|
||||
"blockedBlacklist": "Bloqueada\nLista negra",
|
||||
"blockedBlacklistRow": "Bloqueada (lista negra)",
|
||||
"blockedSafeBrowsing": "Bloqueada\nNavegación segura",
|
||||
"blockedSafeBrowsingRow": "Bloqueada (navegación segura)",
|
||||
"blockedParental": "Bloqueada\nCcontrol parental",
|
||||
"blockedParentalRow": "Bloqueada (control parental)",
|
||||
"blockedInvalid": "Bloqueada\nInválida",
|
||||
"blockedInvalidRow": "Bloqueada (inválida)",
|
||||
"blockedSafeSearch": "Bloqueada\nBúsqueda segura",
|
||||
"blockedSafeSearchRow": "Bloqueada (búsqueda segura)",
|
||||
"blockedService": "Bloqueada\nServicio bloqueado",
|
||||
"blockedServiceRow": "Bloqueada (servicio bloqueado)",
|
||||
"processedWhitelist": "Procesada\nLista blanca",
|
||||
"processedWhitelistRow": "Procesada (lista blanca)",
|
||||
"processedError": "Procesada\nError",
|
||||
"processedErrorRow": "Procesada (error)",
|
||||
"rewrite": "Reescrita",
|
||||
"status": "Estado",
|
||||
"result": "Resultado",
|
||||
|
|
|
@ -214,7 +214,13 @@ class _AddedListState extends State<AddedList> {
|
|||
onTap: () => openClientModal(widget.data[index]),
|
||||
title: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 5),
|
||||
child: Text(widget.data[index].name),
|
||||
child: Text(
|
||||
widget.data[index].name,
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.normal
|
||||
),
|
||||
),
|
||||
),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
|
|
@ -51,7 +51,11 @@ class ClientsList extends StatelessWidget {
|
|||
title: Text(
|
||||
data[index].name != ''
|
||||
? data[index].name!
|
||||
: data[index].ip
|
||||
: data[index].ip,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.normal
|
||||
),
|
||||
),
|
||||
subtitle: data[index].name != ''
|
||||
? Text(
|
||||
|
|
|
@ -56,7 +56,7 @@ class _CheckHostModalState extends State<CheckHostModal> {
|
|||
final result = await checkHostFiltered(server: serversProvider.selectedServer!, host: domainController.text);
|
||||
|
||||
if (result['result'] == 'success') {
|
||||
final status = getFilteredStatus(context, result['data']['reason']);
|
||||
final status = getFilteredStatus(context, result['data']['reason'], true);
|
||||
if (mounted) {
|
||||
setState(() => resultWidget = Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
|
|
@ -105,6 +105,16 @@ class _CustomRulesListState extends State<CustomRulesList> {
|
|||
);
|
||||
}
|
||||
|
||||
bool checkIfComment(String value) {
|
||||
final regex = RegExp(r'^(!|#).*$');
|
||||
if (regex.hasMatch(value)) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
switch (widget.loadStatus) {
|
||||
case 0:
|
||||
return SizedBox(
|
||||
|
@ -134,7 +144,17 @@ class _CustomRulesListState extends State<CustomRulesList> {
|
|||
padding: const EdgeInsets.only(top: 0),
|
||||
itemCount: widget.data.length,
|
||||
itemBuilder: (context, index) => ListTile(
|
||||
title: Text(widget.data[index]),
|
||||
title: Text(
|
||||
widget.data[index],
|
||||
style: TextStyle(
|
||||
color: checkIfComment(widget.data[index]) == true
|
||||
? Theme.of(context).brightness == Brightness.light
|
||||
? const Color.fromRGBO(100, 100, 100, 1)
|
||||
: const Color.fromRGBO(200, 200, 200, 1)
|
||||
: null,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
trailing: IconButton(
|
||||
onPressed: () => openRemoveCustomRuleModal(widget.data[index]),
|
||||
icon: const Icon(Icons.delete)
|
||||
|
|
|
@ -34,8 +34,7 @@ class FilterListTile extends StatelessWidget {
|
|||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
|
|
|
@ -12,6 +12,7 @@ import 'package:adguard_home_manager/screens/filters/fab.dart';
|
|||
import 'package:adguard_home_manager/screens/filters/list_details_modal.dart';
|
||||
import 'package:adguard_home_manager/screens/filters/add_list_modal.dart';
|
||||
import 'package:adguard_home_manager/screens/filters/delete_list_modal.dart';
|
||||
import 'package:adguard_home_manager/widgets/custom_list_tile.dart';
|
||||
|
||||
import 'package:adguard_home_manager/services/http_requests.dart';
|
||||
import 'package:adguard_home_manager/functions/snackbar.dart';
|
||||
|
@ -288,53 +289,18 @@ class _FiltersListState extends State<FiltersList> {
|
|||
if (widget.data.isNotEmpty) ListView.builder(
|
||||
padding: const EdgeInsets.only(top: 0),
|
||||
itemCount: widget.data.length,
|
||||
itemBuilder: (context, index) => Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () => openDetailsModal(widget.data[index]),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width-130,
|
||||
child: Text(
|
||||
widget.data[index].name,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 16
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"${intFormat(widget.data[index].rulesCount, Platform.localeName)} ${AppLocalizations.of(context)!.enabledRules}",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).listTileTheme.iconColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
itemBuilder: (context, index) => CustomListTile(
|
||||
title: widget.data[index].name,
|
||||
subtitle: "${intFormat(widget.data[index].rulesCount, Platform.localeName)} ${AppLocalizations.of(context)!.enabledRules}",
|
||||
trailing: Icon(
|
||||
widget.data[index].enabled == true
|
||||
? AppLocalizations.of(context)!.enabled
|
||||
: AppLocalizations.of(context)!.disabled,
|
||||
style: TextStyle(
|
||||
? Icons.check_circle_rounded
|
||||
: Icons.cancel,
|
||||
color: widget.data[index].enabled == true
|
||||
? Colors.green
|
||||
: Colors.red,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
onTap: () => openDetailsModal(widget.data[index]),
|
||||
),
|
||||
),
|
||||
if (widget.data.isEmpty) if (widget.data.isEmpty) SizedBox(
|
||||
|
|
|
@ -130,13 +130,13 @@ class _FilterStatusModalState extends State<FilterStatusModal> {
|
|||
filterStatusListItem(
|
||||
id: "processed",
|
||||
icon: Icons.verified_user_rounded,
|
||||
label: AppLocalizations.of(context)!.processed,
|
||||
label: AppLocalizations.of(context)!.processedRow,
|
||||
onChanged: (value) => setState(() => selectedResultStatus = value!)
|
||||
),
|
||||
filterStatusListItem(
|
||||
id: "whitelisted",
|
||||
icon: Icons.verified_user_rounded,
|
||||
label: AppLocalizations.of(context)!.processedWhitelist,
|
||||
label: AppLocalizations.of(context)!.processedWhitelistRow,
|
||||
onChanged: (value) => setState(() => selectedResultStatus = value!)
|
||||
),
|
||||
filterStatusListItem(
|
||||
|
@ -148,19 +148,19 @@ class _FilterStatusModalState extends State<FilterStatusModal> {
|
|||
filterStatusListItem(
|
||||
id: "blocked_safebrowsing",
|
||||
icon: Icons.gpp_bad_rounded,
|
||||
label: AppLocalizations.of(context)!.blockedSafeBrowsing,
|
||||
label: AppLocalizations.of(context)!.blockedSafeBrowsingRow,
|
||||
onChanged: (value) => setState(() => selectedResultStatus = value!)
|
||||
),
|
||||
filterStatusListItem(
|
||||
id: "blocked_parental",
|
||||
icon: Icons.gpp_bad_rounded,
|
||||
label: AppLocalizations.of(context)!.blockedParental,
|
||||
label: AppLocalizations.of(context)!.blockedParentalRow,
|
||||
onChanged: (value) => setState(() => selectedResultStatus = value!)
|
||||
),
|
||||
filterStatusListItem(
|
||||
id: "safe_search",
|
||||
icon: Icons.gpp_bad_rounded,
|
||||
label: AppLocalizations.of(context)!.blockedSafeSearch,
|
||||
label: AppLocalizations.of(context)!.blockedSafeSearchRow,
|
||||
onChanged: (value) => setState(() => selectedResultStatus = value!)
|
||||
),
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ class LogDetailsModal extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget getResult() {
|
||||
final filter = getFilteredStatus(context, log.reason);
|
||||
final filter = getFilteredStatus(context, log.reason, true);
|
||||
return Text(
|
||||
filter['label'],
|
||||
style: TextStyle(
|
||||
|
@ -189,11 +189,11 @@ class LogDetailsModal extends StatelessWidget {
|
|||
children: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
blockUnblock(log, getFilteredStatus(context, log.reason)['filtered'] == true ? 'unblock' : 'block');
|
||||
blockUnblock(log, getFilteredStatus(context, log.reason, true)['filtered'] == true ? 'unblock' : 'block');
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text(
|
||||
getFilteredStatus(context, log.reason)['filtered'] == true
|
||||
getFilteredStatus(context, log.reason, true)['filtered'] == true
|
||||
? AppLocalizations.of(context)!.unblockDomain
|
||||
: AppLocalizations.of(context)!.blockDomain
|
||||
)
|
||||
|
|
|
@ -21,7 +21,7 @@ class LogListTile extends StatelessWidget {
|
|||
final width = MediaQuery.of(context).size.width;
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
@ -38,8 +38,7 @@ class LogListTile extends StatelessWidget {
|
|||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
|
@ -47,7 +46,6 @@ class LogListTile extends StatelessWidget {
|
|||
width: width-100,
|
||||
child: Text(
|
||||
subtitle!,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).listTileTheme.iconColor,
|
||||
|
|
|
@ -40,28 +40,30 @@ class LogTile extends StatelessWidget {
|
|||
required Color color,
|
||||
required String text
|
||||
}) {
|
||||
return Row(
|
||||
return Flexible(
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
color: color,
|
||||
size: 14,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
text,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: color,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12
|
||||
),
|
||||
)
|
||||
]
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget generateLogStatus() {
|
||||
final filter = getFilteredStatus(context, log.reason);
|
||||
final filter = getFilteredStatus(context, log.reason, false);
|
||||
return logStatusWidget(
|
||||
icon: filter['icon'],
|
||||
color: filter['color'],
|
||||
|
@ -148,7 +150,7 @@ class LogTile extends StatelessWidget {
|
|||
onTap: openLogDetailsModal,
|
||||
child: Container(
|
||||
width: double.maxFinite,
|
||||
padding: const EdgeInsets.all(10),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 15),
|
||||
decoration: BoxDecoration(
|
||||
border: index < length
|
||||
? Border(
|
||||
|
@ -161,25 +163,71 @@ class LogTile extends StatelessWidget {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
SizedBox(
|
||||
width: width-130,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
generateLogStatus(),
|
||||
const SizedBox(height: 10),
|
||||
SizedBox(
|
||||
width: width-100,
|
||||
child: Text(
|
||||
Text(
|
||||
log.question.name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 16
|
||||
),
|
||||
fontSize: 18
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
if (log.client.length <= 15) Row(
|
||||
children: [
|
||||
...[
|
||||
Icon(
|
||||
Icons.smartphone_rounded,
|
||||
size: 16,
|
||||
color: Theme.of(context).listTileTheme.iconColor,
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
SizedBox(
|
||||
child: Text(
|
||||
log.client,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).listTileTheme.iconColor,
|
||||
fontSize: 13
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
const SizedBox(width: 15),
|
||||
...[
|
||||
Icon(
|
||||
Icons.schedule_rounded,
|
||||
size: 16,
|
||||
color: Theme.of(context).listTileTheme.iconColor,
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
SizedBox(
|
||||
child: Text(
|
||||
formatTimestampUTCFromAPI(log.time, 'HH:mm:ss'),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).listTileTheme.iconColor,
|
||||
fontSize: 13
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
],
|
||||
),
|
||||
if (log.client.length > 15) Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.smartphone_rounded,
|
||||
size: 16,
|
||||
color: Theme.of(context).listTileTheme.iconColor,
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
SizedBox(
|
||||
width: width-100,
|
||||
child: Text(
|
||||
log.client,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
@ -191,9 +239,34 @@ class LogTile extends StatelessWidget {
|
|||
)
|
||||
],
|
||||
),
|
||||
Text(
|
||||
formatTimestampUTCFromAPI(log.time, 'HH:mm:ss')
|
||||
const SizedBox(height: 10),
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.schedule_rounded,
|
||||
size: 16,
|
||||
color: Theme.of(context).listTileTheme.iconColor,
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
SizedBox(
|
||||
child: Text(
|
||||
formatTimestampUTCFromAPI(log.time, 'HH:mm:ss'),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).listTileTheme.iconColor,
|
||||
fontSize: 13
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
generateLogStatus()
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -57,12 +57,12 @@ class _LogsFiltersModalWidgetState extends State<LogsFiltersModalWidget> {
|
|||
final Map<String, String> translatedString = {
|
||||
"all": AppLocalizations.of(context)!.all,
|
||||
"filtered": AppLocalizations.of(context)!.filtered,
|
||||
"processed": AppLocalizations.of(context)!.processed,
|
||||
"whitelisted": AppLocalizations.of(context)!.processedWhitelist,
|
||||
"processed": AppLocalizations.of(context)!.processedRow,
|
||||
"whitelisted": AppLocalizations.of(context)!.processedWhitelistRow,
|
||||
"blocked": AppLocalizations.of(context)!.blocked,
|
||||
"blocked_safebrowsing": AppLocalizations.of(context)!.blockedSafeBrowsing,
|
||||
"blocked_parental": AppLocalizations.of(context)!.blockedParental,
|
||||
"safe_search": AppLocalizations.of(context)!.safeSearch,
|
||||
"blocked_safebrowsing": AppLocalizations.of(context)!.blockedSafeBrowsingRow,
|
||||
"blocked_parental": AppLocalizations.of(context)!.blockedParentalRow,
|
||||
"safe_search": AppLocalizations.of(context)!.blockedSafeSearchRow,
|
||||
};
|
||||
|
||||
void selectTime() async {
|
||||
|
|
|
@ -27,6 +27,7 @@ class CustomListTile extends StatelessWidget {
|
|||
child: Padding(
|
||||
padding: padding ?? const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Row(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue