diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index 61064e46f2..f776c19ed4 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -546,7 +546,7 @@ router.get("/notes/:note", async (ctx, next) => { ctx.set("Cache-Control", "public, max-age=15"); ctx.set( "Content-Security-Policy", - "default-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src *; font-src 'self' data:; img-src *; media-src *; worker-src 'self'; frame-ancestors *", + "default-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src *; font-src 'self' data:; img-src * data:; media-src *; worker-src 'self'; frame-ancestors *", ); return; diff --git a/packages/client/src/components/MkQrCode.vue b/packages/client/src/components/MkQrCode.vue index 948de74c13..339ca82dd9 100644 --- a/packages/client/src/components/MkQrCode.vue +++ b/packages/client/src/components/MkQrCode.vue @@ -6,9 +6,14 @@ :value="qrCode" /> - {{ - i18n.ts.gotIt - }} +
+ {{ + i18n.ts.gotIt + }} + {{ + i18n.ts.copyLink + }} +
@@ -19,8 +24,10 @@ import QRCodeVue3 from "qrcode-vue3"; import MkModal from "@/components/MkModal.vue"; import MkButton from "@/components/MkButton.vue"; import { i18n } from "@/i18n"; +import * as os from "@/os"; +import copyToClipboard from "@/scripts/copy-to-clipboard"; -defineProps<{ +const props = defineProps<{ qrCode: string; }>(); @@ -29,6 +36,11 @@ const modal = shallowRef>(); const gotIt = () => { modal.value.close(); }; + +const copyLink = () => { + copyToClipboard(props.qrCode); + os.success(); +};