diff --git a/components/Browser.vue b/components/Browser.vue index 89d0f376..4daa2033 100644 --- a/components/Browser.vue +++ b/components/Browser.vue @@ -313,7 +313,7 @@ async function deleteFileOrFolder() { /* Delete function, works for files and folders. */ - await fetch(`api/file/${configStore.configGui[configStore.configID].id}/remove/`, { + await fetch(`/api/file/${configStore.configGui[configStore.configID].id}/remove/`, { method: 'POST', headers: { ...contentType, ...authStore.authHeader }, body: JSON.stringify({ source: deleteName.value }), @@ -349,7 +349,7 @@ async function onSubmitRenameFile(evt: any) { */ evt.preventDefault() - await fetch(`api/file/${configStore.configGui[configStore.configID].id}/rename/`, { + await fetch(`/api/file/${configStore.configGui[configStore.configID].id}/rename/`, { method: 'POST', headers: { ...contentType, ...authStore.authHeader }, body: JSON.stringify({ source: renameOldName.value, target: renameNewName.value }), diff --git a/components/Control.vue b/components/Control.vue index 85173e87..8ea3abe0 100644 --- a/components/Control.vue +++ b/components/Control.vue @@ -249,7 +249,7 @@ async function playoutStatus() { */ const channel = configStore.configGui[configStore.configID].id - await $fetch(`api/control/${channel}/process/`, { + await $fetch(`/api/control/${channel}/process/`, { method: 'POST', headers: { ...contentType, ...authStore.authHeader }, body: JSON.stringify({ command: 'status' }), @@ -273,7 +273,7 @@ async function controlProcess(state: string) { */ const channel = configStore.configGui[configStore.configID].id - await $fetch(`api/control/${channel}/process/`, { + await $fetch(`/api/control/${channel}/process/`, { method: 'POST', headers: { ...contentType, ...authStore.authHeader }, body: JSON.stringify({ command: state }), @@ -294,7 +294,7 @@ async function controlPlayout(state: string) { */ const channel = configStore.configGui[configStore.configID].id - await $fetch(`api/control/${channel}/playout/`, { + await $fetch(`/api/control/${channel}/playout/`, { method: 'POST', headers: { ...contentType, ...authStore.authHeader }, body: JSON.stringify({ command: state }), diff --git a/components/GuiConfig.vue b/components/GuiConfig.vue index 92b72f69..3927bc95 100644 --- a/components/GuiConfig.vue +++ b/components/GuiConfig.vue @@ -149,7 +149,7 @@ async function deleteChannel() { return } - const response = await fetch(`api/channel/${id}`, { + const response = await fetch(`/api/channel/${id}`, { method: 'DELETE', headers: authStore.authHeader, }) diff --git a/nuxt.config.ts b/nuxt.config.ts index e07dc610..89e2f632 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -13,8 +13,8 @@ export default defineNuxtConfig({ }, ignore: ['**/public/tv-media**', '**/public/Videos**', '**/public/live**', '**/public/home**'], - ssr: false, + // debug: true, app: { head: { @@ -44,14 +44,23 @@ export default defineNuxtConfig({ }, modules: ['@pinia/nuxt'], + css: ['@/assets/scss/main.scss'], vite: { css: { preprocessorOptions: { scss: { - additionalData: '@import "@/assets/scss/main.scss";', + additionalData: '@import "@/assets/scss/_variables.scss";', }, }, }, }, + + experimental: { + payloadExtraction: false, + }, + + // build: { + // chunkSizeWarningLimit: 800000, + // }, }) diff --git a/package-lock.json b/package-lock.json index 7971c8c8..9632054f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,9 +1,12 @@ { - "name": "ffplayout-frontend-n3", + "name": "ffplayout-frontend", + "version": "0.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { + "name": "ffplayout-frontend", + "version": "0.1.1", "hasInstallScript": true, "dependencies": { "@nuxt/types": "^2.15.8", diff --git a/package.json b/package.json index 84a36059..0f390738 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ffplayout-frontend", - "version": "0.1.0", + "version": "0.1.1", "description": "Web GUI for ffplayout", "author": "Jonathan Baecker", "private": true, diff --git a/pages/logging.vue b/pages/logging.vue index 641c14f5..28181c86 100644 --- a/pages/logging.vue +++ b/pages/logging.vue @@ -24,14 +24,21 @@ useHead({ title: 'Logging | ffplayout' }) +onMounted(() => { + getLog() +}) + const { $dayjs } = useNuxtApp() const authStore = useAuth() const configStore = useConfig() const currentLog = ref('') const listDate = ref($dayjs().utcOffset(configStore.utcOffset).format('YYYY-MM-DD')) -const configID = ref(configStore.configID) const { formatLog } = stringFormatter() +watch([listDate, configStore.configID], () => { + getLog() +}) + async function getLog() { let date = listDate.value @@ -39,7 +46,7 @@ async function getLog() { date = '' } - await fetch(`api/log/${configStore.configGui[configStore.configID].id}?date=${date}`, { + await fetch(`/api/log/${configStore.configGui[configStore.configID].id}?date=${date}`, { method: 'GET', headers: authStore.authHeader, }) @@ -51,16 +58,6 @@ async function getLog() { currentLog.value = '' }) } - -onMounted(() => { - getLog() -}) - -watch([listDate, configID], () => { - getLog() -}) - -