From 109a39f6e910799ac344678fb93937eacb1d6e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B3=E5=85=83=E7=9A=93?= Date: Thu, 22 May 2025 00:09:01 +0800 Subject: [PATCH] Remove some files & trying to make the desktop look more fun & I'm going to sleep now. --- build_docs.sh | 31 --- build_docs_gh_workflow.sh | 8 - cleardatabase.ts | 8 + components/DraggableWindow.vue | 8 +- components/app/windows/fav.vue | 18 +- createDatabase.ts | 2 +- i18n/locales/en.json | 1 + i18n/locales/zh-tw.json | 1 + pages/desktop.vue | 55 ----- pages/fun-desktop.vue | 428 +++++++++++++++++++++++++++++++++ pages/home.vue | 9 +- pages/newsOrgs.vue | 8 - 12 files changed, 458 insertions(+), 119 deletions(-) delete mode 100755 build_docs.sh delete mode 100644 build_docs_gh_workflow.sh create mode 100644 cleardatabase.ts create mode 100644 pages/fun-desktop.vue delete mode 100644 pages/newsOrgs.vue diff --git a/build_docs.sh b/build_docs.sh deleted file mode 100755 index 6b5fa51..0000000 --- a/build_docs.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -ask_yes_no() { - while true; do - read -p "$1 (y/n): " answer - case ${answer:0:1} in - y|Y ) return 0 ;; - n|N ) return 1 ;; - * ) echo "Please answer yes or no.";; - esac - done -} - -if ask_yes_no "Are you ABSOLUTELY in the root dir of the app?"; then - echo "Proceeding with build..." - cd ./docs/ - if ask_yes_no "Have you installed vitepress before?"; then - echo "Skipping" - else - echo "Installing vitepress with bun..." - bun add -D vitepress - fi - bunx vitepress build - cd .. - cp -R ./docs/.vitepress/dist/ ./public/docs/ - echo "Done :)" - exit 1 -else - echo "Please navigate to the root directory and try again." - exit 1 -fi diff --git a/build_docs_gh_workflow.sh b/build_docs_gh_workflow.sh deleted file mode 100644 index ec22321..0000000 --- a/build_docs_gh_workflow.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -cd ./docs/ -npm install -g vitepress -bunx vitepress build -cd .. -cp -R ./docs/.vitepress/dist/ ./public/docs/ -echo "Done :)" -exit 1 diff --git a/cleardatabase.ts b/cleardatabase.ts new file mode 100644 index 0000000..5b947e1 --- /dev/null +++ b/cleardatabase.ts @@ -0,0 +1,8 @@ +const cleardb = ` + DROP TABLE users; + DROP TABLE usertokens; + DROP TABLE newsProviders; + DROP TABLE chat_history; + DROP TABLE news_articles; + DROP TABLE hot_news; + DROP TABLE articles_lt;`; diff --git a/components/DraggableWindow.vue b/components/DraggableWindow.vue index 187b5ee..45e1e16 100644 --- a/components/DraggableWindow.vue +++ b/components/DraggableWindow.vue @@ -10,7 +10,7 @@ const props = defineProps<{ black?: boolean | false; }>(); -const emit = defineEmits(["close", "min", "maximize", "restore"]); +const emit = defineEmits(["close", "min", "restore"]); const title = computed(() => props.title || "Draggable Window"); const isDragging = ref(false); @@ -86,12 +86,6 @@ const stopDrag = () => { > ━ -