소스 검색

fix(ui): iOS 9 button text centering + working play glyph

Two iPad 2 issues from screenshot:

1. Button text was left-aligned. On iOS 9 a <button> with display:flex
   ignores justify-content:center. Added text-align:center to .btn as a
   fallback (harmless when flex works).

2. Play symbol rendered as broken-glyph tofu. ▶ (U+25B6) gets emoji
   presentation which fails on iOS 9. Switched legacy play to ► (U+25BA),
   a text-presentation pointer in the same Geometric Shapes block as the
   ■ stop glyph that already renders fine. Canvas PLAY label now uses
   SYM.play too.

Modern browsers unaffected (still ▶ emoji, flex centering).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
master
Jan Svabenik 1 개월 전
부모
커밋
4d06fd4608
2개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      web/static/app.js
  2. +3
    -0
      web/static/style.css

+ 2
- 2
web/static/app.js 파일 보기

@@ -39,7 +39,7 @@ var isLegacyIOS = (function() {
// Symbol set: modern emoji for capable browsers, plain text for iOS ≤ 9. // Symbol set: modern emoji for capable browsers, plain text for iOS ≤ 9.
var SYM = isLegacyIOS ? { var SYM = isLegacyIOS ? {
prev: '<<', prev: '<<',
play: '▶', // U+25B6 — works on iOS 9
play: '►', // U+25BA — text-presentation pointer (▶ U+25B6 fails as broken emoji on iOS 9)
pause: '||', pause: '||',
stop: '■', // U+25A0 — works on iOS 9 stop: '■', // U+25A0 — works on iOS 9
next: '>>', next: '>>',
@@ -437,7 +437,7 @@ function renderFrame(ts) {
if (!ws || ws.readyState !== WebSocket.OPEN) { if (!ws || ws.readyState !== WebSocket.OPEN) {
drawLabel(ctx2d, w, h, '● NO SIGNAL', '#333'); drawLabel(ctx2d, w, h, '● NO SIGNAL', '#333');
} else if (!winampPlaying) { } else if (!winampPlaying) {
drawLabel(ctx2d, w, h, ' PLAY', '#1a3a1a');
drawLabel(ctx2d, w, h, SYM.play + ' PLAY', '#1a3a1a');
} }
} }




+ 3
- 0
web/static/style.css 파일 보기

@@ -144,6 +144,9 @@ html, body {
align-items: center; align-items: center;
-webkit-justify-content: center; -webkit-justify-content: center;
justify-content: center; justify-content: center;
/* Fallback for iOS 9: <button> ignores justify-content on flex,
so center the text the old-fashioned way too. */
text-align: center;
touch-action: manipulation; touch-action: manipulation;
} }
.btn:active { -webkit-transform: scale(0.93); transform: scale(0.93); background: var(--accent2); } .btn:active { -webkit-transform: scale(0.93); transform: scale(0.93); background: var(--accent2); }


불러오는 중...
취소
저장