feat: setup wizard shell

This commit is contained in:
2026-04-22 12:41:33 +01:00
parent e8005f3fbf
commit aa28a03e3c
5 changed files with 143 additions and 22 deletions

View File

@@ -1,11 +1,92 @@
struct Welcome {}
use gpui::{FontWeight, ParentElement, Styled, div, px};
impl gpui::Render for Welcome {
use crate::{
api, app,
component::{
font_icon::{FontIcon, font_icon},
text::text,
},
query::{self, use_lazy_query, use_query},
};
pub(crate) struct Screen {
create_device_code_query: query::Entity<api::auth::CreateDeviceCode>,
}
impl Screen {
pub fn new(cx: &mut gpui::Context<Self>) -> Self {
Self {
create_device_code_query: use_lazy_query(api::auth::CreateDeviceCode, cx),
}
}
}
impl gpui::Render for Screen {
fn render(
&mut self,
window: &mut gpui::Window,
cx: &mut gpui::Context<Self>,
) -> impl gpui::IntoElement {
todo!()
let theme = app::current_theme(cx);
div()
.flex()
.flex_row()
.items_center()
.justify_center()
.size_full()
.child(
div()
.flex()
.items_center()
.justify_center()
.w_1_3()
.h_full()
.bg(theme.colors.surface)
.relative()
.child(
text("Novem", cx)
.font_weight(FontWeight(700.))
.absolute()
.top_20()
.left_8(),
)
.child(step_list(cx)),
)
.child(
div()
.flex()
.flex_col()
.w_2_3()
.px_8()
.h_full()
.bg(theme.colors.background)
.items_start()
.justify_center()
.child(
text(
"Welcome to Novem!\nThis wizard will guide you through setting up Novem.\n",
cx,
)
.opacity(0.8),
)
.child(text("Press 'Next' to begin setup.", cx).font_weight(FontWeight(500.)))
)
}
}
fn step_list(cx: &gpui::Context<impl gpui::Render>) -> impl gpui::IntoElement {
div()
.flex()
.flex_col()
.items_start()
.w_full()
.px_8()
.justify_center()
.gap_3()
.children(vec![
text("Welcome!", cx),
text("Connect to GitHub", cx),
text("Customize Novem", cx),
text("Complete!", cx),
])
}