diff --git a/www/onvif.html b/www/onvif.html index a9c31cd..0c081cf 100644 --- a/www/onvif.html +++ b/www/onvif.html @@ -217,6 +217,41 @@ } .btn-outline:hover { border-color: var(--purple-primary); color: var(--purple-light); } + /* Checkbox */ + .checkbox-row { + margin-bottom: 1.5rem; + } + + .checkbox-label { + display: flex; align-items: center; gap: 0.625rem; + font-size: 0.875rem; color: var(--text-secondary); + cursor: pointer; user-select: none; + } + + .checkbox-label input { display: none; } + + .checkbox-custom { + width: 18px; height: 18px; flex-shrink: 0; + border: 2px solid var(--border-color); + border-radius: 4px; + background: var(--bg-secondary); + transition: all var(--transition-fast); + position: relative; + } + + .checkbox-label input:checked + .checkbox-custom { + background: var(--purple-primary); + border-color: var(--purple-primary); + } + + .checkbox-label input:checked + .checkbox-custom::after { + content: ''; + position: absolute; top: 2px; left: 5px; + width: 5px; height: 9px; + border: solid white; border-width: 0 2px 2px 0; + transform: rotate(45deg); + } + @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @@ -281,6 +316,14 @@ +
+ +
+ @@ -372,6 +415,12 @@ if (hostname) p.set('hostname', hostname); if (ports) p.set('ports', ports); + if (document.getElementById('cb-top1000').checked) { + p.set('ids', 'p:top-1000'); + p.set('user', user); + if (pass) p.set('pass', pass); + } + window.location.href = 'create.html?' + p.toString(); }); diff --git a/www/test.html b/www/test.html index 5d65c81..85ddc25 100644 --- a/www/test.html +++ b/www/test.html @@ -424,8 +424,10 @@ function classifyResult(r) { var scheme = r.source.split('://')[0] || ''; var isRecommended = scheme === 'rtsp' || scheme === 'rtsps' || scheme === 'onvif'; + var isJpegOnly = r.codecs && r.codecs.length > 0 && r.codecs.indexOf('H264') === -1 && r.codecs.indexOf('H265') === -1; var isHD = r.width >= 1280; + if (isJpegOnly) return 'alt'; if (isRecommended && isHD) return 'rec-main'; if (isRecommended) return 'rec-sub'; return 'alt';