Add spaces settings page

This commit is contained in:
2026-05-08 02:55:37 -04:00
parent f6e2b1b96b
commit 3a1c415572
5 changed files with 282 additions and 0 deletions
@@ -28,6 +28,7 @@ fn internal_page_title(url: &str) -> Option<&'static str> {
"ely://about" => Some("About ELY Browser"),
"ely://settings" => Some("Settings"),
"ely://settings/sidebar-tabs" => Some("Sidebar & Tabs Settings"),
"ely://settings/spaces" => Some("Space Settings"),
"ely://settings/shortcuts" => Some("Shortcut Settings"),
"ely://settings/plugins" => Some("Plugin Settings"),
"ely://settings/profiles" => Some("Profile Settings"),
@@ -162,6 +163,7 @@ fn settings_page_route(query: &str) -> Option<&'static str> {
"sidebar" | "tabs" | "sidebar tabs" | "sidebar & tabs" => {
Some("ely://settings/sidebar-tabs")
}
"space" | "spaces" | "space settings" | "spaces settings" => Some("ely://settings/spaces"),
"shortcut" | "shortcuts" | "keyboard" | "keyboard shortcuts" => {
Some("ely://settings/shortcuts")
}
@@ -44,3 +44,24 @@ fn settings_scoped_search_opens_shortcuts_page() -> Result<(), Box<dyn Error>> {
assert_eq!(core.snapshot()?.command_query, "");
Ok(())
}
#[test]
fn settings_scoped_search_opens_spaces_page() -> Result<(), Box<dyn Error>> {
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;
core.set_command_query("@settings spaces");
let intent = core.submit_command()?;
let active_tab = core.active_tab()?;
assert_eq!(
intent,
Some(CommandIntent::ScopedSearch {
scope: CommandScope::Settings,
query: "spaces".to_string(),
})
);
assert_eq!(active_tab.title(), "Space Settings");
assert_eq!(active_tab.url().as_str(), "ely://settings/spaces");
assert_eq!(core.snapshot()?.command_query, "");
Ok(())
}