安装到主屏后的启动背景与状态栏色此前仍是旧的墨绿/暖白;e2e 断言与文档同步更新。
This commit is contained in:
@@ -520,7 +520,7 @@
|
||||
### 8.3 实现
|
||||
| 位置 | 内容 |
|
||||
|---|---|
|
||||
| `web/vite.config.ts` | manifest(standalone、主题色 `#2f6054`、三个图标)+ workbox(`navigateFallback` 回退 `index.html`,`/vditor/` 走 CacheFirst,`/api/` NetworkOnly) |
|
||||
| `web/vite.config.ts` | manifest(standalone、主题色 `#274b73`、三个图标)+ workbox(`navigateFallback` 回退 `index.html`,`/vditor/` 走 CacheFirst,`/api/` NetworkOnly) |
|
||||
| `web/index.html` | favicon 改成同款 Logo(内联 SVG)、`theme-color`、`apple-touch-icon`、`viewport-fit=cover` |
|
||||
| `web/src/lib/pwa.ts` | 生产环境注册 SW、`dadao:pwa-update-ready` 事件、`applyServiceWorkerUpdate()`、`isStandalone()` |
|
||||
| `web/src/components/UpdatePrompt.tsx` | 底部卡片「有新版了」+ 稍后 / 刷新(**居中用 flex 包一层**:`animate-slide-up` 的 keyframes 自带 transform,会和 `-translate-x-1/2` 抢属性,手机窄屏上卡片会被推出屏幕右侧) |
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ async function main() {
|
||||
check("页面骨架已预缓存", shellCached);
|
||||
|
||||
const themeColor = await page.getAttribute('meta[name="theme-color"]', "content");
|
||||
check("主题色是墨绿", themeColor === "#2f6054", String(themeColor));
|
||||
check("主题色是景泰蓝", themeColor === "#274b73", String(themeColor));
|
||||
check("桌面尺寸没有控制台报错", errors.length === 0, errors.join(" | "));
|
||||
await desktop.close();
|
||||
|
||||
|
||||
+2
-2
@@ -22,8 +22,8 @@ export default defineConfig({
|
||||
scope: "/",
|
||||
display: "standalone",
|
||||
orientation: "any",
|
||||
background_color: "#f7f5f0",
|
||||
theme_color: "#2f6054",
|
||||
background_color: "#f3f5f9",
|
||||
theme_color: "#274b73",
|
||||
categories: ["productivity", "business"],
|
||||
icons: [
|
||||
{ src: "/icons/icon-192.png", sizes: "192x192", type: "image/png", purpose: "any" },
|
||||
|
||||
Reference in New Issue
Block a user