From f6642ee4369b4eef1fcaca93fd7f44005cf2bb46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=A2=E6=9D=A1?= <2959393+ccbikai@users.noreply.github.com> Date: Sun, 15 Dec 2024 20:43:55 +0800 Subject: [PATCH 1/4] docs: Update code, refer to the official GitHub documentation --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 14424b8..69887d8 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ We welcome your contributions and PRs. - Bind the variable name `ANALYTICS` to the `sink` dataset. 7. Redeploy the project. +8. Update code, refer to the official GitHub documentation [Syncing a fork branch from the web UI](https://docs.github.com/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork#syncing-a-fork-branch-from-the-web-ui). ## ⚒️ Configuration From e995d5063f167c3b78c4596f8ff8e96d65a3e7a3 Mon Sep 17 00:00:00 2001 From: ccbikai Date: Sun, 15 Dec 2024 20:54:50 +0800 Subject: [PATCH 2/4] chore: v0.1.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9869c83..3ec4b63 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "sink", "type": "module", - "version": "0.1.5", + "version": "0.1.6", "private": true, "packageManager": "pnpm@9.7.1", "engines": { From 7863b765707be4551efce4a920839e2b879b831f Mon Sep 17 00:00:00 2001 From: ccbikai Date: Sun, 15 Dec 2024 21:04:21 +0800 Subject: [PATCH 3/4] fix: remove the slug conversion that cannot be reached. --- components/dashboard/links/Editor.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/dashboard/links/Editor.vue b/components/dashboard/links/Editor.vue index d4eeddd..4f7fb3b 100644 --- a/components/dashboard/links/Editor.vue +++ b/components/dashboard/links/Editor.vue @@ -102,12 +102,10 @@ onMounted(() => { } }) -const { caseSensitive } = useRuntimeConfig() - async function onSubmit(formData) { const link = { url: formData.url, - slug: caseSensitive ? formData.slug : formData.slug.toLowerCase(), + slug: formData.slug, ...(formData.optional || []), expiration: formData.optional?.expiration ? date2unix(formData.optional?.expiration, 'end') : undefined, } From 842a8ab561c2ed0b3e88bd67be3f55527a76851f Mon Sep 17 00:00:00 2001 From: ccbikai Date: Mon, 23 Dec 2024 20:57:16 +0800 Subject: [PATCH 4/4] feat: Add link search function --- components/dashboard/Nav.vue | 4 +- components/dashboard/links/Index.vue | 9 +- components/dashboard/links/Search.vue | 88 ++++++++ components/ui/badge/Badge.vue | 16 ++ components/ui/badge/index.ts | 25 ++ components/ui/command/Command.vue | 30 +++ components/ui/command/CommandDialog.vue | 21 ++ components/ui/command/CommandEmpty.vue | 20 ++ components/ui/command/CommandGroup.vue | 29 +++ components/ui/command/CommandInput.vue | 33 +++ components/ui/command/CommandItem.vue | 26 +++ components/ui/command/CommandList.vue | 27 +++ components/ui/command/CommandSeparator.vue | 23 ++ components/ui/command/CommandShortcut.vue | 14 ++ components/ui/command/index.ts | 9 + package.json | 2 + pnpm-lock.yaml | 251 ++++++++++++++++++++- server/api/link/create.post.ts | 2 + server/api/link/edit.put.ts | 4 +- server/api/link/search.get.ts | 73 ++++++ 20 files changed, 695 insertions(+), 11 deletions(-) create mode 100644 components/dashboard/links/Search.vue create mode 100644 components/ui/badge/Badge.vue create mode 100644 components/ui/badge/index.ts create mode 100644 components/ui/command/Command.vue create mode 100644 components/ui/command/CommandDialog.vue create mode 100644 components/ui/command/CommandEmpty.vue create mode 100644 components/ui/command/CommandGroup.vue create mode 100644 components/ui/command/CommandInput.vue create mode 100644 components/ui/command/CommandItem.vue create mode 100644 components/ui/command/CommandList.vue create mode 100644 components/ui/command/CommandSeparator.vue create mode 100644 components/ui/command/CommandShortcut.vue create mode 100644 components/ui/command/index.ts create mode 100644 server/api/link/search.get.ts diff --git a/components/dashboard/Nav.vue b/components/dashboard/Nav.vue index 2c1fa5d..814eec0 100644 --- a/components/dashboard/Nav.vue +++ b/components/dashboard/Nav.vue @@ -3,7 +3,7 @@ const route = useRoute() diff --git a/components/dashboard/links/Index.vue b/components/dashboard/links/Index.vue index 35b6611..1ae1edf 100644 --- a/components/dashboard/links/Index.vue +++ b/components/dashboard/links/Index.vue @@ -42,9 +42,12 @@ function updateLinkList(link, type) {