From 39df8f37859c523df282560a0546c196d92a27b1 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Fri, 17 Jan 2025 14:22:16 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8A=95=E7=A8=BF=E3=83=95=E3=82=A9?= =?UTF-8?q?=E3=83=BC=E3=83=A0=E3=82=92=E7=A9=BA=E7=99=BD=E3=81=AB=E3=81=97?= =?UTF-8?q?=E3=81=A6=E9=80=9A=E5=B8=B8=E3=83=AA=E3=83=8E=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=84=E3=81=A4=E3=81=AF=E4=B8=8B?= =?UTF-8?q?=E6=9B=B8=E3=81=8D=E3=81=A8=E3=81=97=E3=81=A6=E3=81=AF=E5=BC=BE?= =?UTF-8?q?=E3=81=8F=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/components/MkPostForm.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index 93f5739679..28a93b5088 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -261,6 +261,10 @@ const canPost = computed((): boolean => { (!poll.value || poll.value.choices.length >= 2); }); +const canSaveAsServerDraft = computed((): boolean => { + return canPost.value && (textLength.value > 0 || files.value.length > 0 || poll.value != null); +}); + const withHashtags = computed(defaultStore.makeGetterSetter('postFormWithHashtags')); const hashtags = computed(defaultStore.makeGetterSetter('postFormHashtags')); @@ -928,7 +932,7 @@ async function post(ev?: MouseEvent) { } async function confirmSavingServerDraft(ev?: Event) { - if (canPost.value) { + if (canSaveAsServerDraft.value) { ev?.stopPropagation(); const { canceled, result } = await os.actions({