screentinker/frontend/js/views
screentinker 792b105035
feat(content): server-side search, type filter, and sort (#221)
Content discovery was client-side only, scoped to the items already rendered
on the current page — searching "logo" on page 1 couldn't find logos on page
2 or in another folder.

Server (GET /api/content):
- ?q= text search on filename (LIKE, workspace-wide — a search ignores the
  open folder so nothing is missed). LIKE metacharacters are escaped so a
  filename with % or _ matches literally.
- ?type=video|image|youtube|web — youtube (video/youtube) and web (other
  remote_url) are split from plain uploaded video/image so the four UI buckets
  map cleanly.
- ?sort=date_desc|date_asc|name|size — whitelisted (never interpolates user
  input into ORDER BY); default keeps the legacy newest-first ordering.

Frontend (content-library):
- Type filter + sort dropdowns; search debounced (300ms) and now hits the
  server instead of filtering the DOM.
- Result count shown while a search/type filter is active.
- en/es i18n.

api.getContent gains an opts arg ({q,type,sort}); folder_id is omitted while
searching to match the server's workspace-wide behaviour.

Test: content-search-filter-sort.test.js mounts the real router and covers
substring match, LIKE-escape (literal %), the type buckets, name/size sort,
the ORDER BY injection guard, and combined filters. Suite 541/541.

Closes #214

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-23 11:38:22 -05:00
..
activity.js i18n batch 6: wire teams + activity + help (~62 keys) 2026-04-29 20:16:21 -05:00
admin-player-debug.js Add player debug overlay and server-side error telemetry sink 2026-05-15 15:20:42 -05:00
admin.js feat(dashboard): version indicator + GHCR update check (#165) 2026-07-10 22:40:06 -05:00
billing.js i18n batch 5: wire layout-editor + video-wall + billing (~85 keys) 2026-04-29 20:13:38 -05:00
content-library.js feat(content): server-side search, type filter, and sort (#221) 2026-07-23 11:38:22 -05:00
dashboard.js feat(ui): show server URL in Add Display modal + GitHub Releases link on /download/apk (#210) 2026-07-23 10:25:00 -05:00
designer.js feat(designer): edit designer-made widgets in the designer (+ legacy reconstruction) (#207) 2026-07-21 09:00:36 -05:00
device-detail.js feat(directory-board): panel-ring scroll + in-place refresh + per-device frame diagnostic (#203) 2026-07-17 20:17:21 -05:00
force-password-change.js feat(admin): admin-provisioned user creation + first-login gate (#10) 2026-06-05 11:03:56 -05:00
help.js docs(help): add AI Content Design quick-start to the in-app Help page (#41) 2026-06-09 13:58:53 -05:00
kiosk.js fix(security): patch quick-win findings from the codebase review 2026-06-08 19:02:19 -05:00
layout-editor.js fix(layouts): atomic zone save (stop template zone duplication) 2026-06-09 10:16:01 -05:00
login.js feat(auth,tizen): TOTP 2FA UI, email verification on signup, Tizen SSSP install 2026-07-22 21:08:50 -05:00
no-workspace.js feat(signup): optional org-on-create for self-service signups (#12) 2026-06-05 11:16:27 -05:00
onboarding.js i18n batch 3b: wire onboarding.js + admin.js (~84 keys) 2026-04-29 20:04:23 -05:00
playlists.js fix(dashboard): make auth-image hydration lazy by default (#182 follow-up) (#185) 2026-07-14 13:28:12 -05:00
reports.js i18n batch 4: wire schedule + reports + kiosk (~95 keys) 2026-04-29 20:09:32 -05:00
schedule.js fix(schedule): add delete button to schedule edit modal so schedules can be removed from the UI (DELETE /api/schedules/:id already existed) 2026-05-11 23:05:03 -05:00
settings.js feat(auth,tizen): TOTP 2FA UI, email verification on signup, Tizen SSSP install 2026-07-22 21:08:50 -05:00
teams.js fix(security): patch quick-win findings from the codebase review 2026-06-08 19:02:19 -05:00
video-wall.js feat(device-owner): tier foundation + QR provisioning + content-expiry & device enhancements (#168) 2026-07-12 19:41:07 -05:00
widgets.js feat(designer): edit designer-made widgets in the designer (+ legacy reconstruction) (#207) 2026-07-21 09:00:36 -05:00
workspace-members.js feat(admin): admin-provisioned user creation + first-login gate (#10) 2026-06-05 11:03:56 -05:00