1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-19 01:55:27 +02:00

enhance(frontend): 投稿フォームにアップローダーを埋め込み (#16173)

* wip

* Update MkPostForm.vue

* wip

* wip

* Update MkPostForm.vue

* wip

* wip

* add tip

* Update tips.ts

* Update MkPostForm.vue
This commit is contained in:
syuilo
2025-06-07 07:47:43 +09:00
committed by GitHub
parent be35fe468b
commit 9bd5f887de
8 changed files with 871 additions and 663 deletions

View File

@@ -7,9 +7,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkModal
ref="modal"
:preferType="'dialog'"
@click="modal?.close()"
@click="_close()"
@closed="onModalClosed()"
@esc="modal?.close()"
@esc="_close()"
>
<MkPostForm
ref="form"
@@ -18,8 +18,8 @@ SPDX-License-Identifier: AGPL-3.0-only
autofocus
freezeAfterPosted
@posted="onPosted"
@cancel="modal?.close()"
@esc="modal?.close()"
@cancel="_close()"
@esc="_close()"
/>
</MkModal>
</template>
@@ -43,6 +43,7 @@ const emit = defineEmits<{
}>();
const modal = useTemplateRef('modal');
const form = useTemplateRef('form');
function onPosted() {
modal.value?.close({
@@ -50,6 +51,12 @@ function onPosted() {
});
}
async function _close() {
const canClose = await form.value?.canClose();
if (!canClose) return;
modal.value?.close();
}
function onModalClosed() {
emit('closed');
}