Filestash currently supports default file page sort key via general.filepage_default_sort, but not default sort direction. This makes it hard to configure “Name A-Z” as the initial browser state.
Related possible bug- the current menu hardcodes the checkmark next to “Sort By Type” even when sort state is name.
Proposal:
- Add
general.filepage_default_order with options asc/des.
- Export it as default_order in
/api/config.
- Use
getConfig("default_order", existing default) in filespage state_config.js.
- Render the sort dropdown checkmark from current
state.sort/state.order instead of hardcoding it on Sort By Type.
- Preserve behavior of localStorage settings overriding defaults.
I can put together a PR if this looks fine. Should be relatively low-risk.
Filestash currently supports default file page sort key via
general.filepage_default_sort, but not default sort direction. This makes it hard to configure “Name A-Z” as the initial browser state.Related possible bug- the current menu hardcodes the checkmark next to “Sort By Type” even when sort
stateisname.Proposal:
general.filepage_default_orderwith optionsasc/des./api/config.getConfig("default_order", existing default)in filespage state_config.js.state.sort/state.orderinstead of hardcoding it on Sort By Type.I can put together a PR if this looks fine. Should be relatively low-risk.