chore: format

This commit is contained in:
老周部落 2024-04-25 20:40:18 +08:00
parent 6aecf12067
commit ab357233db
No known key found for this signature in database
GPG key ID: C72181CD85C6B738
3 changed files with 20 additions and 12 deletions

View file

@ -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>>();

View file

@ -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();

View file

@ -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
? {