mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 05:52:51 +00:00
Added hide server address feature
This commit is contained in:
parent
a38c9bf4b0
commit
d967399b64
5 changed files with 64 additions and 12 deletions
|
@ -90,18 +90,20 @@ class HomeAppBar extends StatelessWidget {
|
|||
if (serversProvider.selectedServer != null) ...[
|
||||
Text(
|
||||
server!.name,
|
||||
style: const TextStyle(
|
||||
style: !appConfigProvider.hideServerAddress ? const TextStyle(
|
||||
fontSize: 20
|
||||
),
|
||||
) : null,
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"${server.connectionMethod}://${server.domain}${server.path ?? ""}${server.port != null ? ':${server.port}' : ""}",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).listTileTheme.textColor
|
||||
),
|
||||
)
|
||||
if (!appConfigProvider.hideServerAddress) ...[
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"${server.connectionMethod}://${server.domain}${server.path ?? ""}${server.port != null ? ':${server.port}' : ""}",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Theme.of(context).listTileTheme.textColor
|
||||
),
|
||||
)
|
||||
]
|
||||
],
|
||||
if (serversProvider.selectedServer == null) Text(
|
||||
AppLocalizations.of(context)!.noServerSelected,
|
||||
|
|
|
@ -159,6 +159,28 @@ class _GeneralSettingsState extends State<GeneralSettings> {
|
|||
right: 10
|
||||
)
|
||||
),
|
||||
CustomListTile(
|
||||
icon: Icons.remove_red_eye_rounded,
|
||||
title: AppLocalizations.of(context)!.hideServerAddress,
|
||||
subtitle: AppLocalizations.of(context)!.hideServerAddressDescription,
|
||||
trailing: Switch(
|
||||
value: appConfigProvider.hideServerAddress,
|
||||
onChanged: (value) => updateSettings(
|
||||
newStatus: value,
|
||||
function: appConfigProvider.setHideServerAddress
|
||||
),
|
||||
),
|
||||
onTap: () => updateSettings(
|
||||
newStatus: !appConfigProvider.hideServerAddress,
|
||||
function: appConfigProvider.setHideServerAddress
|
||||
),
|
||||
padding: const EdgeInsets.only(
|
||||
top: 10,
|
||||
bottom: 10,
|
||||
left: 16,
|
||||
right: 10
|
||||
)
|
||||
),
|
||||
SectionLabel(label: AppLocalizations.of(context)!.logs),
|
||||
CustomListTile(
|
||||
icon: Icons.timer_rounded,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue