fix modal overflow, add title

This commit is contained in:
Jonathan Baecker 2024-10-03 17:54:24 +02:00
parent 28af01ed65
commit c5d06a2da4
9 changed files with 34 additions and 12 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div v-if="show" class="z-50 fixed top-0 bottom-0 left-0 right-0 flex justify-center items-center bg-black/30 overflow-auto m-auto max-h-screen space-y-1"> <div v-if="show" class="z-50 fixed inset-0 flex justify-center items-start bg-black/30 overflow-auto">
<div class="flex flex-col bg-base-100 min-w-[400px] max-w-[90%] h-auto rounded-md p-5 shadow-xl"> <div class="flex flex-col bg-base-100 min-w-[300px] w-[400px] max-w-[90%] rounded-md p-5 shadow-xl my-5">
<div class="inline-block"> <div class="inline-block">
<div class="flex gap-2"> <div class="flex gap-2">
<div class="font-bold text-lg truncate flex-1 w-0">{{ title }}</div> <div class="font-bold text-lg truncate flex-1 w-0">{{ title }}</div>
@ -32,7 +32,7 @@
<script setup lang="ts"> <script setup lang="ts">
const { t } = useI18n() const { t } = useI18n()
defineProps({ const props = defineProps({
title: { title: {
type: String, type: String,
default: '', default: '',
@ -56,4 +56,14 @@ defineProps({
default: false, default: false,
}, },
}) })
useHead({
bodyAttrs: {
class: computed(() => {
if (props.show) return 'overflow-hidden'
return ''
}),
},
})
</script> </script>

View File

@ -1,9 +1,9 @@
<template> <template>
<div <div
class="z-50 fixed top-0 bottom-0 w-full h-full left-0 right-0 flex justify-center items-center bg-black/30 overflow-y-auto" class="z-50 fixed inset-0 flex justify-center items-start bg-black/30 overflow-auto"
> >
<div <div
class="relative flex flex-col bg-base-100 w-[800px] min-w-[300px] max-w-[90vw] h-[680px] rounded-md p-5 shadow-xl" class="relative flex flex-col bg-base-100 w-[800px] min-w-[300px] max-w-[90vw] h-[680px] my-5 rounded-md p-5 shadow-xl"
> >
<div class="font-bold text-lg">{{ t('player.generateProgram') }}</div> <div class="font-bold text-lg">{{ t('player.generateProgram') }}</div>

View File

@ -4,13 +4,13 @@
<div v-if="props.error?.statusCode === 404"> <div v-if="props.error?.statusCode === 404">
<h1 class="text-center text-6xl">404</h1> <h1 class="text-center text-6xl">404</h1>
<p class="text-center font-bold mt-6"> <p class="text-center font-bold mt-6">
{{ $t('error.notFound') }} {{ t('error.notFound') }}
</p> </p>
</div> </div>
<div v-else-if="props.error?.statusCode === 500"> <div v-else-if="props.error?.statusCode === 500">
<h1 class="text-center text-6xl">{{ props.error.statusCode }}</h1> <h1 class="text-center text-6xl">{{ props.error.statusCode }}</h1>
<p class="text-center font-bold mt-6"> <p class="text-center font-bold mt-6">
{{ $t('error.serverError') }} {{ t('error.serverError') }}
</p> </p>
</div> </div>
</div> </div>
@ -19,6 +19,7 @@
<script setup lang="ts"> <script setup lang="ts">
import type { NuxtError } from '#app' import type { NuxtError } from '#app'
const { t } = useI18n()
const localePath = useLocalePath() const localePath = useLocalePath()
const props = defineProps({ const props = defineProps({

View File

@ -140,6 +140,7 @@ export default {
}, },
log: { log: {
download: 'Protokoll herunterladen', download: 'Protokoll herunterladen',
reload: 'Neu laden',
}, },
advanced: { advanced: {
title: 'Advanced Configuration', title: 'Advanced Configuration',

View File

@ -140,6 +140,7 @@ export default {
}, },
log: { log: {
download: 'Download log file', download: 'Download log file',
reload: 'Reload',
}, },
advanced: { advanced: {
title: 'Advanced Configuration', title: 'Advanced Configuration',

View File

@ -140,6 +140,7 @@ export default {
}, },
log: { log: {
download: 'Baixar arquivo de registro', download: 'Baixar arquivo de registro',
reload: 'Recarregar',
}, },
advanced: { advanced: {
title: 'Configurações avançadas', title: 'Configurações avançadas',

View File

@ -140,6 +140,7 @@ export default {
}, },
log: { log: {
download: 'Скачать лог файл', download: 'Скачать лог файл',
reload: 'Перезагрузка',
}, },
advanced: { advanced: {
title: 'Advanced Configuration', title: 'Advanced Configuration',

View File

@ -25,7 +25,7 @@
:ui="{ input: 'join-item input !input-sm !input-bordered !w-[170px] text-right !pe-3' }" :ui="{ input: 'join-item input !input-sm !input-bordered !w-[170px] text-right !pe-3' }"
required required
/> />
<button class="btn btn-sm btn-primary join-item" @click="getLog()"> <button class="btn btn-sm btn-primary join-item" :title="t('log.reload')" @click="getLog()">
<i class="bi-arrow-repeat" /> <i class="bi-arrow-repeat" />
</button> </button>
<button class="btn btn-sm btn-primary join-item" :title="t('log.download')" @click="downloadLog"> <button class="btn btn-sm btn-primary join-item" :title="t('log.download')" @click="downloadLog">

View File

@ -245,10 +245,6 @@ const indexStore = useIndex()
const mediaStore = useMedia() const mediaStore = useMedia()
const playlistStore = usePlaylist() const playlistStore = usePlaylist()
useHead({
title: `${t('button.player')} | ffplayout`,
})
const { listDate, firstLoad } = storeToRefs(usePlaylist()) const { listDate, firstLoad } = storeToRefs(usePlaylist())
const beforeDayStart = ref(false) const beforeDayStart = ref(false)
@ -282,6 +278,17 @@ const newSource = ref({
uid: '', uid: '',
} as PlaylistItem) } as PlaylistItem)
useHead({
title: `${t('button.player')} | ffplayout`,
bodyAttrs: {
class: computed(() => {
if (showPlaylistGenerator.value) return 'overflow-hidden'
return ''
}),
},
})
onBeforeMount(() => { onBeforeMount(() => {
const currentTime = $dayjs().utcOffset(configStore.utcOffset) const currentTime = $dayjs().utcOffset(configStore.utcOffset)