mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-01 04:54:54 +02:00
Fix config page not scrolling, add scroll arrows on home page, fix routing issue on back button, fix continue reading shelf
This commit is contained in:
parent
8389a31775
commit
8dc0acb6b7
11 changed files with 195 additions and 95 deletions
19
client/middleware/routed.js
Normal file
19
client/middleware/routed.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
export default function (context) {
|
||||
if (process.client) {
|
||||
var route = context.route
|
||||
var from = context.from
|
||||
var store = context.store
|
||||
|
||||
if (route.name === 'login' || from.name === 'login') return
|
||||
|
||||
if (route.name === 'config' || route.name === 'upload' || route.name === 'account' || route.name.startsWith('audiobook-id')) {
|
||||
if (from.name !== route.name && from.name !== 'audiobook-id-edit' && from.name !== 'config' && from.name !== 'upload' && from.name !== 'account') {
|
||||
var _history = [...store.state.routeHistory]
|
||||
if (!_history.length || _history[_history.length - 1] !== from.fullPath) {
|
||||
_history.push(from.fullPath)
|
||||
store.commit('setRouteHistory', _history)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue