chore: format
This commit is contained in:
parent
6aecf12067
commit
ab357233db
3 changed files with 20 additions and 12 deletions
|
@ -21,7 +21,7 @@ import { i18n } from "@/i18n";
|
|||
import QRCodeVue3 from "qrcode-vue3";
|
||||
|
||||
const props = defineProps<{
|
||||
qrCode: string
|
||||
qrCode: string;
|
||||
}>();
|
||||
|
||||
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
||||
|
|
|
@ -1005,16 +1005,22 @@ export function post(
|
|||
}
|
||||
|
||||
export async function displayQrCode(qrCode: string) {
|
||||
(await new Promise<(() => void) | undefined>((resolve) => {
|
||||
let dispose: (() => void) | undefined;
|
||||
popup(MkQrCode, { qrCode }, {
|
||||
closed: () => {
|
||||
resolve(dispose);
|
||||
}
|
||||
}).then((res) => {
|
||||
dispose = res.dispose
|
||||
(
|
||||
await new Promise<(() => void) | undefined>((resolve) => {
|
||||
let dispose: (() => void) | undefined;
|
||||
popup(
|
||||
MkQrCode,
|
||||
{ qrCode },
|
||||
{
|
||||
closed: () => {
|
||||
resolve(dispose);
|
||||
},
|
||||
},
|
||||
).then((res) => {
|
||||
dispose = res.dispose;
|
||||
});
|
||||
})
|
||||
}))?.();
|
||||
)?.();
|
||||
}
|
||||
|
||||
export const deckGlobalEvents = new EventEmitter();
|
||||
|
|
|
@ -294,8 +294,10 @@ export function getUserMenu(user, router: Router = mainRouter) {
|
|||
icon: "ph-qr-code ph-bold ph-lg",
|
||||
text: i18n.ts.getQrCode,
|
||||
action: () => {
|
||||
os.displayQrCode(`https://${host}/authorize-follow?acct=${user.username}`)
|
||||
}
|
||||
os.displayQrCode(
|
||||
`https://${host}/authorize-follow?acct=${user.username}`,
|
||||
);
|
||||
},
|
||||
},
|
||||
isSignedIn(me) && me.id !== user.id
|
||||
? {
|
||||
|
|
Loading…
Reference in a new issue