summaryrefslogtreecommitdiff
path: root/packages/frontend/src/ui/_common_
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-06-01 10:44:45 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-06-01 10:44:45 +0900
commitf4167ae7f1df7c2cd4cf264fc4d79d51b8c51133 (patch)
tree9f87a9ee76c82176daa4e81f1b117e90ec933f52 /packages/frontend/src/ui/_common_
parentfix(frontend): remove unused text (diff)
downloadmisskey-f4167ae7f1df7c2cd4cf264fc4d79d51b8c51133.tar.gz
misskey-f4167ae7f1df7c2cd4cf264fc4d79d51b8c51133.tar.bz2
misskey-f4167ae7f1df7c2cd4cf264fc4d79d51b8c51133.zip
enhance(frontend): 非同期的なコンポーネントの読み込み時のハンドリングを強化
Diffstat (limited to 'packages/frontend/src/ui/_common_')
-rw-r--r--packages/frontend/src/ui/_common_/common.ts6
-rw-r--r--packages/frontend/src/ui/_common_/navbar-h.vue4
-rw-r--r--packages/frontend/src/ui/_common_/navbar.vue4
3 files changed, 7 insertions, 7 deletions
diff --git a/packages/frontend/src/ui/_common_/common.ts b/packages/frontend/src/ui/_common_/common.ts
index 819e1fa42f..9872937d21 100644
--- a/packages/frontend/src/ui/_common_/common.ts
+++ b/packages/frontend/src/ui/_common_/common.ts
@@ -4,10 +4,10 @@
*/
import { defineAsyncComponent } from 'vue';
+import { host } from '@@/js/config.js';
import type { MenuItem } from '@/types/menu.js';
import * as os from '@/os.js';
import { instance } from '@/instance.js';
-import { host } from '@@/js/config.js';
import { i18n } from '@/i18n.js';
import { $i } from '@/i.js';
@@ -146,8 +146,8 @@ export function openInstanceMenu(ev: MouseEvent) {
menuItems.push({
text: i18n.ts._initialTutorial.launchTutorial,
icon: 'ti ti-presentation',
- action: () => {
- const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkTutorialDialog.vue')), {}, {
+ action: async () => {
+ const { dispose } = await os.popupAsyncWithDialog(import('@/components/MkTutorialDialog.vue').then(x => x.default), {}, {
closed: () => dispose(),
});
},
diff --git a/packages/frontend/src/ui/_common_/navbar-h.vue b/packages/frontend/src/ui/_common_/navbar-h.vue
index 24e2b28f1c..688e195ce6 100644
--- a/packages/frontend/src/ui/_common_/navbar-h.vue
+++ b/packages/frontend/src/ui/_common_/navbar-h.vue
@@ -71,8 +71,8 @@ const otherNavItemIndicated = computed<boolean>(() => {
return false;
});
-function more(ev: MouseEvent) {
- const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkLaunchPad.vue')), {
+async function more(ev: MouseEvent) {
+ const { dispose } = await os.popupAsyncWithDialog(import('@/components/MkLaunchPad.vue').then(x => x.default), {
anchorElement: ev.currentTarget ?? ev.target,
anchor: { x: 'center', y: 'bottom' },
}, {
diff --git a/packages/frontend/src/ui/_common_/navbar.vue b/packages/frontend/src/ui/_common_/navbar.vue
index c8b7491895..28913a54ab 100644
--- a/packages/frontend/src/ui/_common_/navbar.vue
+++ b/packages/frontend/src/ui/_common_/navbar.vue
@@ -176,10 +176,10 @@ function openAccountMenu(ev: MouseEvent) {
}, ev);
}
-function more(ev: MouseEvent) {
+async function more(ev: MouseEvent) {
const target = getHTMLElementOrNull(ev.currentTarget ?? ev.target);
if (!target) return;
- const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkLaunchPad.vue')), {
+ const { dispose } = await os.popupAsyncWithDialog(import('@/components/MkLaunchPad.vue').then(x => x.default), {
anchorElement: target,
}, {
closed: () => dispose(),