Add downloads settings page

This commit is contained in:
2026-05-08 03:24:59 -04:00
parent 6ba7fd611c
commit e2d8b0cc6e
8 changed files with 336 additions and 2 deletions
+14 -2
View File
@@ -7,8 +7,8 @@ mod splits;
use ely_browser_core::{BrowserCore, InitialBrowserConfig};
use ely_domain::{
ArchivePolicy, CommandIntent, HistoryRecordingPolicy, NewTabDestination, ProfileId,
SearchEngine, SpaceId, TabId, UrlText,
ArchivePolicy, CommandIntent, DownloadPolicy, HistoryRecordingPolicy, NewTabDestination,
ProfileId, SearchEngine, SpaceId, TabId, UrlText,
};
use gpui::{App, AppContext, Context, Entity, FocusHandle, Focusable, Subscription, Window};
use gpui_component::input::{InputEvent, InputState, SelectAll};
@@ -298,6 +298,18 @@ impl ElyShell {
}
}
fn set_active_profile_download_policy(
&mut self,
policy: DownloadPolicy,
cx: &mut Context<Self>,
) {
if let ShellState::Ready(core) = &mut self.state
&& core.set_active_profile_download_policy(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()