fix(frontend): 以前のpopupの呼び出し方を修正 (#14421)

This commit is contained in:
かっこかり 2024-08-17 18:04:52 +09:00 committed by GitHub
parent c0de57c08d
commit 4e0d57000c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 6 deletions

View File

@ -236,10 +236,12 @@ function reportAbuse() {
const pageUrl = `${url}/play/${flash.value.id}`; const pageUrl = `${url}/play/${flash.value.id}`;
os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), { const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), {
user: flash.value.user, user: flash.value.user,
initialComment: `Play: ${pageUrl}\n-----\n`, initialComment: `Play: ${pageUrl}\n-----\n`,
}, {}, 'closed'); }, {
closed: () => dispose(),
});
} }
function showMenu(ev: MouseEvent) { function showMenu(ev: MouseEvent) {

View File

@ -160,10 +160,12 @@ function reportAbuse() {
const pageUrl = `${url}/gallery/${post.value.id}`; const pageUrl = `${url}/gallery/${post.value.id}`;
os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), { const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), {
user: post.value.user, user: post.value.user,
initialComment: `Post: ${pageUrl}\n-----\n`, initialComment: `Post: ${pageUrl}\n-----\n`,
}, {}, 'closed'); }, {
closed: () => dispose(),
});
} }
function showMenu(ev: MouseEvent) { function showMenu(ev: MouseEvent) {

View File

@ -245,10 +245,12 @@ function reportAbuse() {
const pageUrl = `${url}/@${props.username}/pages/${props.pageName}`; const pageUrl = `${url}/@${props.username}/pages/${props.pageName}`;
os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), { const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), {
user: page.value.user, user: page.value.user,
initialComment: `Page: ${pageUrl}\n-----\n`, initialComment: `Page: ${pageUrl}\n-----\n`,
}, {}, 'closed'); }, {
closed: () => dispose(),
});
} }
function showMenu(ev: MouseEvent) { function showMenu(ev: MouseEvent) {