migrate ui components to gpui-kit

This commit is contained in:
2026-10-21 13:40:29 +07:00
parent 0d4acf5b65
commit d0ad1a6f57
173 changed files with 2775 additions and 10885 deletions
+5 -5
View File
@@ -1,8 +1,8 @@
use gpui_kit::component::button::{Button, ButtonCustomVariant, ButtonVariants};
use gpui_kit::component::{Sizable, v_flex};
use std::time::{SystemTime, UNIX_EPOCH};
use gpui::{AnyElement, App, IntoElement, ParentElement, SharedString, Styled, Window, img};
use ui::button::{Button, ButtonCustomVariant, ButtonVariants};
use ui::{Sizable, StyledExt, v_flex};
use crate::dialogs::import;
@@ -20,7 +20,7 @@ pub(super) fn pick_banner() -> SharedString {
}
/// The headline and identity import shown while signed out.
pub(super) fn render_signed_out(window: &mut Window, cx: &mut App) -> AnyElement {
pub(super) fn render_signed_out(_window: &mut Window, cx: &mut App) -> AnyElement {
v_flex()
.size_full()
.justify_end()
@@ -31,14 +31,14 @@ pub(super) fn render_signed_out(window: &mut Window, cx: &mut App) -> AnyElement
Button::new("import")
.label("Import Identity")
.custom(
ButtonCustomVariant::new(window, cx)
ButtonCustomVariant::new(cx)
.color(gpui::white())
.foreground(gpui::black())
.hover(gpui::white().opacity(0.9))
.active(gpui::white().opacity(0.8)),
)
.large()
.font_semibold()
.font_weight(gpui::FontWeight::SEMIBOLD)
.on_click(|_, window, cx| {
import::open(window, cx);
}),