From 5d58016b1d1cea789785123802a800a95ab0b887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B3=E5=85=83=E7=9A=93?= Date: Sat, 10 May 2025 22:05:10 +0800 Subject: [PATCH] Clean code. --- .github/workflows/self_deploy.yml | 8 +- .gitignore | 2 +- components/ui/command/Command.vue | 80 +++++++++-------- components/ui/command/CommandDialog.vue | 18 ++-- components/ui/command/CommandEmpty.vue | 33 ++++--- components/ui/command/CommandGroup.vue | 57 +++++++----- components/ui/command/CommandInput.vue | 41 +++++---- components/ui/command/CommandItem.vue | 87 +++++++++++-------- components/ui/command/CommandList.vue | 25 +++--- components/ui/command/CommandSeparator.vue | 18 ++-- components/ui/command/CommandShortcut.vue | 14 +-- components/ui/command/index.ts | 42 +++++---- components/ui/dialog/Dialog.vue | 13 ++- components/ui/dialog/DialogClose.vue | 4 +- components/ui/dialog/DialogContent.vue | 25 +++--- components/ui/dialog/DialogDescription.vue | 22 +++-- components/ui/dialog/DialogFooter.vue | 6 +- components/ui/dialog/DialogHeader.vue | 8 +- components/ui/dialog/DialogScrollContent.vue | 39 +++++---- components/ui/dialog/DialogTitle.vue | 23 +++-- components/ui/dialog/DialogTrigger.vue | 4 +- components/ui/dialog/index.ts | 18 ++-- components/ui/hover-card/HoverCard.vue | 13 ++- components/ui/hover-card/HoverCardContent.vue | 18 ++-- components/ui/hover-card/HoverCardTrigger.vue | 4 +- components/ui/hover-card/index.ts | 6 +- createDatabase.ts | 3 +- docker-compose.yml | 4 +- nuxt.config.ts | 4 +- pages/newsOrgs.vue | 6 +- pages/topic/view/[slug].vue | 19 ++-- scraping/README.md | 3 + scraping/main.py | 13 +-- scraping/requirements.txt | 2 +- server/api/ai/chat/[slug].ts | 44 +++++----- server/api/ai/summerize/[slug].ts | 44 +++++----- server/api/fetcharticle/[slug].ts | 46 +++++----- server/components/postgres.ts | 6 +- server/routes/go/[slug].ts | 40 ++++----- 39 files changed, 481 insertions(+), 381 deletions(-) create mode 100644 scraping/README.md diff --git a/.github/workflows/self_deploy.yml b/.github/workflows/self_deploy.yml index 0e36b70..9790571 100644 --- a/.github/workflows/self_deploy.yml +++ b/.github/workflows/self_deploy.yml @@ -8,10 +8,10 @@ on: jobs: deploy: runs-on: ubuntu-latest - + env: DEPLOY_URL: ${{ secrets.DEPLOY_URL }} - + steps: - name: Send deployment request id: deploy-request @@ -24,11 +24,11 @@ jobs: --silent \ --show-error \ "${{ secrets.DEPLOY_URL }}" || echo "Failed to send request") - + if [ $? -eq 0 ]; then echo "Deployment request sent successfully" echo "Response: $RESPONSE" else echo "Error sending deployment request" exit 1 - fi \ No newline at end of file + fi diff --git a/.gitignore b/.gitignore index a6a5428..166b664 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,4 @@ logs # Scraping data .venv -__pycache__ \ No newline at end of file +__pycache__ diff --git a/components/ui/command/Command.vue b/components/ui/command/Command.vue index 9597010..fa56cf7 100644 --- a/components/ui/command/Command.vue +++ b/components/ui/command/Command.vue @@ -1,30 +1,33 @@