Add sidebar tab archive settings

This commit is contained in:
2026-05-08 02:40:16 -04:00
parent 7f479ff9e1
commit 8b75b33761
6 changed files with 308 additions and 2 deletions
+21 -1
View File
@@ -6,7 +6,7 @@ mod site_permissions;
mod splits;
use ely_browser_core::{BrowserCore, InitialBrowserConfig};
use ely_domain::{CommandIntent, ProfileId, SpaceId, TabId, UrlText};
use ely_domain::{ArchivePolicy, CommandIntent, ProfileId, SpaceId, TabId, UrlText};
use gpui::{App, AppContext, Context, Entity, FocusHandle, Focusable, Subscription, Window};
use gpui_component::input::{InputEvent, InputState, SelectAll};
@@ -252,6 +252,26 @@ impl ElyShell {
}
}
fn set_active_space_archive_policy(
&mut self,
archive_policy: ArchivePolicy,
cx: &mut Context<Self>,
) {
if let ShellState::Ready(core) = &mut self.state
&& core.set_active_space_archive_policy(archive_policy).is_ok()
{
cx.notify();
}
}
fn archive_idle_tabs_now(&mut self, cx: &mut Context<Self>) {
if let ShellState::Ready(core) = &mut self.state
&& core.archive_idle_tabs(std::time::SystemTime::now()).is_ok()
{
cx.notify();
}
}
fn on_close_current_tab(
&mut self,
_: &CloseCurrentTab,