(frame: &mut Frame<'_>, app: &App, idx: usize, area: Rect)
| 127 | } |
| 128 | |
| 129 | fn draw_confirm_set(frame: &mut Frame<'_>, app: &App, idx: usize, area: Rect) { |
| 130 | let t = &app.theme; |
| 131 | let Some(entry) = app.global_settings.get(idx) else { |
| 132 | return; |
| 133 | }; |
| 134 | let new_value = app.setting_edit.as_ref().map_or("-", |e| e.input.as_str()); |
| 135 | |
| 136 | let lines = vec![ |
| 137 | Line::from(Span::styled(" Confirm Global Setting Change ", t.heading)), |
| 138 | Line::from(""), |
| 139 | Line::from(vec![ |
| 140 | Span::styled("Set ", t.text), |
| 141 | Span::styled(&entry.key, t.accent), |
| 142 | Span::styled(" = ", t.text), |
| 143 | Span::styled(new_value, t.accent), |
| 144 | Span::styled(" globally?", t.text), |
| 145 | ]), |
| 146 | Line::from(""), |
| 147 | Line::from(Span::styled( |
| 148 | "This will apply to all sandboxes on this gateway.", |
| 149 | t.status_warn, |
| 150 | )), |
| 151 | Line::from(""), |
| 152 | Line::from(vec![ |
| 153 | Span::styled("[y]", t.key_hint), |
| 154 | Span::styled(" Confirm ", t.muted), |
| 155 | Span::styled("[n]", t.key_hint), |
| 156 | Span::styled(" Cancel", t.muted), |
| 157 | ]), |
| 158 | ]; |
| 159 | |
| 160 | super::draw_confirm_popup(frame, lines, t.border_focused, 60, area); |
| 161 | } |
| 162 | |
| 163 | fn draw_confirm_delete(frame: &mut Frame<'_>, app: &App, idx: usize, area: Rect) { |
| 164 | let t = &app.theme; |
no test coverage detected