Add about internal page
This commit is contained in:
@@ -19,6 +19,7 @@ fn internal_page_title(url: &str) -> Option<&'static str> {
|
||||
"ely://downloads" => Some("Downloads"),
|
||||
"ely://history" => Some("History"),
|
||||
"ely://archive" => Some("Archived Tabs"),
|
||||
"ely://about" => Some("About ELY Browser"),
|
||||
"ely://settings" => Some("Settings"),
|
||||
"ely://settings/plugins" => Some("Plugin Settings"),
|
||||
"ely://settings/profiles" => Some("Profile Settings"),
|
||||
@@ -87,6 +88,10 @@ pub(crate) fn history_url() -> Result<UrlText, CoreError> {
|
||||
internal_page_url("ely://history")
|
||||
}
|
||||
|
||||
pub(crate) fn about_url() -> Result<UrlText, CoreError> {
|
||||
internal_page_url("ely://about")
|
||||
}
|
||||
|
||||
pub(crate) fn settings_url() -> Result<UrlText, CoreError> {
|
||||
internal_page_url("ely://settings")
|
||||
}
|
||||
@@ -107,6 +112,7 @@ pub(crate) fn settings_page_url(query: &str) -> Result<Option<UrlText>, CoreErro
|
||||
fn settings_page_route(query: &str) -> Option<&'static str> {
|
||||
match query {
|
||||
"settings" | "general" | "browser" => Some("ely://settings"),
|
||||
"about" | "about ely browser" => Some("ely://about"),
|
||||
"sync" | "sync settings" => Some("ely://settings/sync"),
|
||||
"profile" | "profiles" | "profile settings" | "profiles settings" => {
|
||||
Some("ely://settings/profiles")
|
||||
|
||||
@@ -3,9 +3,9 @@ use ely_domain::{CommandIntent, CommandScope, ProfileId, ProfileKind, SpaceId};
|
||||
use crate::{
|
||||
CoreError,
|
||||
navigation::{
|
||||
downloads_url, history_url, move_tab_space_name, new_profile_name, new_space_name,
|
||||
search_url, settings_page_url, settings_url, space_icon, switch_profile_name,
|
||||
sync_status_url,
|
||||
about_url, downloads_url, history_url, move_tab_space_name, new_profile_name,
|
||||
new_space_name, search_url, settings_page_url, settings_url, space_icon,
|
||||
switch_profile_name, sync_status_url,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -106,6 +106,10 @@ impl BrowserCore {
|
||||
self.open_tab(history_url()?);
|
||||
Ok(true)
|
||||
}
|
||||
"about" | "open-about" | "open about" => {
|
||||
self.open_tab(about_url()?);
|
||||
Ok(true)
|
||||
}
|
||||
"settings" | "open-settings" | "open settings" => {
|
||||
self.open_tab(settings_url()?);
|
||||
Ok(true)
|
||||
|
||||
Reference in New Issue
Block a user