Add task manager internal page

This commit is contained in:
2026-05-08 01:03:59 -04:00
parent b8d2b291b2
commit a6077fa00a
8 changed files with 332 additions and 3 deletions
+15 -2
View File
@@ -13,8 +13,8 @@ use plugins::{PendingPluginInstall, PendingPluginUninstall};
use crate::{
CloseCurrentTab, FocusAddressBar, FocusCommandMode, OpenDownloads, OpenHistory, OpenNewTab,
OpenSettings, RestoreClosedTab, SelectNextTab, SelectPreviousTab, ToggleFavoriteTab,
TogglePinnedTab,
OpenSettings, OpenTaskManager, RestoreClosedTab, SelectNextTab, SelectPreviousTab,
ToggleFavoriteTab, TogglePinnedTab,
};
enum ShellState {
@@ -114,6 +114,10 @@ impl ElyShell {
self.open_internal_tab("ely://settings", window, cx);
}
fn open_task_manager(&mut self, window: &mut Window, cx: &mut Context<Self>) {
self.open_internal_tab("ely://task-manager", window, cx);
}
fn open_internal_tab(&mut self, url_text: &str, window: &mut Window, cx: &mut Context<Self>) {
if let Ok(url) = UrlText::parse(url_text) {
self.open_url(url, window, cx);
@@ -294,6 +298,15 @@ impl ElyShell {
self.open_settings(window, cx);
}
fn on_open_task_manager(
&mut self,
_: &OpenTaskManager,
window: &mut Window,
cx: &mut Context<Self>,
) {
self.open_task_manager(window, cx);
}
fn on_restore_closed_tab(
&mut self,
_: &RestoreClosedTab,