mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 14:02:48 +00:00
Added timer icon home header
This commit is contained in:
parent
2495724ae7
commit
de651118f2
1 changed files with 42 additions and 16 deletions
|
@ -40,22 +40,48 @@ class HomeAppBar extends StatelessWidget {
|
||||||
floating: true,
|
floating: true,
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
forceElevated: innerBoxScrolled,
|
forceElevated: innerBoxScrolled,
|
||||||
leading: Icon(
|
leading: Stack(
|
||||||
serversProvider.selectedServer != null && statusProvider.serverStatus != null
|
children: [
|
||||||
? statusProvider.serverStatus!.generalEnabled == true
|
Center(
|
||||||
? Icons.gpp_good_rounded
|
child: Icon(
|
||||||
: Icons.gpp_bad_rounded
|
serversProvider.selectedServer != null && statusProvider.serverStatus != null
|
||||||
: Icons.shield,
|
? statusProvider.serverStatus!.generalEnabled == true
|
||||||
size: 30,
|
? Icons.gpp_good_rounded
|
||||||
color: serversProvider.selectedServer != null && statusProvider.serverStatus != null
|
: Icons.gpp_bad_rounded
|
||||||
? statusProvider.serverStatus!.generalEnabled == true
|
: Icons.shield,
|
||||||
? appConfigProvider.useThemeColorForStatus
|
size: 30,
|
||||||
? Theme.of(context).colorScheme.primary
|
color: serversProvider.selectedServer != null && statusProvider.serverStatus != null
|
||||||
: Colors.green
|
? statusProvider.serverStatus!.generalEnabled == true
|
||||||
: appConfigProvider.useThemeColorForStatus == true
|
? appConfigProvider.useThemeColorForStatus
|
||||||
? Theme.of(context).colorScheme.onSurface.withOpacity(0.38)
|
? Theme.of(context).colorScheme.primary
|
||||||
: Colors.red
|
: Colors.green
|
||||||
: Theme.of(context).colorScheme.onSurface.withOpacity(0.38)
|
: appConfigProvider.useThemeColorForStatus == true
|
||||||
|
? Theme.of(context).colorScheme.onSurface.withOpacity(0.38)
|
||||||
|
: Colors.red
|
||||||
|
: Theme.of(context).colorScheme.onSurface.withOpacity(0.38)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (statusProvider.remainingTime > 0) Positioned(
|
||||||
|
bottom: 15,
|
||||||
|
right: 15,
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.all(1),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(30),
|
||||||
|
color: Theme.of(context).colorScheme.surface
|
||||||
|
),
|
||||||
|
child: Icon(
|
||||||
|
Icons.timer_rounded,
|
||||||
|
size: 12,
|
||||||
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
title: Column(
|
title: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue