fix(player+admin): 移动端 PWA 安全区、防缩放与局域网调试

玩家端适配主屏幕 safe-area、底部导航滚动隐藏与全屏布局;双端禁止页面缩放并开放 Vite host 供手机联调。
This commit is contained in:
2026-06-22 17:58:51 +08:00
parent b9257cc50a
commit fa06fee64c
9 changed files with 123 additions and 15 deletions

View File

@@ -40,6 +40,10 @@
#5C4A12 100%
);
--gradient-card: linear-gradient(160deg, #1E1A12 0%, #141414 40%, #0A0A0A 100%);
--player-header-h: 52px;
--player-bottom-nav-h: 54px;
--safe-top: env(safe-area-inset-top, 0px);
--safe-bottom: env(safe-area-inset-bottom, 0px);
}
/** 金色描边按钮(避免大面积实心填充) */
@@ -188,9 +192,19 @@ html,
body,
#app {
height: 100%;
min-height: 100%;
touch-action: manipulation;
}
html {
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
height: -webkit-fill-available;
}
body {
min-height: 100%;
min-height: -webkit-fill-available;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
/* 保留 bg 位图;用 scroll 替代 fixed减轻移动端滚动重绘后续可换 WebP/AVIF */
background-color: var(--tertiary);
@@ -207,6 +221,11 @@ body {
-webkit-font-smoothing: antialiased;
}
#app {
min-height: 100%;
min-height: -webkit-fill-available;
}
a { color: inherit; text-decoration: none; }
button {
@@ -223,7 +242,7 @@ input {
padding: 14px 16px;
border-radius: var(--radius-sm);
width: 100%;
font-size: 15px;
font-size: 16px;
font-weight: 500;
transition: border-color 0.2s, box-shadow 0.2s;
}