zed: Don't feature-gate zed: open account settings
action (#29542)
This PR removes the feature-gating of the `zed: open account settings` action, as everyone has access to the account page now. Release Notes: - N/A
This commit is contained in:
parent
4dc0551105
commit
e3c987e2fb
3 changed files with 0 additions and 27 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -18486,7 +18486,6 @@ dependencies = [
|
||||||
"collab_ui",
|
"collab_ui",
|
||||||
"collections",
|
"collections",
|
||||||
"command_palette",
|
"command_palette",
|
||||||
"command_palette_hooks",
|
|
||||||
"component_preview",
|
"component_preview",
|
||||||
"copilot",
|
"copilot",
|
||||||
"dap",
|
"dap",
|
||||||
|
|
|
@ -39,7 +39,6 @@ client.workspace = true
|
||||||
collab_ui.workspace = true
|
collab_ui.workspace = true
|
||||||
collections.workspace = true
|
collections.workspace = true
|
||||||
command_palette.workspace = true
|
command_palette.workspace = true
|
||||||
command_palette_hooks.workspace = true
|
|
||||||
component_preview.workspace = true
|
component_preview.workspace = true
|
||||||
copilot.workspace = true
|
copilot.workspace = true
|
||||||
dap_adapters.workspace = true
|
dap_adapters.workspace = true
|
||||||
|
|
|
@ -16,7 +16,6 @@ use assistant_context_editor::AssistantPanelDelegate;
|
||||||
use breadcrumbs::Breadcrumbs;
|
use breadcrumbs::Breadcrumbs;
|
||||||
use client::zed_urls;
|
use client::zed_urls;
|
||||||
use collections::VecDeque;
|
use collections::VecDeque;
|
||||||
use command_palette_hooks::CommandPaletteFilter;
|
|
||||||
use debugger_ui::debugger_panel::DebugPanel;
|
use debugger_ui::debugger_panel::DebugPanel;
|
||||||
use editor::ProposedChangesEditorToolbar;
|
use editor::ProposedChangesEditorToolbar;
|
||||||
use editor::{Editor, MultiBuffer, scroll::Autoscroll};
|
use editor::{Editor, MultiBuffer, scroll::Autoscroll};
|
||||||
|
@ -52,7 +51,6 @@ use settings::{
|
||||||
SettingsStore, VIM_KEYMAP_PATH, initial_debug_tasks_content, initial_project_settings_content,
|
SettingsStore, VIM_KEYMAP_PATH, initial_debug_tasks_content, initial_project_settings_content,
|
||||||
initial_tasks_content, update_settings_file,
|
initial_tasks_content, update_settings_file,
|
||||||
};
|
};
|
||||||
use std::any::TypeId;
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::sync::atomic::{self, AtomicBool};
|
use std::sync::atomic::{self, AtomicBool};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
@ -268,29 +266,6 @@ pub fn initialize_workspace(
|
||||||
workspace.focus_handle(cx).focus(window);
|
workspace.focus_handle(cx).focus(window);
|
||||||
})
|
})
|
||||||
.detach();
|
.detach();
|
||||||
|
|
||||||
feature_gate_zed_pro_actions(cx);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn feature_gate_zed_pro_actions(cx: &mut App) {
|
|
||||||
let zed_pro_actions = [TypeId::of::<OpenAccountSettings>()];
|
|
||||||
|
|
||||||
CommandPaletteFilter::update_global(cx, |filter, _cx| {
|
|
||||||
filter.hide_action_types(&zed_pro_actions);
|
|
||||||
});
|
|
||||||
|
|
||||||
cx.observe_flag::<feature_flags::ZedProFeatureFlag, _>({
|
|
||||||
move |is_enabled, cx| {
|
|
||||||
CommandPaletteFilter::update_global(cx, |filter, _cx| {
|
|
||||||
if is_enabled {
|
|
||||||
filter.show_action_types(zed_pro_actions.iter());
|
|
||||||
} else {
|
|
||||||
filter.hide_action_types(&zed_pro_actions);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.detach();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
|
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue