Streamline calibration modal: inline controls, dynamic aspect ratio, offset fix
Some checks failed
Validate / validate (push) Failing after 8s

- Move total LEDs counter, direction toggle, and offset input into the
  screen area of the calibration preview
- Remove description paragraph, standalone offset form, and total LEDs banner
- Add mismatch warning (yellow + ⚠) when configured LEDs ≠ device count
- Use actual display aspect ratio for calibration preview
- Fix offset not updating tick labels (buildSegments now starts at offset)
- Remove max-width constraint on preview, add padding for breathing room
- Clean up unused i18n keys from both locale files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-08 04:43:56 +03:00
parent cf770440c0
commit c34f10f7de
5 changed files with 95 additions and 44 deletions

View File

@@ -827,8 +827,7 @@ input:-webkit-autofill:focus {
.calibration-preview {
position: relative;
width: 100%;
max-width: 500px;
aspect-ratio: 16 / 10;
aspect-ratio: 16 / 9;
margin: 20px auto;
background: var(--card-bg);
border: 2px solid var(--border-color);
@@ -863,6 +862,54 @@ input:-webkit-autofill:focus {
font-size: 14px;
}
.preview-screen-total {
font-size: 16px;
font-weight: 600;
opacity: 0.9;
transition: color 0.2s;
}
.preview-screen-total.mismatch {
color: #FFC107;
}
.preview-screen-controls {
display: flex;
align-items: center;
gap: 6px;
}
.offset-control {
display: flex;
align-items: center;
gap: 3px;
padding: 4px 8px;
background: rgba(255, 255, 255, 0.15);
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 12px;
font-size: 12px;
cursor: pointer;
user-select: none;
}
.offset-control input {
width: 36px;
padding: 0;
background: transparent;
border: none;
color: white;
font-size: 12px;
text-align: center;
outline: none;
-moz-appearance: textfield;
}
.offset-control input::-webkit-outer-spin-button,
.offset-control input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
.preview-edge {
position: absolute;
display: flex;