Add showPopup, isGoodNews to announcement setting UI

This commit is contained in:
naskya 2023-07-08 20:01:16 +00:00
parent aeb1f9c993
commit c47ec377c7
No known key found for this signature in database
GPG Key ID: 164DFF24E2D40139
1 changed files with 14 additions and 0 deletions

View File

@ -22,6 +22,17 @@
<MkInput v-model="announcement.imageUrl"> <MkInput v-model="announcement.imageUrl">
<template #label>{{ i18n.ts.imageUrl }}</template> <template #label>{{ i18n.ts.imageUrl }}</template>
</MkInput> </MkInput>
<MkSwitch
v-model="announcement.showPopup"
class="_formBlock"
>{{ i18n.ts.showPopup }}</MkSwitch
>
<MkSwitch
v-if="announcement.showPopup"
v-model="announcement.isGoodNews"
class="_formBlock"
>{{ i18n.ts.isGoodNews }}</MkSwitch
>
<p v-if="announcement.reads"> <p v-if="announcement.reads">
{{ {{
i18n.t("nUsersRead", { n: announcement.reads }) i18n.t("nUsersRead", { n: announcement.reads })
@ -57,6 +68,7 @@
import {} from "vue"; import {} from "vue";
import MkButton from "@/components/MkButton.vue"; import MkButton from "@/components/MkButton.vue";
import MkInput from "@/components/form/input.vue"; import MkInput from "@/components/form/input.vue";
import MkSwitch from "@/components/form/switch.vue";
import MkTextarea from "@/components/form/textarea.vue"; import MkTextarea from "@/components/form/textarea.vue";
import * as os from "@/os"; import * as os from "@/os";
import { i18n } from "@/i18n"; import { i18n } from "@/i18n";
@ -74,6 +86,8 @@ function add() {
title: "", title: "",
text: "", text: "",
imageUrl: null, imageUrl: null,
showPopup: false,
isGoodNews: false,
}); });
} }