Add page notes panel

This commit is contained in:
2026-05-08 06:53:31 -04:00
parent bae3c7789f
commit 7e68857eb8
15 changed files with 844 additions and 7 deletions
+13
View File
@@ -17,6 +17,7 @@ fn internal_page_title(url: &str) -> Option<&'static str> {
match url {
"ely://new-tab" => Some("New Tab"),
"ely://bookmarks" => Some("Bookmarks"),
"ely://notes" => Some("Notes"),
"ely://reading-list" => Some("Reading List"),
"ely://downloads" => Some("Downloads"),
"ely://history" => Some("History"),
@@ -91,6 +92,14 @@ pub(crate) fn reading_progress_percent(
ReadingProgressPercent::new(percent).map(Some).map_err(CoreError::from)
}
pub(crate) fn note_body(command: &str) -> Option<&str> {
command_argument(command, &["note ", "add-note ", "add note "])
}
pub(crate) fn tab_note_body(command: &str) -> Option<&str> {
command_argument(command, &["tab-note ", "tab note ", "note-tab ", "note tab "])
}
pub(crate) fn new_profile_name(command: &str) -> Option<&str> {
command_argument(command, &["new-profile ", "new profile "])
}
@@ -134,6 +143,10 @@ pub(crate) fn reading_list_url() -> Result<UrlText, CoreError> {
internal_page_url("ely://reading-list")
}
pub(crate) fn notes_url() -> Result<UrlText, CoreError> {
internal_page_url("ely://notes")
}
pub(crate) fn history_url() -> Result<UrlText, CoreError> {
internal_page_url("ely://history")
}