change preview url

This commit is contained in:
jb-alvarado 2024-06-30 22:04:04 +02:00
parent 372c759c89
commit 7f9eead8dd

View File

@ -2,7 +2,9 @@
<div class="w-full max-w-[800px]">
<h2 class="pt-3 text-3xl">{{ $t('config.channelConf') }}</h2>
<div class="w-full flex justify-end my-4">
<button v-if="authStore.role === 'GlobalAdmin'" class="btn btn-sm btn-primary" @click="addChannel()">{{ $t('config.addChannel') }}</button>
<button v-if="authStore.role === 'GlobalAdmin'" class="btn btn-sm btn-primary" @click="addChannel()">
{{ $t('config.addChannel') }}
</button>
</div>
<form
v-if="configStore.configChannel && configStore.configChannel[configStore.configID]"
@ -46,7 +48,11 @@
<div class="join my-4">
<button class="join-item btn btn-primary" type="submit">{{ $t('config.save') }}</button>
<button
v-if="authStore.role === 'GlobalAdmin' && configStore.configChannel.length > 1 && configStore.configChannel[configStore.configID].id > 1"
v-if="
authStore.role === 'GlobalAdmin' &&
configStore.configChannel.length > 1 &&
configStore.configChannel[configStore.configID].id > 1
"
class="join-item btn btn-primary"
@click="deleteChannel()"
>
@ -71,6 +77,7 @@ async function addChannel() {
newChannel.id = channels.length + 1
newChannel.name = `Channel ${Math.random().toString(36).substring(7)}`
newChannel.preview_url = `${window.location.protocol}//${window.location.host}/stream.m3u8`
channels.push(newChannel)
configStore.configChannel = channels