| 512 | impl AuthEditor { |
| 513 | fn render_basic_auth(&self, theme: &gpui_component::theme::ThemeColor) -> impl IntoElement { |
| 514 | div() |
| 515 | .flex() |
| 516 | .flex_col() |
| 517 | .gap(px(16.0)) |
| 518 | // Username |
| 519 | .child( |
| 520 | div() |
| 521 | .flex() |
| 522 | .flex_col() |
| 523 | .gap(px(6.0)) |
| 524 | .child( |
| 525 | div() |
| 526 | .text_color(theme.muted_foreground) |
| 527 | .text_size(px(11.0)) |
| 528 | .font_weight(gpui::FontWeight::SEMIBOLD) |
| 529 | .child("Username"), |
| 530 | ) |
| 531 | .when_some(self.username_input.as_ref(), |el, input| { |
| 532 | el.child( |
| 533 | div() |
| 534 | .bg(theme.secondary) |
| 535 | .rounded(px(6.0)) |
| 536 | .border_1() |
| 537 | .border_color(theme.border) |
| 538 | .child(CompletionInput::new( |
| 539 | input, |
| 540 | Input::new(input).appearance(false).small(), |
| 541 | )), |
| 542 | ) |
| 543 | }), |
| 544 | ) |
| 545 | // Password |
| 546 | .child( |
| 547 | div() |
| 548 | .flex() |
| 549 | .flex_col() |
| 550 | .gap(px(6.0)) |
| 551 | .child( |
| 552 | div() |
| 553 | .text_color(theme.muted_foreground) |
| 554 | .text_size(px(11.0)) |
| 555 | .font_weight(gpui::FontWeight::SEMIBOLD) |
| 556 | .child("Password"), |
| 557 | ) |
| 558 | .when_some(self.password_input.as_ref(), |el, input| { |
| 559 | el.child( |
| 560 | div() |
| 561 | .bg(theme.secondary) |
| 562 | .rounded(px(6.0)) |
| 563 | .border_1() |
| 564 | .border_color(theme.border) |
| 565 | .child(CompletionInput::new( |
| 566 | input, |
| 567 | Input::new(input).appearance(false).small(), |
| 568 | )), |
| 569 | ) |
| 570 | }), |