MCPcopy Create free account
hub / github.com/bajrangCoder/setu / render

Method render

src/components/auth_editor.rs:437–510  ·  view source on GitHub ↗
(&mut self, window: &mut Window, cx: &mut Context<Self>)

Source from the content-addressed store, hash-verified

435impl Render for AuthEditor {
436 fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
437 self.ensure_inputs(window, cx);
438
439 let theme = cx.theme();
440
441 div()
442 .id("auth-editor-container")
443 .track_focus(&self.focus_handle)
444 .flex()
445 .flex_col()
446 .w_full()
447 .flex_1()
448 .overflow_hidden()
449 .bg(theme.muted)
450 .child(
451 div()
452 .flex()
453 .flex_row()
454 .items_center()
455 .justify_between()
456 .h(px(36.0))
457 .px(px(16.0))
458 .bg(theme.secondary)
459 .border_b_1()
460 .border_color(theme.border)
461 .child(
462 div()
463 .text_color(theme.muted_foreground)
464 .text_size(px(11.0))
465 .font_weight(gpui::FontWeight::SEMIBOLD)
466 .child("Authorization"),
467 )
468 .child(
469 div().flex_shrink_0().child(
470 Select::new(&self.auth_type_select)
471 .small()
472 .menu_width(px(140.0)),
473 ),
474 ),
475 )
476 // Content area
477 .child(
478 div()
479 .id("auth-content-scroll")
480 .flex_1()
481 .flex()
482 .flex_col()
483 .overflow_y_scroll()
484 .p(px(16.0))
485 // Auth type specific fields
486 .when(self.auth_type == AuthType::Basic, |el| {
487 el.child(self.render_basic_auth(&theme))
488 })
489 .when(self.auth_type == AuthType::Bearer, |el| {
490 el.child(self.render_bearer_auth(&theme))
491 })
492 .when(self.auth_type == AuthType::ApiKey, |el| {
493 el.child(self.render_api_key_auth(&theme))
494 })

Callers

nothing calls this directly

Calls 6

ensure_inputsMethod · 0.80
childMethod · 0.80
idMethod · 0.80
render_basic_authMethod · 0.80
render_bearer_authMethod · 0.80
render_api_key_authMethod · 0.80

Tested by

no test coverage detected