@@ -323,106 +386,3 @@
-
-
diff --git a/front/src/components/Logo.vue b/front/src/components/Logo.vue
index 073edb958..986aa3dd8 100644
--- a/front/src/components/Logo.vue
+++ b/front/src/components/Logo.vue
@@ -1,3 +1,13 @@
+
+
-
-
diff --git a/front/src/components/LogoText.vue b/front/src/components/LogoText.vue
index 6e9cc3fc1..480e4b56f 100644
--- a/front/src/components/LogoText.vue
+++ b/front/src/components/LogoText.vue
@@ -1,3 +1,17 @@
+
+
-
-
diff --git a/front/src/components/PageNotFound.vue b/front/src/components/PageNotFound.vue
index 57d7c3350..c0fa64e4b 100644
--- a/front/src/components/PageNotFound.vue
+++ b/front/src/components/PageNotFound.vue
@@ -1,3 +1,15 @@
+
+
-
-
diff --git a/front/src/components/ServiceMessages.vue b/front/src/components/ServiceMessages.vue
index a7f990888..4f16067ba 100644
--- a/front/src/components/ServiceMessages.vue
+++ b/front/src/components/ServiceMessages.vue
@@ -8,8 +8,3 @@
-
-
diff --git a/front/src/router/routes/index.ts b/front/src/router/routes/index.ts
index 6aba33a9e..eccbde829 100644
--- a/front/src/router/routes/index.ts
+++ b/front/src/router/routes/index.ts
@@ -3,6 +3,7 @@ import settings from './settings'
import library from './library'
import content from './content'
import manage from './manage'
+import store from '~/store'
import auth from './auth'
import user from './user'
@@ -10,7 +11,11 @@ export default [
{
path: '/',
name: 'index',
- component: () => import('~/components/Home.vue')
+ component: () => import('~/components/Home.vue'),
+ beforeEnter (to, from, next) {
+ if (store.state.auth.authenticated) return next('/library')
+ return next()
+ }
},
{
path: '/index.html',
diff --git a/front/src/store/auth.ts b/front/src/store/auth.ts
index 6cfd5b72f..0aea65cf4 100644
--- a/front/src/store/auth.ts
+++ b/front/src/store/auth.ts
@@ -4,7 +4,7 @@ import { Module } from 'vuex'
import { RootState } from '~/store/index'
import useFormData from '~/composables/useFormData'
-export type Permission = 'settings' | 'library' | 'moderation' | 'admin'
+export type Permission = 'settings' | 'library' | 'moderation'
export interface State {
authenticated: boolean
username: string
@@ -73,8 +73,7 @@ const store: Module
= {
availablePermissions: {
settings: false,
library: false,
- moderation: false,
- admin: false
+ moderation: false
},
profile: null,
oauth: getDefaultOauth(),
@@ -98,8 +97,7 @@ const store: Module = {
state.availablePermissions = {
settings: false,
library: false,
- moderation: false,
- admin: false
+ moderation: false
}
},
profile: (state, value) => {
@@ -115,8 +113,7 @@ const store: Module = {
state.availablePermissions = {
settings: false,
library: false,
- moderation: false,
- admin: false
+ moderation: false
}
}
},
diff --git a/front/yarn.lock b/front/yarn.lock
index 9f53545fc..27c749a62 100644
--- a/front/yarn.lock
+++ b/front/yarn.lock
@@ -1483,6 +1483,11 @@
dependencies:
"@types/node" "*"
+"@types/showdown@^2.0.0":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/@types/showdown/-/showdown-2.0.0.tgz#3e800eca8573848cac4e5555f4377ba3a0e7b1f2"
+ integrity sha512-70xBJoLv+oXjB5PhtA8vo7erjLDp9/qqI63SRHm4REKrwuPOLs8HhXwlZJBJaB4kC18cCZ1UUZ6Fb/PLFW4TCA==
+
"@types/sizzle@*":
version "2.3.3"
resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.3.tgz#ff5e2f1902969d305225a047c8a0fd5c915cebef"