Normalize legacy home redirects
This commit is contained in:
@@ -4,7 +4,6 @@ import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import { LOGIN_PATH } from '@vben/constants';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { resetAllStores, useAccessStore, useUserStore } from '@vben/stores';
|
||||
|
||||
import { defineStore } from 'pinia';
|
||||
@@ -12,13 +11,7 @@ import { defineStore } from 'pinia';
|
||||
import { getAccessCodesApi, loginApi, logoutApi } from '#/api/core/auth';
|
||||
import { getUserInfoApi } from '#/api/core/user';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
function normalizeHomePath(path?: null | string) {
|
||||
if (!path || path === '/page-render/main_home') {
|
||||
return preferences.app.defaultHomePath;
|
||||
}
|
||||
return path;
|
||||
}
|
||||
import { normalizeHomePath } from '#/utils/legacy-home';
|
||||
|
||||
export const useAuthStore = defineStore('auth', () => {
|
||||
const accessStore = useAccessStore();
|
||||
|
||||
Reference in New Issue
Block a user