mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-24 07:46:06 +00:00
Some UI improvements
This commit is contained in:
parent
a334fdd883
commit
427636baf3
4 changed files with 83 additions and 16 deletions
|
@ -123,12 +123,24 @@ class _ClientsWidgetState extends State<ClientsWidget> with TickerProviderStateM
|
|||
controller: tabController,
|
||||
tabs: [
|
||||
Tab(
|
||||
icon: const Icon(Icons.devices),
|
||||
text: AppLocalizations.of(context)!.activeClients,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.devices),
|
||||
const SizedBox(width: 20),
|
||||
Text(AppLocalizations.of(context)!.activeClients)
|
||||
],
|
||||
),
|
||||
),
|
||||
Tab(
|
||||
icon: const Icon(Icons.add),
|
||||
text: AppLocalizations.of(context)!.added,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.add),
|
||||
const SizedBox(width: 20),
|
||||
Text(AppLocalizations.of(context)!.added)
|
||||
],
|
||||
),
|
||||
),
|
||||
]
|
||||
)
|
||||
|
|
|
@ -366,18 +366,37 @@ class _FiltersWidgetState extends State<FiltersWidget> with TickerProviderStateM
|
|||
] : [],
|
||||
bottom: TabBar(
|
||||
controller: tabController,
|
||||
isScrollable: true,
|
||||
tabs: [
|
||||
Tab(
|
||||
icon: const Icon(Icons.verified_user_rounded),
|
||||
text: AppLocalizations.of(context)!.whitelists,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.verified_user_rounded),
|
||||
const SizedBox(width: 20),
|
||||
Text(AppLocalizations.of(context)!.whitelists),
|
||||
],
|
||||
),
|
||||
),
|
||||
Tab(
|
||||
icon: const Icon(Icons.gpp_bad_rounded),
|
||||
text: AppLocalizations.of(context)!.blacklists,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.gpp_bad_rounded),
|
||||
const SizedBox(width: 20),
|
||||
Text(AppLocalizations.of(context)!.blacklist),
|
||||
],
|
||||
),
|
||||
),
|
||||
Tab(
|
||||
icon: const Icon(Icons.shield_rounded),
|
||||
text: AppLocalizations.of(context)!.customRules,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.shield_rounded),
|
||||
const SizedBox(width: 20),
|
||||
Text(AppLocalizations.of(context)!.customRules),
|
||||
],
|
||||
),
|
||||
),
|
||||
]
|
||||
)
|
||||
|
|
|
@ -55,6 +55,8 @@ class _LogsWidgetState extends State<LogsWidget> {
|
|||
|
||||
bool isLoadingMore = false;
|
||||
|
||||
bool showDivider = true;
|
||||
|
||||
Future fetchLogs({
|
||||
int? inOffset,
|
||||
bool? loadingMore,
|
||||
|
@ -125,6 +127,12 @@ class _LogsWidgetState extends State<LogsWidget> {
|
|||
if (scrollController.position.extentAfter < 500 && isLoadingMore == false) {
|
||||
fetchLogs(loadingMore: true);
|
||||
}
|
||||
if (scrollController.position.pixels > 0) {
|
||||
setState(() => showDivider = false);
|
||||
}
|
||||
else {
|
||||
setState(() => showDivider = true);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -363,6 +371,15 @@ class _LogsWidgetState extends State<LogsWidget> {
|
|||
height: 50,
|
||||
width: double.maxFinite,
|
||||
padding: const EdgeInsets.only(bottom: 10),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: showDivider == true
|
||||
? Theme.of(context).dividerColor
|
||||
: Colors.transparent,
|
||||
)
|
||||
)
|
||||
),
|
||||
child: ListView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: [
|
||||
|
|
|
@ -90,18 +90,37 @@ class _AccessSettingsWidgetState extends State<AccessSettingsWidget> with Ticker
|
|||
forceElevated: innerBoxIsScrolled,
|
||||
bottom: TabBar(
|
||||
controller: tabController,
|
||||
isScrollable: true,
|
||||
tabs: [
|
||||
Tab(
|
||||
icon: const Icon(Icons.check),
|
||||
text: AppLocalizations.of(context)!.allowedClients,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.check),
|
||||
const SizedBox(width: 20),
|
||||
Text(AppLocalizations.of(context)!.allowedClients)
|
||||
],
|
||||
),
|
||||
),
|
||||
Tab(
|
||||
icon: const Icon(Icons.block),
|
||||
text: AppLocalizations.of(context)!.disallowedClients,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.block),
|
||||
const SizedBox(width: 20),
|
||||
Text(AppLocalizations.of(context)!.disallowedClients)
|
||||
],
|
||||
),
|
||||
),
|
||||
Tab(
|
||||
icon: const Icon(Icons.link_rounded),
|
||||
text: AppLocalizations.of(context)!.disallowedDomains,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.link_rounded),
|
||||
const SizedBox(width: 20),
|
||||
Text(AppLocalizations.of(context)!.disallowedDomains)
|
||||
],
|
||||
),
|
||||
),
|
||||
]
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue