Skip to content

Commit 8e3e4e6

Browse files
committed
fix(pwa): 修复 manifest.json 未被引用导致浏览器无法识别 PWA (#640)
在 index.html 中添加 manifest 引用,并补全 PWA 必需字段
1 parent 03b52cd commit 8e3e4e6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

resources/manifest.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
2-
"name": "Alger Music PWA",
2+
"name": "Alger Music Player",
3+
"short_name": "AlgerMusic",
4+
"description": "AlgerMusicPlayer 音乐播放器,支持在线播放、歌词显示、音乐下载等功能。",
5+
"start_url": "/",
6+
"display": "standalone",
7+
"background_color": "#ffffff",
8+
"theme_color": "#000000",
39
"icons": [
410
{
511
"src": "./icon.png",

src/renderer/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
<meta name="apple-mobile-web-app-capable" content="yes" />
2727
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
28+
<link rel="manifest" href="/manifest.json" />
2829

2930
<!-- 资源预加载 -->
3031
<link rel="preload" href="./assets/icon/iconfont.css" as="style" />

0 commit comments

Comments
 (0)