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'
|
||||
'Focus the search field on the board index.'
|
||||
]
|
||||
'Cycle sort type': [
|
||||
'Ctrl+x'
|
||||
'Cycle through index sort types.'
|
||||
]
|
||||
# Thread Navigation
|
||||
'Next thread': [
|
||||
'Ctrl+Down'
|
||||
|
||||
@ -181,6 +181,12 @@ Index =
|
||||
else
|
||||
ThreadHiding.hide 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:
|
||||
toggleHiddenThreads: ->
|
||||
|
||||
@ -131,6 +131,9 @@ Keybinds =
|
||||
searchInput.focus()
|
||||
when Conf['Open catalog']
|
||||
window.location = CatalogLinks.catalog()
|
||||
when Conf['Cycle sort type']
|
||||
return unless Conf['JSON Navigation']
|
||||
Index.cycleSortType()
|
||||
# Thread Navigation
|
||||
when Conf['Next thread']
|
||||
return if g.VIEW isnt 'index' or !threadRoot
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user