Differentiate preview channel in 'about zed' dialog

This commit is contained in:
Max Brunsfeld 2022-10-25 16:24:38 -07:00
parent 22db5bffe8
commit 1cdd3c0e28

View file

@ -9,6 +9,7 @@ use anyhow::{anyhow, Context, Result};
use assets::Assets;
use breadcrumbs::Breadcrumbs;
pub use client;
use client::PREVIEW_CHANNEL;
use collab_ui::{CollabTitlebarItem, ToggleCollaborationMenu};
use collections::VecDeque;
pub use editor;
@ -377,9 +378,11 @@ fn quit(_: &Quit, cx: &mut gpui::MutableAppContext) {
}
fn about(_: &mut Workspace, _: &About, cx: &mut gpui::ViewContext<Workspace>) {
let channel = if *PREVIEW_CHANNEL { "Preview " } else { "" };
let version = env!("CARGO_PKG_VERSION");
cx.prompt(
gpui::PromptLevel::Info,
&format!("Zed {}", env!("CARGO_PKG_VERSION")),
&format!("Zed {channel}{version}"),
&["OK"],
);
}