cdnV2

git clone https://github.com/notamitgamer/cdnV2.git
· rebuilt hourlyOpen on GitHub
commit 6cb17afc711cbede5453e1f053df275c9946cd3b
parent db0113c7f95383d939a59321d0c15a75ba58f79b
Author: claude-cdn-bot <claude-bot@users.noreply.github.com>
Date:   Tue, 13 Oct 2026 02:24:57 +0000

fix(ui): sorting in folder-only listings and doubled focus indicator

- Folders have no size, so size sorting did nothing in a folder containing only sub-folders (and the dropdown
  showed a stale saved choice). Size options are now disabled there, the control shows 'Default order' without
  overwriting the saved preference, and it is hidden when there is nothing to reorder.
- Search/filter inputs drew an underline AND the generic 2px outline (a double blue line), and the generic
  :focus-visible rule forced border-radius: 4px on any focused control. Controls that draw their own focus
  indicator no longer get the outline; the radius override is gone.
- 8 new browser checks cover both.

Diffstat:
Mapp/static/app.css | 7+++++--
Mapp/static/app.js | 12++++++++++--
2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/app/static/app.css b/app/static/app.css @@ -195,7 +195,9 @@ pre { pre code { background: none; border: 0; padding: 0; font-size: inherit; } :focus { outline: none; } -:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; } +:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } +/* controls that draw their own focus indicator (ring or underline) must not also get the generic outline */ +.text-input:focus-visible, .select:focus-visible, .url-input:focus-visible, .filter-input:focus-visible, .search-input:focus-visible, .link-row__value:focus-visible { outline: none; } main:focus { outline: none; } img, svg, video { max-width: 100%; } @@ -594,7 +596,8 @@ body.turbo-loading .page { opacity: 0.55; pointer-events: none; transition: opac .list-group .filter-input, .list-group .search-input { border: 0; border-radius: 0; background: transparent; box-shadow: none; min-height: 3.1rem; } -.list-group .filter-input:focus, .list-group .search-input:focus { background: var(--surface); box-shadow: inset 0 -2px 0 var(--accent); } +.list-group .filter-input:focus, .list-group .search-input:focus { box-shadow: inset 0 -2px 0 var(--accent); } +.list-group .input-group:focus-within { background: var(--surface); } .list-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; diff --git a/app/static/app.js b/app/static/app.js @@ -318,10 +318,18 @@ const list = $('#file-list'); const select = $('#sort-select'); if (!list || !select) return; - const mode = store.get('cdn_sort_v1', 'default'); - select.value = $$('option', select).some((o) => o.value === mode) ? mode : 'default'; const rows = Array.from(list.children).filter((r) => r.classList.contains('list-item')); if (!rows.length) return; + // Folders have no size, so a folder with only sub-folders has nothing to size-sort. Disable those options + // there, show "Default order" instead of a stale saved choice (without overwriting it), and hide the control + // entirely when there is nothing to reorder. + const hasSizes = rows.some((r) => rowBytes(r) >= 0); + $$('option', select).forEach((o) => { if (o.value.indexOf('size') === 0) o.disabled = !hasSizes; }); + let mode = store.get('cdn_sort_v1', 'default'); + if (!hasSizes && mode.indexOf('size') === 0) mode = 'default'; + select.value = $$('option', select).some((o) => o.value === mode && !o.disabled) ? mode : 'default'; + const wrap = select.closest('.select-wrap'); + if (wrap) wrap.hidden = rows.filter((r) => r.getAttribute('data-name') !== '..').length < 2; rows.forEach((r, i) => { if (!r.dataset.i) r.dataset.i = String(i); }); const isUp = (r) => r.getAttribute('data-name') === '..'; const isDir = (r) => !!$('.folder-link', r) && !$('.size-label', r);