mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-22 06:49:11 +00:00
Icon changes and other improvements
This commit is contained in:
parent
0e4f4c8eff
commit
ea8b35a0a2
6 changed files with 54 additions and 62 deletions
|
@ -77,7 +77,7 @@ class _FiltersTabsViewState extends State<FiltersTabsView> with TickerProviderSt
|
||||||
children: [
|
children: [
|
||||||
const Icon(Icons.verified_user_rounded),
|
const Icon(Icons.verified_user_rounded),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(AppLocalizations.of(context)!.whitelists,)
|
Text(AppLocalizations.of(context)!.whitelists)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -26,11 +26,11 @@ class ListOptionsMenu extends StatelessWidget {
|
||||||
final String listType;
|
final String listType;
|
||||||
|
|
||||||
const ListOptionsMenu({
|
const ListOptionsMenu({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.list,
|
required this.list,
|
||||||
required this.child,
|
required this.child,
|
||||||
required this.listType,
|
required this.listType,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
|
@ -29,7 +29,7 @@ class _EnableDisableSelectionModalState extends State<EnableDisableSelectionModa
|
||||||
title: Column(
|
title: Column(
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.shield_rounded,
|
Icons.remove_moderator_rounded,
|
||||||
size: 24,
|
size: 24,
|
||||||
color: Theme.of(context).listTileTheme.iconColor
|
color: Theme.of(context).listTileTheme.iconColor
|
||||||
),
|
),
|
||||||
|
|
|
@ -11,11 +11,11 @@ class SelectionResultModal extends StatelessWidget {
|
||||||
final SelectionResultMode mode;
|
final SelectionResultMode mode;
|
||||||
|
|
||||||
const SelectionResultModal({
|
const SelectionResultModal({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.results,
|
required this.results,
|
||||||
required this.onClose,
|
required this.onClose,
|
||||||
required this.mode,
|
required this.mode,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -27,7 +27,7 @@ class SelectionResultModal extends StatelessWidget {
|
||||||
Icon(
|
Icon(
|
||||||
mode == SelectionResultMode.delete
|
mode == SelectionResultMode.delete
|
||||||
? Icons.delete_rounded
|
? Icons.delete_rounded
|
||||||
: Icons.shield_rounded,
|
: Icons.remove_moderator_rounded,
|
||||||
size: 24,
|
size: 24,
|
||||||
color: Theme.of(context).listTileTheme.iconColor
|
color: Theme.of(context).listTileTheme.iconColor
|
||||||
),
|
),
|
||||||
|
|
|
@ -17,9 +17,9 @@ class SelectionScreen extends StatefulWidget {
|
||||||
final bool isModal;
|
final bool isModal;
|
||||||
|
|
||||||
const SelectionScreen({
|
const SelectionScreen({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.isModal
|
required this.isModal
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<SelectionScreen> createState() => _SelectionScreenState();
|
State<SelectionScreen> createState() => _SelectionScreenState();
|
||||||
|
@ -168,13 +168,17 @@ class _SelectionScreenState extends State<SelectionScreen> with TickerProviderSt
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: enableDisableSelected,
|
onPressed: somethingSelected == true
|
||||||
icon: const Icon(Icons.shield_rounded),
|
? () => enableDisableSelected()
|
||||||
|
: null,
|
||||||
|
icon: const Icon(Icons.remove_moderator_rounded),
|
||||||
tooltip: AppLocalizations.of(context)!.enableDisableSelected,
|
tooltip: AppLocalizations.of(context)!.enableDisableSelected,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: deleteSelected,
|
onPressed: somethingSelected == true
|
||||||
|
? () => deleteSelected()
|
||||||
|
: null,
|
||||||
icon: const Icon(Icons.delete_rounded),
|
icon: const Icon(Icons.delete_rounded),
|
||||||
tooltip: AppLocalizations.of(context)!.deleteSelectedLists,
|
tooltip: AppLocalizations.of(context)!.deleteSelectedLists,
|
||||||
),
|
),
|
||||||
|
@ -270,7 +274,24 @@ class _SelectionScreenState extends State<SelectionScreen> with TickerProviderSt
|
||||||
quantity: _selectedBlacklists.length
|
quantity: _selectedBlacklists.length
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
)
|
),
|
||||||
|
actions: [
|
||||||
|
IconButton(
|
||||||
|
onPressed: somethingSelected == true
|
||||||
|
? () => enableDisableSelected()
|
||||||
|
: null,
|
||||||
|
icon: const Icon(Icons.remove_moderator_rounded),
|
||||||
|
tooltip: AppLocalizations.of(context)!.enableDisableSelected,
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: somethingSelected == true
|
||||||
|
? () => deleteSelected()
|
||||||
|
: null,
|
||||||
|
icon: const Icon(Icons.delete_rounded),
|
||||||
|
tooltip: AppLocalizations.of(context)!.deleteSelectedLists,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
@ -296,41 +317,7 @@ class _SelectionScreenState extends State<SelectionScreen> with TickerProviderSt
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
AnimatedPositioned(
|
|
||||||
duration: const Duration(milliseconds: 200),
|
|
||||||
curve: Curves.ease,
|
|
||||||
right: 16,
|
|
||||||
bottom: _isScrolled ? -150 : 16,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
FloatingActionButton.small(
|
|
||||||
onPressed: somethingSelected == true
|
|
||||||
? () => enableDisableSelected()
|
|
||||||
: null,
|
|
||||||
tooltip: AppLocalizations.of(context)!.enableDisableSelected,
|
|
||||||
child: Icon(
|
|
||||||
Icons.shield_rounded,
|
|
||||||
color: somethingSelected == true
|
|
||||||
? Theme.of(context).colorScheme.onPrimaryContainer
|
|
||||||
: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.5),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 16),
|
|
||||||
FloatingActionButton.small(
|
|
||||||
onPressed: somethingSelected == true
|
|
||||||
? () => deleteSelected()
|
|
||||||
: null,
|
|
||||||
tooltip: AppLocalizations.of(context)!.deleteSelected,
|
|
||||||
child: Icon(
|
|
||||||
Icons.delete_rounded,
|
|
||||||
color: somethingSelected == true
|
|
||||||
? Theme.of(context).colorScheme.onPrimaryContainer
|
|
||||||
: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.5),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -344,11 +331,10 @@ class _Tab extends StatelessWidget {
|
||||||
final int quantity;
|
final int quantity;
|
||||||
|
|
||||||
const _Tab({
|
const _Tab({
|
||||||
Key? key,
|
|
||||||
required this.icon,
|
required this.icon,
|
||||||
required this.text,
|
required this.text,
|
||||||
required this.quantity
|
required this.quantity
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
|
@ -8,9 +8,9 @@ class OptionsModal extends StatelessWidget {
|
||||||
final List<MenuOption> options;
|
final List<MenuOption> options;
|
||||||
|
|
||||||
const OptionsModal({
|
const OptionsModal({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.options,
|
required this.options,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -32,16 +32,22 @@ class OptionsModal extends StatelessWidget {
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
content: Column(
|
content: ConstrainedBox(
|
||||||
mainAxisSize: MainAxisSize.min,
|
constraints: const BoxConstraints(
|
||||||
children: options.map((opt) => CustomListTileDialog(
|
maxWidth: 400
|
||||||
title: opt.title,
|
),
|
||||||
icon: opt.icon,
|
child: SingleChildScrollView(
|
||||||
onTap: () {
|
child: Wrap(
|
||||||
Navigator.pop(context);
|
children: options.map((opt) => CustomListTileDialog(
|
||||||
opt.action();
|
title: opt.title,
|
||||||
},
|
icon: opt.icon,
|
||||||
)).toList()
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
opt.action();
|
||||||
|
},
|
||||||
|
)).toList()
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
Row(
|
Row(
|
||||||
|
|
Loading…
Add table
Reference in a new issue