Update MkPostForm.vue

This commit is contained in:
syuilo 2025-09-25 19:28:15 +09:00
parent f0c297c483
commit b97f4a9407
1 changed files with 6 additions and 4 deletions

View File

@ -1181,8 +1181,10 @@ function showPerUploadItemMenuViaContextmenu(item: UploaderItem, ev: MouseEvent)
} }
function showDraftMenu(ev: MouseEvent) { function showDraftMenu(ev: MouseEvent) {
function showDraftsDialog() { function showDraftsDialog(scheduled: boolean) {
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkNoteDraftsDialog.vue')), {}, { const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkNoteDraftsDialog.vue')), {
scheduled,
}, {
restore: async (draft: Misskey.entities.NoteDraft) => { restore: async (draft: Misskey.entities.NoteDraft) => {
text.value = draft.text ?? ''; text.value = draft.text ?? '';
useCw.value = draft.cw != null; useCw.value = draft.cw != null;
@ -1254,14 +1256,14 @@ function showDraftMenu(ev: MouseEvent) {
text: i18n.ts._drafts.listDrafts, text: i18n.ts._drafts.listDrafts,
icon: 'ti ti-cloud-download', icon: 'ti ti-cloud-download',
action: () => { action: () => {
showDraftsDialog(); showDraftsDialog(false);
}, },
}, { type: 'divider' }, { }, { type: 'divider' }, {
type: 'button', type: 'button',
text: i18n.ts._drafts.listScheduledNotes, text: i18n.ts._drafts.listScheduledNotes,
icon: 'ti ti-clock-down', icon: 'ti ti-clock-down',
action: () => { action: () => {
showDraftsDialog(); showDraftsDialog(true);
}, },
}], (ev.currentTarget ?? ev.target ?? undefined) as HTMLElement | undefined); }], (ev.currentTarget ?? ev.target ?? undefined) as HTMLElement | undefined);
} }