backup: before proxies page modernization

This commit is contained in:
Hiddify User
2025-12-26 02:39:35 +03:00
parent 6e73e53fb6
commit 063f2464ee
25 changed files with 1395 additions and 609 deletions

View File

@@ -10,6 +10,7 @@ bool showDrawerButton(BuildContext context) {
final String location = GoRouterState.of(context).uri.path;
if (location == const HomeRoute().location || location == const ProfilesOverviewRoute().location) return true;
if (location.startsWith(const ProxiesRoute().location)) return true;
if (location.startsWith(const PerAppProxyRoute().location)) return true;
return false;
}
@@ -31,11 +32,13 @@ class NestedAppBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
RootScaffold.canShowDrawer(context);
final hasDrawer = RootScaffold.stateKey.currentState?.hasDrawer ?? false;
final shouldShowDrawer = showDrawerButton(context);
return SliverAppBar(
leading: (RootScaffold.stateKey.currentState?.hasDrawer ?? false) && showDrawerButton(context)
? DrawerButton(
leading: hasDrawer && shouldShowDrawer
? IconButton(
icon: const Icon(Icons.menu),
onPressed: () {
RootScaffold.stateKey.currentState?.openDrawer();
},