diff --git a/AGENTS.md b/AGENTS.md index 08ea58a..0dd7992 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,6 +2,8 @@ ## Localization (required) +Every change or addition must include an update to `js/i18n.js`: review and update the translations and localization behavior affected by the change. + Every user-facing string must go through `js/i18n.js`. Never hardcode Thai or English UI text in HTML or JS. - Use `data-i18n`, `data-i18n-placeholder`, `data-i18n-title`, `data-i18n-alt` or `data-i18n-aria-label` in `index.html`. diff --git a/assets/relic-slots/1.png b/assets/relic-slots/1.png new file mode 100644 index 0000000..f2c33c6 Binary files /dev/null and b/assets/relic-slots/1.png differ diff --git a/assets/relic-slots/2.png b/assets/relic-slots/2.png new file mode 100644 index 0000000..6233d96 Binary files /dev/null and b/assets/relic-slots/2.png differ diff --git a/assets/relic-slots/3.png b/assets/relic-slots/3.png new file mode 100644 index 0000000..903038b Binary files /dev/null and b/assets/relic-slots/3.png differ diff --git a/assets/relic-slots/4.png b/assets/relic-slots/4.png new file mode 100644 index 0000000..7070ce5 Binary files /dev/null and b/assets/relic-slots/4.png differ diff --git a/assets/relic-slots/5.png b/assets/relic-slots/5.png new file mode 100644 index 0000000..921cc43 Binary files /dev/null and b/assets/relic-slots/5.png differ diff --git a/assets/relic-slots/6.png b/assets/relic-slots/6.png new file mode 100644 index 0000000..856b3c7 Binary files /dev/null and b/assets/relic-slots/6.png differ diff --git a/assets/relics/329-set.png b/assets/relics/329-set.png new file mode 100644 index 0000000..3fcc144 Binary files /dev/null and b/assets/relics/329-set.png differ diff --git a/assets/relics/330-set.png b/assets/relics/330-set.png new file mode 100644 index 0000000..d17e71e Binary files /dev/null and b/assets/relics/330-set.png differ diff --git a/css/styles.css b/css/styles.css index 3533f28..08647d6 100644 --- a/css/styles.css +++ b/css/styles.css @@ -851,6 +851,257 @@ body { border-color: rgba(99, 120, 160, 0.45); } +/* Freecam / FaceCam camera settings */ +.camera-settings-card { + display: block; + padding: clamp(0.9rem, 1.6vw, 1.25rem); +} + +.camera-settings { + display: flex; + flex-direction: column; + gap: 0.85rem; +} + +.camera-settings-head { + display: flex; + align-items: flex-start; + gap: 0.7rem; +} + +.camera-settings-emblem { + display: grid; + flex: 0 0 38px; + width: 38px; + height: 38px; + place-items: center; + border: 1px solid rgba(56, 189, 248, 0.32); + border-radius: 12px; + background: linear-gradient(145deg, rgba(56, 189, 248, 0.18), rgba(56, 189, 248, 0.03)); + font-size: 1.1rem; + line-height: 1; +} + +.camera-settings-copy { + min-width: 0; +} + +.camera-settings-title { + color: var(--text-highlight); + font-size: 1rem; + font-weight: 800; + line-height: 1.35; +} + +.camera-settings-hint { + margin-top: 0.15rem; + color: var(--text-muted); + font-size: 0.78rem; + line-height: 1.5; +} + +.camera-mode-options { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr)); + gap: 0.6rem; +} + +.camera-mode-option { + position: relative; + display: flex; + min-width: 0; + align-items: flex-start; + gap: 0.6rem; + padding: 0.7rem 2.1rem 0.7rem 0.75rem; + border: 1px solid rgba(110, 123, 148, 0.3); + border-radius: 12px; + background: rgba(9, 13, 22, 0.6); + color: var(--text-main); + font: inherit; + text-align: left; + cursor: pointer; + transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease; +} + +.camera-mode-option:hover { + transform: translateY(-1px); + border-color: rgba(56, 189, 248, 0.5); + background: rgba(23, 32, 46, 0.9); +} + +.camera-mode-option:focus-visible { + outline: 3px solid rgba(56, 189, 248, 0.8); + outline-offset: 2px; +} + +.camera-mode-option.is-selected { + border-color: rgba(56, 189, 248, 0.85); + background: linear-gradient(145deg, rgba(12, 74, 110, 0.5), rgba(15, 23, 36, 0.9)); + box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.16), 0 6px 18px rgba(0, 0, 0, 0.2); +} + +.camera-mode-icon { + font-size: 1.05rem; + line-height: 1.4; +} + +.camera-mode-text { + display: flex; + min-width: 0; + flex-direction: column; + gap: 0.16rem; +} + +.camera-mode-title { + color: var(--text-highlight); + font-size: 0.9rem; + font-weight: 800; + line-height: 1.3; +} + +.camera-mode-detail { + color: var(--text-muted); + font-size: 0.74rem; + line-height: 1.4; +} + +.camera-mode-check { + position: absolute; + top: 0.55rem; + right: 0.6rem; + display: grid; + width: 21px; + height: 21px; + place-items: center; + border: 1px solid rgba(148, 163, 184, 0.28); + border-radius: 50%; + color: transparent; + font-size: 0.7rem; + font-weight: 900; +} + +.camera-mode-option.is-selected .camera-mode-check { + border-color: var(--accent-cyan); + background: var(--accent-cyan); + color: #06121c; +} + +.camera-native-select { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + clip-path: inset(50%); + white-space: nowrap; +} + +.camera-distance-block { + padding: 0.7rem 0.85rem 0.75rem; + border: 1px solid rgba(110, 123, 148, 0.22); + border-radius: 12px; + background: rgba(8, 11, 18, 0.5); +} + +.camera-distance-head { + display: flex; + align-items: center; + justify-content: space-between; + gap: 0.75rem; +} + +.camera-field-label { + color: var(--text-muted); + font-size: 0.71rem; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; +} + +.camera-distance-value { + min-width: 58px; + padding: 0.12rem 0.5rem; + border: 1px solid rgba(56, 189, 248, 0.32); + border-radius: 999px; + background: rgba(56, 189, 248, 0.1); + color: var(--accent-cyan); + font-size: 0.8rem; + font-weight: 800; + text-align: center; +} + +.camera-distance-range { + width: 100%; + height: 6px; + margin: 0.6rem 0 0.15rem; + accent-color: var(--accent-cyan); + cursor: pointer; +} + +.camera-distance-scale { + display: flex; + justify-content: space-between; + color: var(--text-muted); + font-size: 0.68rem; + font-weight: 600; +} + +.camera-distance-note { + margin: 0.4rem 0 0; + color: var(--text-muted); + font-size: 0.73rem; + line-height: 1.45; +} + +.camera-distance-block.is-inactive .camera-distance-head, +.camera-distance-block.is-inactive .camera-distance-range, +.camera-distance-block.is-inactive .camera-distance-scale { + opacity: 0.45; +} + +.camera-actions { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 0.75rem; +} + +.camera-save-state { + display: inline-flex; + min-width: 0; + align-items: center; + gap: 0.5rem; + color: var(--text-muted); + font-size: 0.78rem; + line-height: 1.45; +} + +.camera-state-dot { + flex: 0 0 8px; + width: 8px; + height: 8px; + border-radius: 50%; + background: #94a3b8; + box-shadow: 0 0 8px currentColor; +} + +.camera-save-state[data-state="saved"] .camera-state-dot { background: #34d399; } +.camera-save-state[data-state="unsaved"] .camera-state-dot { background: #fbbf24; } +.camera-save-state[data-state="error"] .camera-state-dot { background: #fb7185; } +.camera-save-state[data-state="offline"] .camera-state-dot { background: #94a3b8; } + +.camera-save-button { + min-height: 38px; + padding: 0.45rem 0.95rem; + font-size: 0.82rem; + white-space: nowrap; +} + +.camera-save-button:disabled { + opacity: 0.5; + cursor: not-allowed; +} + /* Aha's Help level picker */ .aha-help-card { position: relative; @@ -2723,6 +2974,26 @@ input:checked + .slider:before { padding: 0.05rem 0; } +.relic-slot-type-icon { + width: 14px; + height: 14px; + object-fit: contain; + vertical-align: middle; +} + +.relic-slot-empty-icon { + width: 38px; + height: 38px; + object-fit: contain; +} + +.game-inline-icon { + width: 20px; + height: 20px; + object-fit: contain; + vertical-align: middle; +} + .relic-slot-content { flex: 1; min-width: 0; diff --git a/index.html b/index.html index b270476..ed89dc4 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@
ใช้กับโหมด FaceCam เท่านั้น — ล้อเมาส์ในเกมปรับระยะชั่วคราวได้
+