mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-26 16:56:08 +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,
|
controller: tabController,
|
||||||
tabs: [
|
tabs: [
|
||||||
Tab(
|
Tab(
|
||||||
icon: const Icon(Icons.devices),
|
child: Row(
|
||||||
text: AppLocalizations.of(context)!.activeClients,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const Icon(Icons.devices),
|
||||||
|
const SizedBox(width: 20),
|
||||||
|
Text(AppLocalizations.of(context)!.activeClients)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Tab(
|
Tab(
|
||||||
icon: const Icon(Icons.add),
|
child: Row(
|
||||||
text: AppLocalizations.of(context)!.added,
|
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(
|
bottom: TabBar(
|
||||||
controller: tabController,
|
controller: tabController,
|
||||||
|
isScrollable: true,
|
||||||
tabs: [
|
tabs: [
|
||||||
Tab(
|
Tab(
|
||||||
icon: const Icon(Icons.verified_user_rounded),
|
child: Row(
|
||||||
text: AppLocalizations.of(context)!.whitelists,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const Icon(Icons.verified_user_rounded),
|
||||||
|
const SizedBox(width: 20),
|
||||||
|
Text(AppLocalizations.of(context)!.whitelists),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Tab(
|
Tab(
|
||||||
icon: const Icon(Icons.gpp_bad_rounded),
|
child: Row(
|
||||||
text: AppLocalizations.of(context)!.blacklists,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const Icon(Icons.gpp_bad_rounded),
|
||||||
|
const SizedBox(width: 20),
|
||||||
|
Text(AppLocalizations.of(context)!.blacklist),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Tab(
|
Tab(
|
||||||
icon: const Icon(Icons.shield_rounded),
|
child: Row(
|
||||||
text: AppLocalizations.of(context)!.customRules,
|
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 isLoadingMore = false;
|
||||||
|
|
||||||
|
bool showDivider = true;
|
||||||
|
|
||||||
Future fetchLogs({
|
Future fetchLogs({
|
||||||
int? inOffset,
|
int? inOffset,
|
||||||
bool? loadingMore,
|
bool? loadingMore,
|
||||||
|
@ -125,6 +127,12 @@ class _LogsWidgetState extends State<LogsWidget> {
|
||||||
if (scrollController.position.extentAfter < 500 && isLoadingMore == false) {
|
if (scrollController.position.extentAfter < 500 && isLoadingMore == false) {
|
||||||
fetchLogs(loadingMore: true);
|
fetchLogs(loadingMore: true);
|
||||||
}
|
}
|
||||||
|
if (scrollController.position.pixels > 0) {
|
||||||
|
setState(() => showDivider = false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setState(() => showDivider = true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -363,6 +371,15 @@ class _LogsWidgetState extends State<LogsWidget> {
|
||||||
height: 50,
|
height: 50,
|
||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
padding: const EdgeInsets.only(bottom: 10),
|
padding: const EdgeInsets.only(bottom: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border(
|
||||||
|
bottom: BorderSide(
|
||||||
|
color: showDivider == true
|
||||||
|
? Theme.of(context).dividerColor
|
||||||
|
: Colors.transparent,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
child: ListView(
|
child: ListView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
children: [
|
children: [
|
||||||
|
|
|
@ -90,18 +90,37 @@ class _AccessSettingsWidgetState extends State<AccessSettingsWidget> with Ticker
|
||||||
forceElevated: innerBoxIsScrolled,
|
forceElevated: innerBoxIsScrolled,
|
||||||
bottom: TabBar(
|
bottom: TabBar(
|
||||||
controller: tabController,
|
controller: tabController,
|
||||||
|
isScrollable: true,
|
||||||
tabs: [
|
tabs: [
|
||||||
Tab(
|
Tab(
|
||||||
icon: const Icon(Icons.check),
|
child: Row(
|
||||||
text: AppLocalizations.of(context)!.allowedClients,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const Icon(Icons.check),
|
||||||
|
const SizedBox(width: 20),
|
||||||
|
Text(AppLocalizations.of(context)!.allowedClients)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Tab(
|
Tab(
|
||||||
icon: const Icon(Icons.block),
|
child: Row(
|
||||||
text: AppLocalizations.of(context)!.disallowedClients,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const Icon(Icons.block),
|
||||||
|
const SizedBox(width: 20),
|
||||||
|
Text(AppLocalizations.of(context)!.disallowedClients)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Tab(
|
Tab(
|
||||||
icon: const Icon(Icons.link_rounded),
|
child: Row(
|
||||||
text: AppLocalizations.of(context)!.disallowedDomains,
|
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