mirror of
https://github.com/foss42/apidash.git
synced 2025-12-01 02:07:00 +08:00
Fix navigation order for Terminal and Settings pages
Corrects the navigation indices for Terminal (Logs) and Settings pages in both desktop and mobile dashboards and navbars, ensuring consistent navigation and page rendering.
This commit is contained in:
@@ -73,9 +73,9 @@ class Dashboard extends ConsumerWidget {
|
||||
),
|
||||
kVSpacer10,
|
||||
IconButton(
|
||||
isSelected: railIdx == 4,
|
||||
isSelected: railIdx == 3,
|
||||
onPressed: () {
|
||||
ref.read(navRailIndexStateProvider.notifier).state = 4;
|
||||
ref.read(navRailIndexStateProvider.notifier).state = 3;
|
||||
},
|
||||
icon: const Icon(Icons.terminal),
|
||||
selectedIcon: const Icon(Icons.terminal),
|
||||
@@ -108,7 +108,7 @@ class Dashboard extends ConsumerWidget {
|
||||
padding: const EdgeInsets.only(bottom: 16.0),
|
||||
child: NavbarButton(
|
||||
railIdx: railIdx,
|
||||
buttonIdx: 3,
|
||||
buttonIdx: 4,
|
||||
selectedIcon: Icons.settings,
|
||||
icon: Icons.settings_outlined,
|
||||
label: 'Settings',
|
||||
@@ -134,8 +134,8 @@ class Dashboard extends ConsumerWidget {
|
||||
HomePage(),
|
||||
EnvironmentPage(),
|
||||
HistoryPage(),
|
||||
SettingsPage(),
|
||||
TerminalPage(),
|
||||
SettingsPage(),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -74,12 +74,15 @@ class PageBranch extends ConsumerWidget {
|
||||
case 2:
|
||||
return const HistoryPage();
|
||||
case 3:
|
||||
return const PageBase(
|
||||
title: 'Logs',
|
||||
scaffoldBody: TerminalPage(),
|
||||
);
|
||||
case 4:
|
||||
return const PageBase(
|
||||
title: 'Settings',
|
||||
scaffoldBody: SettingsPage(),
|
||||
);
|
||||
case 4:
|
||||
return const TerminalPage();
|
||||
default:
|
||||
return const RequestResponsePage();
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class BottomNavBar extends ConsumerWidget {
|
||||
Expanded(
|
||||
child: NavbarButton(
|
||||
railIdx: railIdx,
|
||||
buttonIdx: 4,
|
||||
buttonIdx: 3,
|
||||
selectedIcon: Icons.terminal,
|
||||
icon: Icons.terminal,
|
||||
label: 'Logs',
|
||||
@@ -69,7 +69,7 @@ class BottomNavBar extends ConsumerWidget {
|
||||
Expanded(
|
||||
child: NavbarButton(
|
||||
railIdx: railIdx,
|
||||
buttonIdx: 3,
|
||||
buttonIdx: 4,
|
||||
selectedIcon: Icons.settings,
|
||||
icon: Icons.settings_outlined,
|
||||
label: 'Settings',
|
||||
|
||||
Reference in New Issue
Block a user