MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / draw_confirm_delete

Function draw_confirm_delete

crates/openshell-tui/src/ui/global_settings.rs:163–192  ·  view source on GitHub ↗
(frame: &mut Frame<'_>, app: &App, idx: usize, area: Rect)

Source from the content-addressed store, hash-verified

161}
162
163fn draw_confirm_delete(frame: &mut Frame<'_>, app: &App, idx: usize, area: Rect) {
164 let t = &app.theme;
165 let Some(entry) = app.global_settings.get(idx) else {
166 return;
167 };
168
169 let lines = vec![
170 Line::from(Span::styled(" Delete Global Setting ", t.status_err)),
171 Line::from(""),
172 Line::from(vec![
173 Span::styled("Delete global setting ", t.text),
174 Span::styled(&entry.key, t.accent),
175 Span::styled("?", t.text),
176 ]),
177 Line::from(""),
178 Line::from(Span::styled(
179 "This will unset the value for all sandboxes on this gateway.",
180 t.status_warn,
181 )),
182 Line::from(""),
183 Line::from(vec![
184 Span::styled("[y]", t.key_hint),
185 Span::styled(" Delete ", t.muted),
186 Span::styled("[n]", t.key_hint),
187 Span::styled(" Cancel", t.muted),
188 ]),
189 ];
190
191 super::draw_confirm_popup(frame, lines, t.status_err, 60, area);
192}

Callers 1

drawFunction · 0.70

Calls 2

draw_confirm_popupFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected