(frame: &mut Frame<'_>, app: &App, idx: usize, area: Rect)
| 135 | } |
| 136 | |
| 137 | fn draw_confirm_set(frame: &mut Frame<'_>, app: &App, idx: usize, area: Rect) { |
| 138 | let t = &app.theme; |
| 139 | let Some(entry) = app.sandbox_settings.get(idx) else { |
| 140 | return; |
| 141 | }; |
| 142 | let new_value = app |
| 143 | .sandbox_setting_edit |
| 144 | .as_ref() |
| 145 | .map_or("-", |e| e.input.as_str()); |
| 146 | let sandbox_name = app.selected_sandbox_name().unwrap_or("-"); |
| 147 | |
| 148 | let lines = vec![ |
| 149 | Line::from(Span::styled(" Confirm Sandbox Setting Change ", t.heading)), |
| 150 | Line::from(""), |
| 151 | Line::from(vec![ |
| 152 | Span::styled("Set ", t.text), |
| 153 | Span::styled(&entry.key, t.accent), |
| 154 | Span::styled(" = ", t.text), |
| 155 | Span::styled(new_value, t.accent), |
| 156 | Span::styled(" for ", t.text), |
| 157 | Span::styled(sandbox_name, t.accent), |
| 158 | Span::styled("?", t.text), |
| 159 | ]), |
| 160 | Line::from(""), |
| 161 | Line::from(vec![ |
| 162 | Span::styled("[y]", t.key_hint), |
| 163 | Span::styled(" Confirm ", t.muted), |
| 164 | Span::styled("[n]", t.key_hint), |
| 165 | Span::styled(" Cancel", t.muted), |
| 166 | ]), |
| 167 | ]; |
| 168 | |
| 169 | super::draw_confirm_popup(frame, lines, t.border_focused, 60, area); |
| 170 | } |
| 171 | |
| 172 | fn draw_confirm_delete(frame: &mut Frame<'_>, app: &App, idx: usize, area: Rect) { |
| 173 | let t = &app.theme; |
no test coverage detected