From fb91b8cb95bfc401aa5514a27286d1e85cad36a6 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Mon, 31 Jul 2023 15:40:16 +0900 Subject: [PATCH] feat(frontend/channel-editor): support isSensitive in create/edit channel page --- packages/frontend/src/pages/channel-editor.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/frontend/src/pages/channel-editor.vue b/packages/frontend/src/pages/channel-editor.vue index cacdab040f..881211feaa 100644 --- a/packages/frontend/src/pages/channel-editor.vue +++ b/packages/frontend/src/pages/channel-editor.vue @@ -15,6 +15,10 @@ + + + +
{{ i18n.ts._channel.setBanner }}
@@ -67,6 +71,7 @@ import { useRouter } from '@/router'; import { definePageMetadata } from '@/scripts/page-metadata'; import { i18n } from '@/i18n'; import MkFolder from '@/components/MkFolder.vue'; +import MkSwitch from "@/components/MkSwitch.vue"; const Sortable = defineAsyncComponent(() => import('vuedraggable').then(x => x.default)); @@ -82,6 +87,7 @@ let description = $ref(null); let bannerUrl = $ref(null); let bannerId = $ref(null); let color = $ref('#000'); +let isSensitive = $ref(false); const pinnedNotes = ref([]); watch(() => bannerId, async () => { @@ -105,6 +111,7 @@ async function fetchChannel() { description = channel.description; bannerId = channel.bannerId; bannerUrl = channel.bannerUrl; + isSensitive = channel.isSensitive; pinnedNotes.value = channel.pinnedNoteIds.map(id => ({ id, })); @@ -137,6 +144,7 @@ function save() { bannerId: bannerId, pinnedNoteIds: pinnedNotes.value.map(x => x.id), color: color, + isSensitive: isSensitive, }; if (props.channelId) {