1//! Contains helper functions for constructing URLs to various Zed-related pages.
2//!
3//! These URLs will adapt to the configured server URL in order to construct
4//! links appropriate for the environment (e.g., by linking to a local copy of
5//! zed.dev in development).
6
7use gpui::App;
8use settings::Settings;
9
10use crate::ClientSettings;
11
12fn server_url(cx: &App) -> &str {
13 &ClientSettings::get_global(cx).server_url
14}
15
16/// Returns the URL to the account page on zed.dev.
17pub fn account_url(cx: &App) -> String {
18 format!("{server_url}/account", server_url = server_url(cx))
19}