From a1a69377858dff0b3c5f52d7f79cf753d589a01e Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sat, 18 Feb 2023 15:27:12 -0800 Subject: [PATCH] feat: new modal --- packages/client/src/components/MkModal.vue | 147 ++++++++++++------ .../src/components/MkPostFormDialog.vue | 59 +++++-- 2 files changed, 142 insertions(+), 64 deletions(-) diff --git a/packages/client/src/components/MkModal.vue b/packages/client/src/components/MkModal.vue index ed0e7f59dd..4048177a63 100644 --- a/packages/client/src/components/MkModal.vue +++ b/packages/client/src/components/MkModal.vue @@ -1,12 +1,19 @@ - diff --git a/packages/client/src/components/MkPostFormDialog.vue b/packages/client/src/components/MkPostFormDialog.vue index 6dabb1db14..479d5dd06b 100644 --- a/packages/client/src/components/MkPostFormDialog.vue +++ b/packages/client/src/components/MkPostFormDialog.vue @@ -1,19 +1,46 @@ + + + + - + const props = defineProps<{ + reply?: misskey.entities.Note; + renote?: misskey.entities.Note; + channel?: any; // TODO + mention?: misskey.entities.User; + specified?: misskey.entities.User; + initialText?: string; + initialVisibility?: typeof misskey.noteVisibilities; + initialFiles?: misskey.entities.DriveFile[]; + initialLocalOnly?: boolean; + initialVisibleUsers?: misskey.entities.User[]; + initialNote?: misskey.entities.Note; + instant?: boolean; + fixed?: boolean; + autofocus?: boolean; + }>(); + + const emit = defineEmits<{ + (ev: 'closed'): void; + }>(); + + let modal = $shallowRef>(); + let form = $shallowRef>(); + + function onPosted() { + modal.close({ + useSendAnimation: true, + }); + } + + function onModalClosed() { + emit('closed'); + } +