mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2026-09-02 21:04:08 +03:00
fix(router): circular dependency
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
@@ -22,7 +22,7 @@ import 'uno.css';
|
||||
import '#/assets/styles/index.css';
|
||||
|
||||
/**
|
||||
* - VUE PLUGINS, STORE AND DIRECTIVE -
|
||||
* - Vue.js PLUGINS, STORE AND DIRECTIVE -
|
||||
* The order of statements IS IMPORTANT
|
||||
*/
|
||||
const remote = createRemote();
|
||||
@@ -55,3 +55,15 @@ await document.fonts.ready;
|
||||
* MOUNTING POINT
|
||||
*/
|
||||
app.mount(document.body);
|
||||
|
||||
/**
|
||||
* DEV-MODE LOGIC
|
||||
*/
|
||||
if (import.meta.env.DEV) {
|
||||
/* eslint-disable-next-line unicorn/no-lonely-if */
|
||||
if (import.meta.hot) {
|
||||
const { handleHotUpdate } = await import('vue-router/auto-routes');
|
||||
|
||||
handleHotUpdate(router);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
createWebHashHistory,
|
||||
createWebHistory
|
||||
} from 'vue-router';
|
||||
import { handleHotUpdate } from 'vue-router/auto-routes';
|
||||
import { isStr } from '@jellyfin-vue/shared/validation';
|
||||
import { remote } from '../remote/index.ts';
|
||||
import { adminGuard } from './middlewares/admin-pages.ts';
|
||||
@@ -22,9 +21,7 @@ export const router = createRouter({
|
||||
/**
|
||||
* TODO: Fix this, so it only scrolls to the top once suspense resolves
|
||||
*/
|
||||
scrollBehavior(_to, _from, savedPosition) {
|
||||
return savedPosition ?? { top: 0 };
|
||||
}
|
||||
scrollBehavior: (_to, _from, savedPosition) => savedPosition ?? { top: 0 }
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -76,7 +73,3 @@ watch([
|
||||
force: true
|
||||
});
|
||||
}, { flush: 'sync' });
|
||||
|
||||
if (import.meta.hot) {
|
||||
handleHotUpdate(router);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user