Fix desktop blur from false tablet layout.
Stop classifying short desktop viewports as tablets so densify fonts do not apply. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,31 @@
|
||||
|
||||
---
|
||||
|
||||
## 2026-07-16 · 电脑端误判平板导致发糊
|
||||
|
||||
### 修改原因
|
||||
|
||||
`isTabletLayout()` 曾用「高度 ≤920 即平板」;1080p 电脑有任务栏/浏览器栏时 `innerHeight` 常落在此区间,桌面被套上平板压缩字号(约 10px),观感发糊发虚。
|
||||
|
||||
### 修改的地方
|
||||
|
||||
| 文件 | 改动摘要 |
|
||||
|------|----------|
|
||||
| `manual_trading_hub/static/app.js` | 平板判定改为横屏 `721–1366 × ≤900` / 竖屏 `≤920 × ≥900`;去掉仅按高度命中 |
|
||||
| `manual_trading_hub/static/index.html` | JS 缓存 `20260716-hub-desktop-clear` |
|
||||
|
||||
### 达成的目标
|
||||
|
||||
常规电脑端不再误加 `hub-tablet`,恢复桌面字号与清晰度;真平板视口仍走一屏密度样式。
|
||||
|
||||
### 交付之后的验收
|
||||
|
||||
1. 1080p/1440p 电脑打开中控,正文与表格清晰,非异常小字。
|
||||
2. 浏览器开发者工具确认 `body` 无 `hub-tablet`(窄窗模拟平板除外)。
|
||||
3. 平板横/竖仍为一屏密度布局。
|
||||
|
||||
---
|
||||
|
||||
## 2026-07-16 · 平板一屏密度适配(不裁切)
|
||||
|
||||
### 修改原因
|
||||
|
||||
@@ -77,13 +77,19 @@
|
||||
return window.matchMedia("(max-width: 720px)").matches;
|
||||
}
|
||||
|
||||
/** 平板 CSS 视口(如 2560×1600 @2x ≈ 1280×800),或高度偏矮的大屏 */
|
||||
/**
|
||||
* 平板 CSS 视口(如 2560×1600@2x≈1280×800, 竖屏≈800×1280)。
|
||||
* 禁止「仅按高度」判断:1080p 电脑开任务栏/浏览器栏时 innerHeight 常 ≤920,
|
||||
* 会误加 hub-tablet,字号被压到 ~10px,看起来发糊。
|
||||
*/
|
||||
function isTabletLayout() {
|
||||
if (isMobileLayout()) return false;
|
||||
const w = window.innerWidth || 0;
|
||||
const h = window.innerHeight || 0;
|
||||
if (w >= 721 && w <= 1599) return true;
|
||||
if (w >= 721 && h > 0 && h <= 920) return true;
|
||||
// 横屏平板:中等宽度 + 偏矮
|
||||
if (w >= 721 && w <= 1366 && h > 0 && h <= 900) return true;
|
||||
// 竖屏平板:偏窄 + 偏高
|
||||
if (w >= 721 && w <= 920 && h >= 900) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1327,6 +1327,6 @@
|
||||
<script src="/assets/options_expiry_countdown.js?v=1"></script>
|
||||
<script src="/assets/options_position_cards.js?v=1"></script>
|
||||
<script src="/assets/backup.js?v=1"></script>
|
||||
<script src="/assets/app.js?v=20260716-hub-fit-tablet"></script>
|
||||
<script src="/assets/app.js?v=20260716-hub-desktop-clear"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user