From ce18b5eae3158c5a791f04e8618779c9bbbb7016 Mon Sep 17 00:00:00 2001 From: MinerAle <66887063+MinerAle00@users.noreply.github.com> Date: Mon, 24 Feb 2025 21:19:33 +0100 Subject: [PATCH 1/4] Removed the api modification for the qrcode pull request --- server/api/link/create.post.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/server/api/link/create.post.ts b/server/api/link/create.post.ts index 7d0977a..e3be9b1 100644 --- a/server/api/link/create.post.ts +++ b/server/api/link/create.post.ts @@ -1,15 +1,7 @@ -import { LinkSchema, nanoid } from '@/schemas/link' +import { LinkSchema } from '@/schemas/link' export default eventHandler(async (event) => { - const body = await readBody(event) - - // If no slug provided, generate one with default length from env or fall back to default - if (!body.slug) { - const { slugDefaultLength } = useRuntimeConfig().public - body.slug = slugDefaultLength ? nanoid(+slugDefaultLength)() : nanoid()() - } - - const link = await LinkSchema.parse(body) + const link = await readValidatedBody(event, LinkSchema.parse) const { caseSensitive } = useRuntimeConfig(event) From 3d5c4b0dd4d646aa16a8e9404ad5665cf029d38b Mon Sep 17 00:00:00 2001 From: MinerAle <66887063+MinerAle00@users.noreply.github.com> Date: Thu, 27 Feb 2025 08:11:31 +0100 Subject: [PATCH 2/4] feat: add color picker to customize QR code appearance --- components/dashboard/links/QRCode.vue | 35 +++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/components/dashboard/links/QRCode.vue b/components/dashboard/links/QRCode.vue index 437561e..cda6391 100644 --- a/components/dashboard/links/QRCode.vue +++ b/components/dashboard/links/QRCode.vue @@ -1,7 +1,8 @@ @@ -103,20 +121,26 @@ onMounted(() => { ref="qrCodeEl" :data-text="data" /> -
-
- - +
+
+
+ + +
+ +
+
+ Icon +
-
From 9a9975c6a99d3f255abe626c8de64fe3f6eb7fc8 Mon Sep 17 00:00:00 2001 From: MinerAle <66887063+MinerAle00@users.noreply.github.com> Date: Thu, 27 Feb 2025 08:29:35 +0100 Subject: [PATCH 4/4] refactor: remove icon toggle functionality and simplify QR code component --- components/dashboard/links/QRCode.vue | 48 ++++++++------------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/components/dashboard/links/QRCode.vue b/components/dashboard/links/QRCode.vue index e903ead..3ef8ba8 100644 --- a/components/dashboard/links/QRCode.vue +++ b/components/dashboard/links/QRCode.vue @@ -1,6 +1,6 @@ @@ -121,26 +103,24 @@ onMounted(() => { ref="qrCodeEl" :data-text="data" /> -
-
-
- +
+
+
- -
-
- Icon -
+