update packages, hide global admin controls

This commit is contained in:
jb-alvarado 2024-06-24 16:43:31 +02:00
parent 987384b41c
commit eb6a8f8c13
4 changed files with 876 additions and 1502 deletions

View File

@ -2,7 +2,7 @@
<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 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 +46,7 @@
<div class="join my-4">
<button class="join-item btn btn-primary" type="submit">{{ $t('config.save') }}</button>
<button
v-if="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()"
>

View File

@ -1,7 +1,7 @@
<template>
<div class="w-full max-w-[800px] pe-8">
<h2 class="pt-3 text-3xl">{{ $t('user.title') }}</h2>
<div class="flex flex-col xs:flex-row gap-2 w-full mb-5 mt-10">
<div v-if="authStore.role === 'GlobalAdmin'" class="flex flex-col xs:flex-row gap-2 w-full mb-5 mt-10">
<div class="grow">
<select v-model="selected" class="select select-bordered w-full max-w-xs" @change="onChange($event)">
<option v-for="item in users" :key="item.username" :value="item.id">{{ item.username }}</option>
@ -16,7 +16,7 @@
</button>
</div>
</div>
<form v-if="configStore.configUser" @submit.prevent="onSubmitUser">
<form v-if="configStore.configUser" class="mt-5" @submit.prevent="onSubmitUser">
<label class="form-control w-full max-w-md">
<div class="label">
<span class="label-text">{{ $t('user.name') }}</span>
@ -50,7 +50,7 @@
<input v-model="confirmPass" type="password" class="input input-bordered w-full" />
</label>
<div class="form-control w-full max-w-md mt-5">
<div v-if="authStore.role === 'GlobalAdmin'" class="form-control w-full max-w-md mt-5">
<Multiselect
v-model="configStore.configUser.channel_ids"
:options="configStore.configChannel"

2362
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -35,13 +35,13 @@
"@nuxtjs/tailwindcss": "^6.12.0",
"@types/lodash": "^4.17.5",
"@types/video.js": "^7.3.58",
"daisyui": "^4.12.2",
"daisyui": "^4.12.7",
"mini-svg-data-uri": "^1.4.4",
"postcss": "^8.4.38",
"postcss-loader": "^8.1.1",
"sass": "^1.77.6",
"sass-loader": "^14.2.1",
"vue": "^3.4.29",
"vue-router": "^4.3.3"
"vue": "^3.4.30",
"vue-router": "^4.4.0"
}
}