From ae054f76de6045ba6f4beb980dfdaf920b5838ad Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Tue, 5 Aug 2025 00:34:13 +0800 Subject: [PATCH 1/4] cache home page view --- frontend/src/App.vue | 7 ++++++- frontend/src/router/index.js | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index b3634be7a..f60db5054 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -9,7 +9,12 @@
- + + + + + +
diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index 3822c93a6..9c91d0ebb 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -23,7 +23,8 @@ const routes = [ { path: '/', name: 'home', - component: HomePageView + component: HomePageView, + meta: { keepAlive: true } }, { path: '/message', From eedde0fd28f273d53e0c273e7032944b0c2e96a6 Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Tue, 5 Aug 2025 00:46:08 +0800 Subject: [PATCH 2/4] Restore scroll position on cached home page --- frontend/src/views/HomePageView.vue | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/HomePageView.vue b/frontend/src/views/HomePageView.vue index 8fea56c14..a10279969 100644 --- a/frontend/src/views/HomePageView.vue +++ b/frontend/src/views/HomePageView.vue @@ -1,5 +1,5 @@ From 42c3ef3377e45065bfec12662e6a321bfe80f0a8 Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Tue, 5 Aug 2025 01:00:19 +0800 Subject: [PATCH 3/4] Track home page scroll position --- frontend/src/views/HomePageView.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/views/HomePageView.vue b/frontend/src/views/HomePageView.vue index a10279969..269f2f849 100644 --- a/frontend/src/views/HomePageView.vue +++ b/frontend/src/views/HomePageView.vue @@ -375,6 +375,7 @@ export default { const handleScroll = (e) => { const el = e.target + savedScrollTop.value = el.scrollTop if (el.scrollHeight - el.scrollTop <= el.clientHeight + 50) { fetchContent() } From 730d5b1d10b87fabf31aa2c8a49c1c4ccea367b7 Mon Sep 17 00:00:00 2001 From: tim Date: Tue, 5 Aug 2025 01:04:01 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=E4=B8=BB=E9=A1=B5=E7=BC=93?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/open-isle.env.example | 33 +++++++++++++++++++++++++++++ frontend/src/views/HomePageView.vue | 8 +------ 2 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 backend/open-isle.env.example diff --git a/backend/open-isle.env.example b/backend/open-isle.env.example new file mode 100644 index 000000000..699be62e3 --- /dev/null +++ b/backend/open-isle.env.example @@ -0,0 +1,33 @@ +# === Database === +MYSQL_URL=jdbc:mysql://<数据库地址>:<端口>/<数据库名>?useUnicode=yes&characterEncoding=UTF-8&useInformationSchema=true&useSSL=false&serverTimezone=UTC +MYSQL_USER=<数据库用户名> +MYSQL_PASSWORD=<数据库密码> + + +# === Resend === +RESEND_API_KEY=<你的resend-api-key> + +# === COS === +# COS_BASE_URL=https://<你的cos>.cos.ap-guangzhou.myqcloud.com +COS_BASE_URL=https://<你的cos>.cos.accelerate.myqcloud.com +COS_SECRET_ID=<你的cos-secret-id> +COS_SECRET_KEY=<你的cos-secret-key> +COS_BUCKET_NAME=<你的cos-bucket-name> + +# === OAuth === +GOOGLE_CLIENT_ID=<你的google-client-id> +GITHUB_CLIENT_ID=<你的github-client-id> +GITHUB_CLIENT_SECRET=<你的github-client-secret> +TWITTER_CLIENT_ID=<你的twitter-client-id> +TWITTER_CLIENT_SECRET=<你的-twitter-client-secret> +DISCORD_CLIENT_ID=<你的discord-client-id> +DISCORD_CLIENT_SECRET=<你的discord-client-secret> + +# === OPENAI === +OPENAI_API_KEY=<你的openai-api-key> + +# === Webpush === +WEBPUSH_PUBLIC_KEY=<你的webpush-public-key> +WEBPUSH_PRIVATE_KEY=<你的webpush-private-key> + +# LOG_LEVEL=DEBUG \ No newline at end of file diff --git a/frontend/src/views/HomePageView.vue b/frontend/src/views/HomePageView.vue index 269f2f849..91e128dec 100644 --- a/frontend/src/views/HomePageView.vue +++ b/frontend/src/views/HomePageView.vue @@ -107,7 +107,7 @@