diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2024-07-04 13:14:49 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2024-07-04 13:14:49 +0900 |
| commit | 6dd2e9fc0b1eeea6b5f04ccac93ccfab658f976d (patch) | |
| tree | 53a677d4fdaa802774a133272ed2f5f1180dd4fa /packages/frontend/src/scripts/get-drive-file-menu.ts | |
| parent | fix(storybook): build skipping even after updating impl story files (#14124) (diff) | |
| download | sharkey-6dd2e9fc0b1eeea6b5f04ccac93ccfab658f976d.tar.gz sharkey-6dd2e9fc0b1eeea6b5f04ccac93ccfab658f976d.tar.bz2 sharkey-6dd2e9fc0b1eeea6b5f04ccac93ccfab658f976d.zip | |
refactor(frontend): refactor popup api and make sure call dispose callback
Close #14122
Diffstat (limited to 'packages/frontend/src/scripts/get-drive-file-menu.ts')
| -rw-r--r-- | packages/frontend/src/scripts/get-drive-file-menu.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/frontend/src/scripts/get-drive-file-menu.ts b/packages/frontend/src/scripts/get-drive-file-menu.ts index 7aca5f83b2..14c83ed637 100644 --- a/packages/frontend/src/scripts/get-drive-file-menu.ts +++ b/packages/frontend/src/scripts/get-drive-file-menu.ts @@ -27,7 +27,7 @@ function rename(file: Misskey.entities.DriveFile) { } function describe(file: Misskey.entities.DriveFile) { - os.popup(defineAsyncComponent(() => import('@/components/MkFileCaptionEditWindow.vue')), { + const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkFileCaptionEditWindow.vue')), { default: file.comment ?? '', file: file, }, { @@ -37,7 +37,8 @@ function describe(file: Misskey.entities.DriveFile) { comment: caption.length === 0 ? null : caption, }); }, - }, 'closed'); + closed: () => dispose(), + }); } function toggleSensitive(file: Misskey.entities.DriveFile) { |