mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 21:19:19 +00:00
implement 'read all' and 'show' shortcuts
(A) -> show All (U) -> show Unread (S) -> show Starred (R) -> mark all read
This commit is contained in:
parent
1cdde4a6b8
commit
bd12096e74
@ -49,6 +49,12 @@ const shortcutFunctions = {
|
|||||||
vm.toggleItemRead(vm.itemSelectedDetails)
|
vm.toggleItemRead(vm.itemSelectedDetails)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
markAllRead: function() {
|
||||||
|
// same condition as 'Mark all read button'
|
||||||
|
if(vm.filterSelected == 'unread'){
|
||||||
|
vm.markItemsRead()
|
||||||
|
}
|
||||||
|
},
|
||||||
toggleItemStarred: function() {
|
toggleItemStarred: function() {
|
||||||
if(vm.itemSelected != null) {
|
if(vm.itemSelected != null) {
|
||||||
vm.toggleItemStarred(vm.itemSelectedDetails)
|
vm.toggleItemStarred(vm.itemSelectedDetails)
|
||||||
@ -69,16 +75,29 @@ const shortcutFunctions = {
|
|||||||
previousFeed() {
|
previousFeed() {
|
||||||
helperFunctions.navigateToFeed(-1)
|
helperFunctions.navigateToFeed(-1)
|
||||||
},
|
},
|
||||||
|
showAll() {
|
||||||
|
vm.filterSelected = ''
|
||||||
|
},
|
||||||
|
showUnread() {
|
||||||
|
vm.filterSelected = 'unread'
|
||||||
|
},
|
||||||
|
showStarred() {
|
||||||
|
vm.filterSelected = 'starred'
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const keybindings = {
|
const keybindings = {
|
||||||
"r": shortcutFunctions.toggleItemRead,
|
"r": shortcutFunctions.toggleItemRead,
|
||||||
|
"R": shortcutFunctions.markAllRead,
|
||||||
"s": shortcutFunctions.toggleItemStarred,
|
"s": shortcutFunctions.toggleItemStarred,
|
||||||
"?": shortcutFunctions.focusSearch,
|
"?": shortcutFunctions.focusSearch,
|
||||||
"j": shortcutFunctions.nextItem,
|
"j": shortcutFunctions.nextItem,
|
||||||
"k": shortcutFunctions.previousItem,
|
"k": shortcutFunctions.previousItem,
|
||||||
"l": shortcutFunctions.nextFeed,
|
"l": shortcutFunctions.nextFeed,
|
||||||
"h": shortcutFunctions.previousFeed,
|
"h": shortcutFunctions.previousFeed,
|
||||||
|
"A": shortcutFunctions.showAll,
|
||||||
|
"U": shortcutFunctions.showUnread,
|
||||||
|
"S": shortcutFunctions.showStarred,
|
||||||
}
|
}
|
||||||
|
|
||||||
function isTextBox(element) {
|
function isTextBox(element) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user