diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index 4a1930ac0b..a5ea648277 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -19,20 +19,20 @@ SPDX-License-Identifier: AGPL-3.0-only
-
-
+
+
+ {{ channel.name }}
+
+
@@ -46,6 +51,7 @@ import { nextTick, shallowRef, ref } from 'vue';
import * as Misskey from 'misskey-js';
import MkModal from '@/components/MkModal.vue';
import { i18n } from '@/i18n.js';
+import * as os from "@/os.js";
const modal = shallowRef>();
@@ -64,6 +70,32 @@ const emit = defineEmits<{
const v = ref(props.currentVisibility);
+/**
+ * Visibility とチャンネルはそれぞれ独立だけど、今のところはチャンネル投稿は連合なしだし公開範囲も変更できないようである
+
+ packages/frontend/src/components/MkPostForm.vue :475
+ if (props.channel) {
+ visibility.value = 'public';
+ localOnly.value = true; // TODO: チャンネルが連合するようになった折には消す
+ return;
+ }
+
+ */
+const channels = ref([]);
+async function getChannel(){
+ const res = await os.api('channels/my-favorites', {
+ limit: 100,
+ });
+ channels.value.splice(0, 0, ...res);
+}
+getChannel();
+
+async function chooseChannel(channel: string ){
+ emit("changeChannel", channel);
+ await nextTick();
+ if (modal.value) modal.value.close();
+}
+
function choose(visibility: typeof Misskey.noteVisibilities[number]): void {
v.value = visibility;
emit('changeVisibility', visibility);