diff --git a/Cargo.lock b/Cargo.lock index 4cb7a85e359c6eb8f74e52cf9ed74ef799431831..b752fc829276660666f864eec9a45074ef089e1e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13273,6 +13273,7 @@ dependencies = [ "util", "vim", "workspace", + "zed_actions", ] [[package]] diff --git a/crates/welcome/Cargo.toml b/crates/welcome/Cargo.toml index e747072cdeba704686300da0a6cc1bcbfb5acb87..0db1af9252ebcd7fdeccf48b4a141f9658195487 100644 --- a/crates/welcome/Cargo.toml +++ b/crates/welcome/Cargo.toml @@ -17,11 +17,11 @@ test-support = [] [dependencies] anyhow.workspace = true client.workspace = true -inline_completion_button.workspace = true db.workspace = true extensions_ui.workspace = true fuzzy.workspace = true gpui.workspace = true +inline_completion_button.workspace = true install_cli.workspace = true picker.workspace = true project.workspace = true @@ -33,6 +33,7 @@ ui.workspace = true util.workspace = true vim.workspace = true workspace.workspace = true +zed_actions.workspace = true [dev-dependencies] editor = { workspace = true, features = ["test-support"] } diff --git a/crates/welcome/src/welcome.rs b/crates/welcome/src/welcome.rs index fc837c68671a31d918a0318dd98136e3b61c0395..1be2567c0af003227d718b14688c1a2264d01086 100644 --- a/crates/welcome/src/welcome.rs +++ b/crates/welcome/src/welcome.rs @@ -25,6 +25,7 @@ pub use multibuffer_hint::*; actions!(welcome, [ResetHints]); pub const FIRST_OPEN: &str = "first_open"; +pub const DOCS_URL: &str = "https://zed.dev/docs/"; pub fn init(cx: &mut AppContext) { BaseKeymap::register(cx); @@ -74,27 +75,22 @@ impl Render for WelcomePage { .track_focus(&self.focus_handle) .child( v_flex() - .w_96() - .gap_4() + .w_80() + .gap_6() .mx_auto() .child( svg() .path("icons/logo_96.svg") - .text_color(gpui::white()) - .w(px(96.)) - .h(px(96.)) + .text_color(cx.theme().colors().icon_disabled) + .w(px(80.)) + .h(px(80.)) .mx_auto(), ) - .child( - h_flex() - .justify_center() - .child(Label::new("Code at the speed of thought")), - ) .child( v_flex() .gap_2() .child( - Button::new("choose-theme", "Choose a theme") + Button::new("choose-theme", "Choose Theme") .full_width() .on_click(cx.listener(|this, _, cx| { this.telemetry.report_app_event( @@ -112,7 +108,7 @@ impl Render for WelcomePage { })), ) .child( - Button::new("choose-keymap", "Choose a keymap") + Button::new("choose-keymap", "Choose Keymap") .full_width() .on_click(cx.listener(|this, _, cx| { this.telemetry.report_app_event( @@ -129,6 +125,27 @@ impl Render for WelcomePage { .ok(); })), ) + .child( + Button::new("edit settings", "Edit Settings") + .full_width() + .on_click(cx.listener(|this, _, cx| { + this.telemetry.report_app_event( + "welcome page: edit settings".to_string(), + ); + cx.dispatch_action(Box::new(zed_actions::OpenSettings)); + })), + ) + .child(Button::new("view docs", "View Docs").full_width().on_click( + cx.listener(|this, _, cx| { + this.telemetry + .report_app_event("welcome page: view docs".to_string()); + cx.open_url(DOCS_URL); + }), + )), + ) + .child( + v_flex() + .gap_2() .when(cfg!(target_os = "macos"), |el| { el.child( Button::new("install-cli", "Install the CLI") @@ -304,7 +321,7 @@ impl Item for WelcomePage { type Event = ItemEvent; fn tab_content_text(&self, _cx: &WindowContext) -> Option { - Some("Welcome to Zed!".into()) + Some("Welcome".into()) } fn telemetry_event_text(&self) -> Option<&'static str> {