mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-24 15:04:07 +02:00
@@ -251,13 +251,30 @@ export async function openAccountMenu(opts: {
|
||||
}
|
||||
},
|
||||
};
|
||||
} else {
|
||||
} else { // プロファイルを復元した場合などはアカウントのトークンや詳細情報はstoreにキャッシュされていない
|
||||
return {
|
||||
type: 'button' as const,
|
||||
text: username,
|
||||
active: opts.active != null ? opts.active === id : false,
|
||||
action: async () => {
|
||||
// TODO
|
||||
const { dispose } = popup(defineAsyncComponent(() => import('@/components/MkSigninDialog.vue')), {
|
||||
initialUsername: username,
|
||||
}, {
|
||||
done: async (res: Misskey.entities.SigninFlowResponse & { finished: true }) => {
|
||||
store.set('accountTokens', { ...store.s.accountTokens, [host + '/' + res.id]: res.i });
|
||||
|
||||
if (callback) {
|
||||
fetchAccount(res.i, id).then(account => {
|
||||
callback(account);
|
||||
});
|
||||
} else {
|
||||
switchAccount(host, id);
|
||||
}
|
||||
},
|
||||
closed: () => {
|
||||
dispose();
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user