Füge Authentifizierungs-Login-Route zum Router hinzu und entferne die bestehende Route, falls vorhanden. Aktualisiere die Router-Konfiguration, um die neue Login-Komponente zu integrieren.
This commit is contained in:
@@ -54,6 +54,7 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
addRegisterRoute();
|
addRegisterRoute();
|
||||||
addForgotPasswordRoute();
|
addForgotPasswordRoute();
|
||||||
addResetPasswordRoute();
|
addResetPasswordRoute();
|
||||||
|
addAuthLoginRoute();
|
||||||
router.addRoute({
|
router.addRoute({
|
||||||
path: '/:pathMatch(.*)*',
|
path: '/:pathMatch(.*)*',
|
||||||
components: {
|
components: {
|
||||||
@@ -128,9 +129,24 @@ function addResetPasswordRoute() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addAuthLoginRoute() {
|
||||||
|
if (router.hasRoute('/auth/login')) {
|
||||||
|
router.removeRoute('/auth/login');
|
||||||
|
}
|
||||||
|
router.addRoute({
|
||||||
|
path: '/auth/login',
|
||||||
|
components: {
|
||||||
|
default: () => import('./content/authentication/LoginContent.vue'),
|
||||||
|
rightColumn: loadComponent('ImageContent')
|
||||||
|
},
|
||||||
|
name: 'auth-login'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
addEditPagesRoute();
|
addEditPagesRoute();
|
||||||
addRegisterRoute();
|
addRegisterRoute();
|
||||||
addForgotPasswordRoute();
|
addForgotPasswordRoute();
|
||||||
addResetPasswordRoute();
|
addResetPasswordRoute();
|
||||||
|
addAuthLoginRoute();
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
|||||||
Reference in New Issue
Block a user