Skip to content

Commit af50f1e

Browse files
committed
feat(pwa): M1 Task1 - PWA manifest 完善(lang zh-CN + iOS 图标与 meta)
1 parent a197778 commit af50f1e

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎client/index.html‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
<!doctype html>
2-
<html lang="en">
2+
<html lang="zh-CN">
33
<head>
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<link rel="apple-touch-icon" href="/pwa-192x192.png" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
8+
<meta name="theme-color" content="#3b82f6" />
9+
<meta name="apple-mobile-web-app-capable" content="yes" />
10+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
11+
<meta name="mobile-web-app-capable" content="yes" />
712
<title>熵减</title>
813
<!-- 防主题闪烁:在 CSS 渲染前同步设置 data-theme(逻辑与 useThemeStore 一致) -->
914
<script>

‎client/vite.config.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,12 @@ export default defineConfig(({ command }) => ({
6060
...(isElectronBuild ? [electronBuildConfigPlugin()] : []),
6161
...(isElectronBuild ? [] : [VitePWA({
6262
registerType: 'autoUpdate',
63-
includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'mask-icon.svg', 'offline.html'],
63+
includeAssets: ['favicon.svg', 'offline.html'],
6464
manifest: {
6565
name: '熵减 - 学习伴侣',
6666
short_name: '熵减',
6767
description: '智能学习管理工具 - 笔记、闪卡、费曼学习法、番茄钟',
68+
lang: 'zh-CN',
6869
theme_color: '#3b82f6',
6970
background_color: '#111827',
7071
display: 'standalone',

0 commit comments

Comments
 (0)