mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 20:30:35 +00:00
Changed system navigation bar color
This commit is contained in:
parent
83ea589187
commit
b164d520db
47 changed files with 3370 additions and 3207 deletions
|
@ -51,114 +51,116 @@ class _ServerInformationState extends State<ServerInformation> {
|
|||
surfaceTintColor: isDesktop(width) ? Colors.transparent : null,
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Builder(
|
||||
builder: (context) {
|
||||
switch (serverInfo.loadStatus) {
|
||||
case LoadStatus.loading:
|
||||
return SizedBox(
|
||||
width: double.maxFinite,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
body: SafeArea(
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
switch (serverInfo.loadStatus) {
|
||||
case LoadStatus.loading:
|
||||
return SizedBox(
|
||||
width: double.maxFinite,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const CircularProgressIndicator(),
|
||||
const SizedBox(height: 30),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.loadingServerInfo,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
case LoadStatus.loaded:
|
||||
return ListView(
|
||||
children: [
|
||||
const CircularProgressIndicator(),
|
||||
const SizedBox(height: 30),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.loadingServerInfo,
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.dnsAddresses,
|
||||
subtitle: AppLocalizations.of(context)!.seeDnsAddresses,
|
||||
onTap: () {
|
||||
showModal(
|
||||
context: context,
|
||||
builder: (context) => DnsAddressesModal(
|
||||
dnsAddresses: serverInfo.data!.dnsAddresses
|
||||
)
|
||||
);
|
||||
},
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.dnsPort,
|
||||
subtitle: serverInfo.data!.dnsPort.toString(),
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.httpPort,
|
||||
subtitle: serverInfo.data!.httpPort.toString(),
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.protectionEnabled,
|
||||
subtitle: serverInfo.data!.protectionEnabled == true
|
||||
? AppLocalizations.of(context)!.yes
|
||||
: AppLocalizations.of(context)!.no,
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.dhcpAvailable,
|
||||
subtitle: serverInfo.data!.dhcpAvailable == true
|
||||
? AppLocalizations.of(context)!.yes
|
||||
: AppLocalizations.of(context)!.no,
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.serverRunning,
|
||||
subtitle: serverInfo.data!.running == true
|
||||
? AppLocalizations.of(context)!.yes
|
||||
: AppLocalizations.of(context)!.no,
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.serverVersion,
|
||||
subtitle: serverInfo.data!.version,
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.serverLanguage,
|
||||
subtitle: serverInfo.data!.language,
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
case LoadStatus.error:
|
||||
return SizedBox(
|
||||
width: double.maxFinite,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.error,
|
||||
color: Colors.red,
|
||||
size: 50,
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Text(
|
||||
AppLocalizations.of(context)!.serverInfoNotLoaded,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
case LoadStatus.loaded:
|
||||
return ListView(
|
||||
children: [
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.dnsAddresses,
|
||||
subtitle: AppLocalizations.of(context)!.seeDnsAddresses,
|
||||
onTap: () {
|
||||
showModal(
|
||||
context: context,
|
||||
builder: (context) => DnsAddressesModal(
|
||||
dnsAddresses: serverInfo.data!.dnsAddresses
|
||||
)
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.dnsPort,
|
||||
subtitle: serverInfo.data!.dnsPort.toString(),
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.httpPort,
|
||||
subtitle: serverInfo.data!.httpPort.toString(),
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.protectionEnabled,
|
||||
subtitle: serverInfo.data!.protectionEnabled == true
|
||||
? AppLocalizations.of(context)!.yes
|
||||
: AppLocalizations.of(context)!.no,
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.dhcpAvailable,
|
||||
subtitle: serverInfo.data!.dhcpAvailable == true
|
||||
? AppLocalizations.of(context)!.yes
|
||||
: AppLocalizations.of(context)!.no,
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.serverRunning,
|
||||
subtitle: serverInfo.data!.running == true
|
||||
? AppLocalizations.of(context)!.yes
|
||||
: AppLocalizations.of(context)!.no,
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.serverVersion,
|
||||
subtitle: serverInfo.data!.version,
|
||||
),
|
||||
CustomListTile(
|
||||
title: AppLocalizations.of(context)!.serverLanguage,
|
||||
subtitle: serverInfo.data!.language,
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
case LoadStatus.error:
|
||||
return SizedBox(
|
||||
width: double.maxFinite,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.error,
|
||||
color: Colors.red,
|
||||
size: 50,
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Text(
|
||||
AppLocalizations.of(context)!.serverInfoNotLoaded,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
default:
|
||||
return const SizedBox();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
default:
|
||||
return const SizedBox();
|
||||
}
|
||||
},
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue