feat: browse and save combined category feeds

This commit is contained in:
2026-10-11 23:30:11 +02:00
parent ff7590dfa7
commit b53b57ee17
4 changed files with 1143 additions and 172 deletions
+23 -7
View File
@@ -22,7 +22,7 @@ pub enum Context {
TagList,
TagFilter,
TagInput,
RenameInput,
CategoryNameInput,
Help,
}
@@ -39,7 +39,7 @@ const ALL: &[Context] = &[
Context::TagList,
Context::TagFilter,
Context::TagInput,
Context::RenameInput,
Context::CategoryNameInput,
Context::Help,
];
const VIEW: &[Context] = &[
@@ -60,7 +60,7 @@ const TEXT: &[Context] = &[
Context::SelectorInput,
Context::TagFilter,
Context::TagInput,
Context::RenameInput,
Context::CategoryNameInput,
];
const NON_TEXT: &[Context] = &[
Context::Normal,
@@ -105,7 +105,7 @@ actions! {
Interrupt, "app.interrupt", "Exit immediately", ALL, ["ctrl+c"];
Quit, "app.quit", "Quit the application", &[Context::Normal, Context::Info, Context::Description, Context::CollectionNormal, Context::CollectionInfo, Context::CollectionDescription, Context::Help], ["q"];
Help, "help.toggle", "Open or close keyboard help", NON_TEXT, ["?"];
InputSubmit, "input.submit", "Submit search, browse selector, leave tag filter, stage new tag or rename category", TEXT, ["enter"];
InputSubmit, "input.submit", "Submit search, browse selector, leave tag filter, stage new tag or save category name", TEXT, ["enter"];
InputCancel, "input.cancel", "Leave text input without submitting", TEXT, ["escape"];
DeleteCharacter, "input.delete.character", "Delete the previous character", TEXT, ["backspace"];
DeleteWord, "input.delete.word", "Delete the previous word", TEXT, ["alt+backspace", "ctrl+w"];
@@ -130,6 +130,7 @@ actions! {
ChannelTags, "channel.tags", "Edit the selected channel's category tags", VIEW, ["s"];
CategoryTags, "category.tags", "Edit category tags for all channels in this category", VIEW, ["S"];
CategoryRename, "category.rename", "Rename the current or selected category", &[Context::Normal, Context::CollectionNormal, Context::SelectorNormal, Context::TagList], ["R"];
CategorySave, "category.save", "Save the combined category view as a new category", VIEW, ["P"];
WatchLaterSave, "video.watch_later.save", "Save the selected video to watch later", VIEW, ["w"];
WatchLaterBrowse, "view.watch_later.browse", "Choose watch later across all categories or one category", VIEW, ["W"];
WatchLaterBrowseCategory, "view.watch_later.category", "Browse the current category's watch later", VIEW, ["alt+w"];
@@ -146,6 +147,7 @@ actions! {
SelectorEdit, "selector.edit", "Edit the category, channel, or collection filter", &[Context::SelectorNormal], ["i"];
SelectorOpen, "selector.open", "Open the selected category, channel, or collection", &[Context::SelectorNormal], ["enter"];
SelectorPin, "selector.pin", "Toggle category pinning (category picker only)", &[Context::SelectorNormal], ["p"];
SelectorToggle, "selector.toggle", "Check a category for combined browsing (category picker only)", &[Context::SelectorNormal], ["space"];
SelectorClose, "selector.close", "Close the category, channel, or collection picker", &[Context::SelectorNormal], ["escape"];
TagNext, "tags.select.next", "Select the next category tag", &[Context::TagList], ["j", "down"];
TagPrevious, "tags.select.previous", "Select the previous category tag", &[Context::TagList], ["k", "up"];
@@ -486,6 +488,10 @@ impl Bindings {
&[CategoryRename],
"Rename the current category (including scoped collections)",
),
(
&[CategorySave],
"Save a combined category view as a new category",
),
(&[ViewTabNext, ViewTabPrevious], "Cycle visible tabs"),
(&[ViewPrevious], "Back (preview close takes priority)"),
(&[ViewNext], "Forward after going back"),
@@ -571,7 +577,14 @@ impl Bindings {
&[SelectorInputNext, SelectorInputPrevious],
"Move while filtering",
),
(&[SelectorOpen, InputSubmit], "Browse the selected match"),
(
&[SelectorOpen, InputSubmit],
"Browse checked categories, or the selected match",
),
(
&[SelectorToggle],
"Check categories for a combined feed (NORMAL only)",
),
(
&[SelectorPin],
"Pin / unpin a category (category picker only)",
@@ -610,9 +623,12 @@ impl Bindings {
&[
(
&[InputSubmit],
"Submit search / stage tag / commit category rename",
"Submit search / stage tag / save category name",
),
(
&[InputCancel],
"Leave INSERT / abandon tag or category name",
),
(&[InputCancel], "Leave INSERT / abandon tag name or rename"),
(&[DeleteCharacter], "Delete one character"),
(&[DeleteWord], "Delete previous word"),
(&[DeleteLine], "Clear the line"),