From 6ffab997684f31c445d4dd7bbfcf018340eab0ef Mon Sep 17 00:00:00 2001 From: pecasha Date: Thu, 4 Apr 2024 15:42:00 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8DPWA=E6=9C=AA=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E6=B3=A8=E5=86=8C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-prod.yml | 2 +- package.json | 3 ++- pnpm-lock.yaml | 3 +++ src/app.d.ts | 1 - src/app.html | 2 +- src/routes/+layout.svelte | 4 +++- src/routes/+page.svelte | 2 +- static/favicon.ico | Bin 0 -> 4286 bytes static/{favicon.png => logo.png} | Bin vite.config.ts | 23 ++++++++++++++++++++--- 10 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 static/favicon.ico rename static/{favicon.png => logo.png} (100%) diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 5eede8e..c340278 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -56,4 +56,4 @@ jobs: - name: Authenticate With Tencent Cloud CLI run: tccli configure set secretId $SECRET_ID secretKey $SECRET_KEY - name: Purge Tencent Cloud CDN Cache - run: tccli cdn PurgeUrlsCache --Urls "$(echo '["${{ vars.WEBSITE_DOMAIN }}"]')" + run: tccli cdn PurgeUrlsCache --Urls "$(echo '${{ vars.DEPLOY_CDN_PURGE_URLS }}')" diff --git a/package.json b/package.json index 3264f66..843b620 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "tailwindcss": "^3.4.3", "tslib": "^2.6.2", "typescript": "^5.4.3", - "vite": "^5.2.7" + "vite": "^5.2.7", + "vite-plugin-pwa": "^0.19.7" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d6189e2..df98dc1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -64,6 +64,9 @@ devDependencies: vite: specifier: ^5.2.7 version: 5.2.7(@types/node@20.12.2)(less@4.2.0) + vite-plugin-pwa: + specifier: ^0.19.7 + version: 0.19.7(vite@5.2.7)(workbox-build@7.0.0)(workbox-window@7.0.0) packages: diff --git a/src/app.d.ts b/src/app.d.ts index 7a276a7..28834c7 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -1,5 +1,4 @@ import "vite-plugin-pwa/info"; -import "vite-plugin-pwa/svelte"; declare global { namespace App { diff --git a/src/app.html b/src/app.html index ba0cd05..017e8d1 100644 --- a/src/app.html +++ b/src/app.html @@ -2,7 +2,7 @@ - + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index d095222..d822116 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,4 +1,6 @@ - +
+ +
{@html webManifestLink} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 0e91b20..45a450f 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,7 +1,7 @@