From f3480fe5608f0eff5b01938e59c11c2b21b7812d Mon Sep 17 00:00:00 2001 From: Corentin Thomasset Date: Thu, 6 Apr 2023 00:54:17 +0200 Subject: [PATCH] refactor(qr-code): multiline input --- src/tools/qr-code-generator/qr-code-generator.vue | 7 ++++++- src/tools/qr-code-generator/useQRCode.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tools/qr-code-generator/qr-code-generator.vue b/src/tools/qr-code-generator/qr-code-generator.vue index e565ba7e..9800f283 100644 --- a/src/tools/qr-code-generator/qr-code-generator.vue +++ b/src/tools/qr-code-generator/qr-code-generator.vue @@ -4,7 +4,12 @@ - + diff --git a/src/tools/qr-code-generator/useQRCode.ts b/src/tools/qr-code-generator/useQRCode.ts index 44b72a72..64ee90a1 100644 --- a/src/tools/qr-code-generator/useQRCode.ts +++ b/src/tools/qr-code-generator/useQRCode.ts @@ -19,7 +19,7 @@ export function useQRCode({ [text, background, foreground, errorCorrectionLevel].filter(isRef), async () => { if (get(text)) - qrcode.value = await QRCode.toDataURL(get(text), { + qrcode.value = await QRCode.toDataURL(get(text).trim(), { color: { dark: get(foreground), light: get(background),