From c4626101d5e408078a144178488781a59c7c1520 Mon Sep 17 00:00:00 2001 From: MinerAle <66887063+MinerAle00@users.noreply.github.com> Date: Mon, 24 Feb 2025 21:00:47 +0100 Subject: [PATCH 1/2] feat: add download button for QR code in dashboard links --- components/dashboard/links/QRCode.vue | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/components/dashboard/links/QRCode.vue b/components/dashboard/links/QRCode.vue index d782c99..cdf8559 100644 --- a/components/dashboard/links/QRCode.vue +++ b/components/dashboard/links/QRCode.vue @@ -1,4 +1,6 @@ From c1c84ab0f95a18e7559d708aca4a518bb823a551 Mon Sep 17 00:00:00 2001 From: MinerAle <66887063+MinerAle00@users.noreply.github.com> Date: Mon, 24 Feb 2025 21:05:56 +0100 Subject: [PATCH 2/2] fix: update QR code download filename format to use slug instead of full URL --- components/dashboard/links/QRCode.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/dashboard/links/QRCode.vue b/components/dashboard/links/QRCode.vue index cdf8559..437561e 100644 --- a/components/dashboard/links/QRCode.vue +++ b/components/dashboard/links/QRCode.vue @@ -71,9 +71,10 @@ const qrCode = new QRCodeStyling(options) const qrCodeEl = ref(null) function downloadQRCode() { + const slug = props.data.split('/').pop() qrCode.download({ extension: 'png', - name: `qr-${props.data}`, + name: `qr_${slug}`, }) }