feat(icon): 补齐 PWA / 错误页 / 登录页图标
漏掉的四处(都实测确认过):
- PWA manifest 的主图标是 /web-icons/dashy-logo.png(512x512),以及
dashy-pwa_{48,72,96,144,192,512}.png —— 全部仍是上游 Dashy 品牌,
浏览器「安装到桌面/主屏」时用的就是这批。由 favicon.svg 重新派生。
- portal/404.html、500.html 没有任何 icon 标签(浏览器只能退化去找
/favicon.ico)。实测两条路径都能取到图标,但仍显式声明更稳妥。
- 登录页模板(admin-server/auth.go)同样缺 icon 标签。
所有派生 PNG 都逐个解码验证(颜色数 111~1603,非空非纯色)。
@ -143,6 +143,8 @@ func safePortalRedirect(raw string) string {
|
||||
var portalLoginTemplate = template.Must(template.New("login").Parse(`<!doctype html>
|
||||
<html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>{{.Title}} - 登录</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
||||
<link rel="icon" href="/favicon.ico" sizes="any">
|
||||
<script>(function(){var s=localStorage.getItem('theme');var p=window.matchMedia('(prefers-color-scheme:dark)').matches;document.documentElement.setAttribute('data-theme',s||(p?'dark':'light'))})()</script>
|
||||
<style>
|
||||
/* 深浅色:默认跟随系统(prefers-color-scheme),手动切换后写入 localStorage。
|
||||
|
||||
@ -37,6 +37,8 @@
|
||||
.error-page p { color:var(--text-secondary); margin-bottom:28px; font-size:14px }
|
||||
.error-page .btn { margin:0 4px }
|
||||
</style>
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
||||
<link rel="icon" href="/favicon.ico" sizes="any">
|
||||
</head>
|
||||
<body>
|
||||
<div class="error-page">
|
||||
|
||||
@ -36,6 +36,8 @@
|
||||
.error-page h1 { font-size:3rem; font-weight:800; margin-bottom:4px; color:var(--text-primary) }
|
||||
.error-page p { color:var(--text-secondary); margin-bottom:28px; font-size:14px }
|
||||
</style>
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
||||
<link rel="icon" href="/favicon.ico" sizes="any">
|
||||
</head>
|
||||
<body>
|
||||
<div class="error-page">
|
||||
|
||||
BIN
portal/web-icons/dashy-logo.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
portal/web-icons/dashy-pwa_144x144.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
portal/web-icons/dashy-pwa_192x192.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
portal/web-icons/dashy-pwa_48x48.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
portal/web-icons/dashy-pwa_512x512.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
portal/web-icons/dashy-pwa_72x72.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
portal/web-icons/dashy-pwa_96x96.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |