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

View file

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