global middleware, cleanup, update packages

This commit is contained in:
jb-alvarado 2023-12-02 22:00:25 +01:00
parent e060cbe885
commit fdba746ea3
10 changed files with 984 additions and 676 deletions

View File

@ -122,7 +122,6 @@ async function onSubmitPlayout() {
body: JSON.stringify({ command: 'status' }),
}).then((response: any) => {
if (response === 'active') {
console.log('---restart modal')
// @ts-ignore
const modal = $bootstrap.Modal.getOrCreateInstance(restartModal.value)

View File

@ -288,8 +288,6 @@ async function onSubmitUser() {
configStore.configUser.password = newPass.value
}
console.log('--configStore.configUser', configStore.configUser)
authStore.inspectToken()
const update = await configStore.setUserConfig(configStore.configUser)

View File

@ -2,8 +2,10 @@ import { useAuth } from '~/stores/auth'
export default defineNuxtRouteMiddleware((to, from) => {
const auth = useAuth()
auth.inspectToken()
if (!auth.isLogin) {
if (!auth.isLogin && to.path !== '/') {
return navigateTo('/')
}
})

1608
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "ffplayout-frontend",
"version": "0.6.1",
"version": "0.6.2",
"description": "Web GUI for ffplayout",
"author": "Jonathan Baecker",
"private": true,
@ -18,30 +18,30 @@
"@popperjs/core": "^2.11.8",
"@vueuse/core": "^10.6.1",
"bootstrap": "^5.3.2",
"bootstrap-icons": "^1.11.1",
"bootstrap-icons": "^1.11.2",
"cookie-universal-nuxt": "^2.2.2",
"dayjs": "^1.11.10",
"jwt-decode": "^4.0.0",
"lodash": "^4.17.21",
"mpegts.js": "^1.7.3",
"pinia": "^2.1.7",
"sortablejs": "^1.15.0",
"sortablejs-vue3": "^1.2.10",
"sortablejs": "^1.15.1",
"sortablejs-vue3": "^1.2.11",
"splitpanes": "^3.1.5",
"video.js": "^8.6.1",
"vuedraggable": "^4.1.0"
},
"devDependencies": {
"@nuxtjs/eslint-config": "^12.0.0",
"@types/bootstrap": "^5.2.9",
"@types/lodash": "^4.14.201",
"@types/splitpanes": "^2.2.5",
"@types/bootstrap": "^5.2.10",
"@types/lodash": "^4.14.202",
"@types/splitpanes": "^2.2.6",
"@types/video.js": "^7.3.56",
"eslint": "^8.54.0",
"eslint": "^8.55.0",
"eslint-plugin-nuxt": "^4.0.0",
"fibers": "^5.0.3",
"nuxt": "3.8.1",
"postcss": "^8.4.31",
"nuxt": "3.8.2",
"postcss": "^8.4.32",
"postcss-loader": "^7.3.3",
"sass": "^1.69.5",
"sass-loader": "^13.3.2"

View File

@ -73,11 +73,6 @@
<script setup lang="ts">
import { useIndex } from '~/stores/index'
definePageMeta({
middleware: ['auth'],
})
useHead({
title: 'Configuration | ffplayout'
})

View File

@ -17,10 +17,6 @@ import { storeToRefs } from 'pinia'
import { useAuth } from '~/stores/auth'
import { useConfig } from '~/stores/config'
definePageMeta({
middleware: ['auth'],
})
useHead({
title: 'Logging | ffplayout'
})

View File

@ -409,10 +409,6 @@ const contentType = { 'content-type': 'application/json;charset=UTF-8' }
const { configID } = storeToRefs(useConfig())
definePageMeta({
middleware: ['auth'],
})
useHead({
title: 'Media | ffplayout',
})

View File

@ -228,10 +228,6 @@ const indexStore = useIndex()
const { numberToHex, hexToNumber } = stringFormatter()
const contentType = { 'content-type': 'application/json;charset=UTF-8' }
definePageMeta({
middleware: ['auth'],
})
useHead({
title: 'Messages | ffplayout'
})

View File

@ -787,10 +787,6 @@ const indexStore = useIndex()
const mediaStore = useMedia()
const playlistStore = usePlaylist()
definePageMeta({
middleware: ['auth'],
})
useHead({
title: 'Player | ffplayout',
})