diff --git a/crates/assets/assets/backgrounds/banner1.jpg b/crates/assets/assets/backgrounds/banner1.jpg deleted file mode 100644 index 89995e3..0000000 Binary files a/crates/assets/assets/backgrounds/banner1.jpg and /dev/null differ diff --git a/crates/assets/assets/backgrounds/banner2.jpg b/crates/assets/assets/backgrounds/banner2.jpg deleted file mode 100644 index 2654893..0000000 Binary files a/crates/assets/assets/backgrounds/banner2.jpg and /dev/null differ diff --git a/crates/assets/assets/backgrounds/banner3.jpg b/crates/assets/assets/backgrounds/banner3.jpg deleted file mode 100644 index 381235e..0000000 Binary files a/crates/assets/assets/backgrounds/banner3.jpg and /dev/null differ diff --git a/crates/assets/assets/backgrounds/headline.png b/crates/assets/assets/backgrounds/headline.png deleted file mode 100644 index 6fe5467..0000000 Binary files a/crates/assets/assets/backgrounds/headline.png and /dev/null differ diff --git a/crates/assets/src/lib.rs b/crates/assets/src/lib.rs index 5dd3587..667cb5d 100644 --- a/crates/assets/src/lib.rs +++ b/crates/assets/src/lib.rs @@ -5,8 +5,6 @@ use rust_embed::RustEmbed; #[derive(RustEmbed)] #[folder = "assets"] #[include = "icons/**/*.svg"] -#[include = "backgrounds/**/*.jpg"] -#[include = "backgrounds/**/*.png"] #[exclude = "*.DS_Store"] pub struct Assets; diff --git a/crates/signed_app/src/app/sign_in.rs b/crates/signed_app/src/app/sign_in.rs index 175c0b8..0f5dcf8 100644 --- a/crates/signed_app/src/app/sign_in.rs +++ b/crates/signed_app/src/app/sign_in.rs @@ -1,8 +1,5 @@ -use std::time::{SystemTime, UNIX_EPOCH}; - use gpui::{ - Context, IntoElement, ObjectFit, ParentElement as _, Render, SharedString, Styled as _, - StyledImage as _, Window, div, img, + Context, FontWeight, IntoElement, ParentElement as _, Render, Styled as _, Window, div, }; use gpui_native_kit::button::{Button, ButtonVariant}; use gpui_native_kit::common::v_flex; @@ -10,15 +7,11 @@ use gpui_native_kit::layout::panel::Panel; use crate::identity; -pub struct SignedOutView { - banner: SharedString, -} +pub struct SignedOutView; impl SignedOutView { pub fn new() -> Self { - Self { - banner: pick_banner(), - } + Self } } @@ -28,49 +21,34 @@ impl Render for SignedOutView { fn render(&mut self, _window: &mut Window, _cx: &mut Context) -> impl IntoElement { v_flex() .size_full() - .relative() + .items_center() + .justify_center() + .gap_4() .child( - div().absolute().inset_0().child( - img(self.banner.clone()) - .size_full() - .object_fit(ObjectFit::Cover), - ), + div() + .text_2xl() + .font_weight(FontWeight::SEMIBOLD) + .child("Signed"), ) .child( v_flex() - .size_full() - .justify_end() - .p_4() - .gap_4() - .child(img("backgrounds/headline.png").max_w_48()) + .gap_1() + .w_48() .child( - v_flex() - .gap_1() - .w_full() - .child(Button::new("onboarding").label("Join now").on_click( - |_, _, cx| { - identity::helpers::open_onboarding(cx); - }, - )) - .child( - Button::new("import") - .label("Import identity") - .variant(ButtonVariant::Secondary) - .on_click(|_, _, cx| { - identity::helpers::open_import(cx); - }), - ), + Button::new("onboarding") + .label("Join now") + .on_click(|_, _, cx| { + identity::helpers::open_onboarding(cx); + }), + ) + .child( + Button::new("import") + .label("Import identity") + .variant(ButtonVariant::Secondary) + .on_click(|_, _, cx| { + identity::helpers::open_import(cx); + }), ), ) } } - -fn pick_banner() -> SharedString { - let num = SystemTime::now() - .duration_since(UNIX_EPOCH) - .map(|duration| duration.subsec_nanos()) - .unwrap_or(1) - % 3 - + 1; - format!("backgrounds/banner{num}.jpg").into() -}