Skip to content
Snippets Groups Projects
Unverified Commit d075ead8 authored by Andreas Nedbal's avatar Andreas Nedbal Committed by GitHub
Browse files

fix(client): fix duplicate token request dialog in plugin install (#8612)

parent 9230334a
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,7 @@ async function install() {
}
const token = permissions == null || permissions.length === 0 ? null : await new Promise((res, rej) => {
os.popup(import('@/components/token-generate-window.vue'), {
os.popup(defineAsyncComponent(() => import('@/components/token-generate-window.vue')), {
title: i18n.ts.tokenRequested,
information: i18n.ts.pluginTokenRequestedDescription,
initialName: name,
......@@ -92,7 +92,6 @@ async function install() {
name: name,
permission: permissions,
});
res(token);
}
}, 'closed');
......@@ -109,25 +108,6 @@ async function install() {
os.success();
const token = permissions == null || permissions.length === 0 ? null : await new Promise((res, rej) => {
os.popup(defineAsyncComponent(() => import('@/components/token-generate-window.vue')), {
title: i18n.ts.tokenRequested,
information: i18n.ts.pluginTokenRequestedDescription,
initialName: name,
initialPermissions: permissions
}, {
done: async result => {
const { name, permissions } = result;
const { token } = await os.api('miauth/gen-token', {
session: null,
name: name,
permission: permissions,
});
res(token);
}
}, 'closed');
});
nextTick(() => {
unisonReload();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment