Show current plan in user menu (#15513)

This PR updates the user menu to show the user's current plan.

Also adds a new RPC message to send this information down to the client
when Zed starts.

This is behind a feature flag.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
This commit is contained in:
Marshall Bowers 2024-07-30 17:38:16 -04:00 committed by GitHub
parent 161c6ca6a4
commit a7ffc2b6f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 95 additions and 11 deletions

View file

@ -47,7 +47,7 @@ use workspace::{
open_new, AppState, NewFile, NewWindow, OpenLog, Toast, Workspace, WorkspaceSettings,
};
use workspace::{notifications::DetachAndPromptErr, Pane};
use zed_actions::{OpenBrowser, OpenSettings, OpenZedUrl, Quit};
use zed_actions::{OpenAccountSettings, OpenBrowser, OpenSettings, OpenZedUrl, Quit};
actions!(
zed,
@ -422,6 +422,12 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
);
},
)
.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}/settings"));
},
)
.register_action(
move |_: &mut Workspace, _: &OpenTasks, cx: &mut ViewContext<Workspace>| {
open_settings_file(