Remove plugin-only option from secrets (#2213)

This commit is contained in:
Anbraten
2023-10-24 20:38:47 +02:00
committed by GitHub
parent 703983419a
commit f44aa8a6fd
18 changed files with 112 additions and 104 deletions

View File

@@ -16,12 +16,10 @@
<InputField :label="$t(i18nPrefix + 'images.images')">
<TextField v-model="images" :placeholder="$t(i18nPrefix + 'images.desc')" />
<Checkbox v-model="innerValue.plugins_only" class="mt-4" :label="$t(i18nPrefix + 'plugins_only')" />
</InputField>
<InputField :label="$t(i18nPrefix + 'events.events')">
<CheckboxesField v-model="innerValue.event" :options="secretEventsOptions" />
<CheckboxesField v-model="innerValue.events" :options="secretEventsOptions" />
</InputField>
<div class="flex gap-2">
@@ -71,11 +69,11 @@ const innerValue = computed({
});
const images = computed<string>({
get() {
return innerValue.value?.image?.join(',') || '';
return innerValue.value?.images?.join(',') || '';
},
set(value) {
if (innerValue.value) {
innerValue.value.image = value
innerValue.value.images = value
.split(',')
.map((s) => s.trim())
.filter((s) => s !== '');

View File

@@ -7,7 +7,7 @@
>
<span>{{ secret.name }}</span>
<div class="ml-auto space-x-2 <md:hidden">
<Badge v-for="event in secret.event" :key="event" :label="event" />
<Badge v-for="event in secret.events" :key="event" :label="event" />
</div>
<IconButton
icon="edit"

View File

@@ -4,7 +4,7 @@ export type Secret = {
id: string;
name: string;
value: string;
event: WebhookEvents[];
image: string[];
events: WebhookEvents[];
images: string[];
plugins_only: string;
};