Add keybind to cycle through index sort types.
Conflicts: CHANGELOG.md src/General/Config.coffee src/General/Index.coffee src/Miscellaneous/Keybinds.coffee
This commit is contained in:
parent
98a105e603
commit
afa889d128
@ -727,6 +727,10 @@ vp-replace
|
|||||||
'Ctrl+Alt+s'
|
'Ctrl+Alt+s'
|
||||||
'Focus the search field on the board index.'
|
'Focus the search field on the board index.'
|
||||||
]
|
]
|
||||||
|
'Cycle sort type': [
|
||||||
|
'Ctrl+x'
|
||||||
|
'Cycle through index sort types.'
|
||||||
|
]
|
||||||
# Thread Navigation
|
# Thread Navigation
|
||||||
'Next thread': [
|
'Next thread': [
|
||||||
'Ctrl+Down'
|
'Ctrl+Down'
|
||||||
|
|||||||
@ -181,6 +181,12 @@ Index =
|
|||||||
else
|
else
|
||||||
ThreadHiding.hide thread
|
ThreadHiding.hide thread
|
||||||
ThreadHiding.saveHiddenState thread
|
ThreadHiding.saveHiddenState thread
|
||||||
|
cycleSortType: ->
|
||||||
|
types = [Index.selectSort.options...].filter (option) -> !option.disabled
|
||||||
|
for type, i in types
|
||||||
|
break if type.selected
|
||||||
|
types[(i + 1) % types.length].selected = true
|
||||||
|
$.event 'change', null, Index.selectSort
|
||||||
|
|
||||||
cb:
|
cb:
|
||||||
toggleHiddenThreads: ->
|
toggleHiddenThreads: ->
|
||||||
|
|||||||
@ -131,6 +131,9 @@ Keybinds =
|
|||||||
searchInput.focus()
|
searchInput.focus()
|
||||||
when Conf['Open catalog']
|
when Conf['Open catalog']
|
||||||
window.location = CatalogLinks.catalog()
|
window.location = CatalogLinks.catalog()
|
||||||
|
when Conf['Cycle sort type']
|
||||||
|
return unless Conf['JSON Navigation']
|
||||||
|
Index.cycleSortType()
|
||||||
# Thread Navigation
|
# Thread Navigation
|
||||||
when Conf['Next thread']
|
when Conf['Next thread']
|
||||||
return if g.VIEW isnt 'index' or !threadRoot
|
return if g.VIEW isnt 'index' or !threadRoot
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user