| 172 | } |
| 173 | |
| 174 | fn draw_nav_bar(frame: &mut Frame<'_>, app: &App, area: Rect) { |
| 175 | let t = &app.theme; |
| 176 | let spans = match app.screen { |
| 177 | Screen::Splash => unreachable!("splash handled before draw_nav_bar"), |
| 178 | Screen::Dashboard => match app.focus { |
| 179 | Focus::Providers if app.middle_pane_tab == app::MiddlePaneTab::GlobalSettings => vec![ |
| 180 | Span::styled(" ", t.text), |
| 181 | Span::styled("[Tab]", t.key_hint), |
| 182 | Span::styled(" Switch Panel", t.text), |
| 183 | Span::styled(" ", t.text), |
| 184 | Span::styled("[h/l]", t.key_hint), |
| 185 | Span::styled(" Switch Tab", t.text), |
| 186 | Span::styled(" ", t.text), |
| 187 | Span::styled("[j/k]", t.key_hint), |
| 188 | Span::styled(" Navigate", t.text), |
| 189 | Span::styled(" ", t.text), |
| 190 | Span::styled("[Enter]", t.key_hint), |
| 191 | Span::styled(" Edit", t.text), |
| 192 | Span::styled(" ", t.text), |
| 193 | Span::styled("[d]", t.key_hint), |
| 194 | Span::styled(" Delete", t.text), |
| 195 | Span::styled(" | ", t.border), |
| 196 | Span::styled("[:]", t.muted), |
| 197 | Span::styled(" Command ", t.muted), |
| 198 | Span::styled("[q]", t.muted), |
| 199 | Span::styled(" Quit", t.muted), |
| 200 | ], |
| 201 | Focus::Providers if app.providers_v2_enabled => vec![ |
| 202 | Span::styled(" ", t.text), |
| 203 | Span::styled("[Tab]", t.key_hint), |
| 204 | Span::styled(" Switch Panel", t.text), |
| 205 | Span::styled(" ", t.text), |
| 206 | Span::styled("[h/l]", t.key_hint), |
| 207 | Span::styled(" Switch Tab", t.text), |
| 208 | Span::styled(" ", t.text), |
| 209 | Span::styled("[j/k]", t.key_hint), |
| 210 | Span::styled(" Navigate", t.text), |
| 211 | Span::styled(" ", t.text), |
| 212 | Span::styled("[Enter]", t.key_hint), |
| 213 | Span::styled(" Detail", t.text), |
| 214 | Span::styled(" ", t.text), |
| 215 | Span::styled("read-only", t.muted), |
| 216 | Span::styled(" | ", t.border), |
| 217 | Span::styled("[:]", t.muted), |
| 218 | Span::styled(" Command ", t.muted), |
| 219 | Span::styled("[q]", t.muted), |
| 220 | Span::styled(" Quit", t.muted), |
| 221 | ], |
| 222 | Focus::Providers => vec![ |
| 223 | Span::styled(" ", t.text), |
| 224 | Span::styled("[Tab]", t.key_hint), |
| 225 | Span::styled(" Switch Panel", t.text), |
| 226 | Span::styled(" ", t.text), |
| 227 | Span::styled("[h/l]", t.key_hint), |
| 228 | Span::styled(" Switch Tab", t.text), |
| 229 | Span::styled(" ", t.text), |
| 230 | Span::styled("[j/k]", t.key_hint), |
| 231 | Span::styled(" Navigate", t.text), |