mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-19 22:55:29 +02:00
enhance(frontend): 非同期的なコンポーネントの読み込み時のハンドリングを強化
This commit is contained in:
@@ -117,7 +117,7 @@ async function registerTOTP(): Promise<void> {
|
||||
token: auth.result.token,
|
||||
});
|
||||
|
||||
const { dispose } = os.popup(defineAsyncComponent(() => import('./2fa.qrdialog.vue')), {
|
||||
const { dispose } = await os.popupAsyncWithDialog(import('./2fa.qrdialog.vue').then(x => x.default), {
|
||||
twoFactorData,
|
||||
}, {
|
||||
closed: () => dispose(),
|
||||
|
||||
@@ -68,8 +68,8 @@ misskeyApi('get-avatar-decorations').then(_avatarDecorations => {
|
||||
loading.value = false;
|
||||
});
|
||||
|
||||
function openDecoration(avatarDecoration, index?: number) {
|
||||
const { dispose } = os.popup(defineAsyncComponent(() => import('./avatar-decoration.dialog.vue')), {
|
||||
async function openDecoration(avatarDecoration, index?: number) {
|
||||
const { dispose } = await os.popupAsyncWithDialog(import('./avatar-decoration.dialog.vue').then(x => x.default), {
|
||||
decoration: avatarDecoration,
|
||||
usingIndex: index,
|
||||
}, {
|
||||
|
||||
@@ -81,8 +81,8 @@ const pagination = {
|
||||
noPaging: true,
|
||||
};
|
||||
|
||||
function generateToken() {
|
||||
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkTokenGenerateWindow.vue')), {}, {
|
||||
async function generateToken() {
|
||||
const { dispose } = await os.popupAsyncWithDialog(import('@/components/MkTokenGenerateWindow.vue').then(x => x.default), {}, {
|
||||
done: async result => {
|
||||
const { name, permissions } = result;
|
||||
const { token } = await misskeyApi('miauth/gen-token', {
|
||||
|
||||
Reference in New Issue
Block a user