feat: add desktop/mobile device toggle (User-Agent)
- Segmented Desktop / Mobile button in the form - Desktop: Chrome 124 on Windows - Mobile: iPhone Safari 17 (iOS 17.4) - User-Agent injected into k6 script headers - Stored in DB with migration for existing data - History items show device pill alongside cache/gzip Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -152,6 +152,30 @@ textarea { font-family: var(--mono); resize: vertical; }
|
||||
.pill.bust { background: rgba(239,68,68,.12); color: #f87171; }
|
||||
.pill.gzip { background: rgba(124,58,237,.15); color: var(--accent2); }
|
||||
.pill.no-gzip { background: rgba(100,116,139,.12); color: var(--muted); }
|
||||
.pill.desktop { background: rgba(56,189,248,.12); color: #38bdf8; }
|
||||
.pill.mobile { background: rgba(251,146,60,.12); color: #fb923c; }
|
||||
|
||||
/* DEVICE TOGGLE */
|
||||
.device-toggle { display: flex; gap: 0; margin-top: .15rem; }
|
||||
.device-toggle input[type=radio] { display: none; }
|
||||
.device-btn {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: .45rem .75rem;
|
||||
font-size: .85rem;
|
||||
border: 1px solid var(--border);
|
||||
cursor: pointer;
|
||||
transition: background .15s, color .15s;
|
||||
color: var(--muted);
|
||||
background: transparent;
|
||||
}
|
||||
.device-btn:first-of-type { border-radius: 6px 0 0 6px; }
|
||||
.device-btn:last-of-type { border-radius: 0 6px 6px 0; border-left: none; }
|
||||
.device-toggle input[type=radio]:checked + .device-btn {
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.btn-secondary:hover { background: rgba(124,58,237,.15); }
|
||||
|
||||
/* RESULT */
|
||||
|
||||
Reference in New Issue
Block a user