Add client::zed_urls
module for constructing zed.dev URLs (#19391)
This PR adds a new `zed_urls` module to the `client` crate. This module contains functions for constructing URLs to Zed properties, such as zed.dev. The URLs produced by this module will respect the server URL set via settings or the `ZED_SERVER_URL` environment variable. This allows them to correctly reflect the current environment (such as when testing Zed against a local collab/zed.dev). Release Notes: - N/A
This commit is contained in:
parent
3c32f01a8f
commit
2bcf9fc490
5 changed files with 30 additions and 12 deletions
|
@ -11,7 +11,7 @@ pub(crate) mod windows_only_instance;
|
|||
pub use app_menus::*;
|
||||
use assistant::PromptBuilder;
|
||||
use breadcrumbs::Breadcrumbs;
|
||||
use client::ZED_URL_SCHEME;
|
||||
use client::{zed_urls, ZED_URL_SCHEME};
|
||||
use collections::VecDeque;
|
||||
use command_palette_hooks::CommandPaletteFilter;
|
||||
use editor::ProposedChangesEditorToolbar;
|
||||
|
@ -419,8 +419,7 @@ pub fn initialize_workspace(
|
|||
)
|
||||
.register_action(
|
||||
|_: &mut Workspace, _: &OpenAccountSettings, cx: &mut ViewContext<Workspace>| {
|
||||
let server_url = &client::ClientSettings::get_global(cx).server_url;
|
||||
cx.open_url(&format!("{server_url}/account"));
|
||||
cx.open_url(&zed_urls::account_url(cx));
|
||||
},
|
||||
)
|
||||
.register_action(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue