BlueGit

timfa filemanager

oog

timfa Tim Falken · pushed by timfa

Authored 2026-05-15 · 6 months ago

Hash
6140ab82f1711e70bf0915d782f3da457c208e97
Parent
d06c67dc
4 files changed +14 −10
.github/technical-reference.md +2 −2
@@ -193,7 +193,7 @@
193 193 - loadMoveChildren(containerEl, dirPath) - Lazy-loads subfolders for a tree node via /api/files/list.
194 194 - isInlinePreviewableBlob(blob, name) - Determines if a blob can be previewed inline by MIME/extension.
195 195 - makeFileItem(item) - Builds a .file-item element; roots in Home now use folder-like interaction (single-click focus, double-click open), roots are non-draggable, and mobile long-press contextmenu suppression remains.
196 - makeFileItem(item) - Renders tile icons first, then applies any cached watched overlay state (`fully` filled eye, `partway` outlined eye).
196 - makeFileItem(item) - Renders tile icons first, then applies any cached watched overlay state (`fully` full-size filled eye, `partway` smaller darker filled eye).
197 197 - loadWatchedStatusesForCurrentDir() - Fetches watched states in one bulk POST /files/watched-statuses request per directory (with legacy /files/meta fallback), caches statuses per path, and updates tile overlays quickly.
198 198 - attachMobileLongPress(el, item) - Adds mobile long-press detection on file/folder tiles to open the item sidebar without desktop side effects.
199 199 - beginSidebarLoad() - Aborts in-flight sidebar requests and increments a load token so stale async responses cannot mutate the current sidebar state.
@@ -252,7 +252,7 @@
252 252 - video preview does not save caption style settings per user on close - Verifies caption style changes are not persisted to per-user video preferences.
253 253 - video preview releases the backend stream session when closed - Verifies closing a streamed video preview sends an explicit backend release call.
254 254 - rapid file reselection does not duplicate sidebar action buttons after delayed metadata - Verifies stale sidebar loads are ignored so action buttons are not duplicated.
255 - video tiles show centred watched overlays after watched metadata is loaded - Verifies overlays remain absent until watched metadata is fetched, then render as filled/outlined eye icons.
255 - video tiles show centred watched overlays after watched metadata is loaded - Verifies overlays remain absent until watched metadata is fetched, then render as solid eye icons for fully and partway statuses.
256 256
257 257 ## tests/video-stream.test.js
258 258 - createVideoStreamSession resolves once ffmpeg starts writing stream assets - Verifies session creation no longer waits for the final master playlist before preview can begin.
@@ -193,7 +193,7 @@
193- loadMoveChildren(containerEl, dirPath) - Lazy-loads subfolders for a tree node via /api/files/list.
193- loadMoveChildren(containerEl, dirPath) - Lazy-loads subfolders for a tree node via /api/files/list.
194- isInlinePreviewableBlob(blob, name) - Determines if a blob can be previewed inline by MIME/extension.
194- isInlinePreviewableBlob(blob, name) - Determines if a blob can be previewed inline by MIME/extension.
195- makeFileItem(item) - Builds a .file-item element; roots in Home now use folder-like interaction (single-click focus, double-click open), roots are non-draggable, and mobile long-press contextmenu suppression remains.
195- makeFileItem(item) - Builds a .file-item element; roots in Home now use folder-like interaction (single-click focus, double-click open), roots are non-draggable, and mobile long-press contextmenu suppression remains.
196- makeFileItem(item) - Renders tile icons first, then applies any cached watched overlay state (`fully` filled eye, `partway` outlined eye).
196- makeFileItem(item) - Renders tile icons first, then applies any cached watched overlay state (`fully` full-size filled eye, `partway` smaller darker filled eye).
197- loadWatchedStatusesForCurrentDir() - Fetches watched states in one bulk POST /files/watched-statuses request per directory (with legacy /files/meta fallback), caches statuses per path, and updates tile overlays quickly.
197- loadWatchedStatusesForCurrentDir() - Fetches watched states in one bulk POST /files/watched-statuses request per directory (with legacy /files/meta fallback), caches statuses per path, and updates tile overlays quickly.
198- attachMobileLongPress(el, item) - Adds mobile long-press detection on file/folder tiles to open the item sidebar without desktop side effects.
198- attachMobileLongPress(el, item) - Adds mobile long-press detection on file/folder tiles to open the item sidebar without desktop side effects.
199- beginSidebarLoad() - Aborts in-flight sidebar requests and increments a load token so stale async responses cannot mutate the current sidebar state.
199- beginSidebarLoad() - Aborts in-flight sidebar requests and increments a load token so stale async responses cannot mutate the current sidebar state.
@@ -252,7 +252,7 @@
252- video preview does not save caption style settings per user on close - Verifies caption style changes are not persisted to per-user video preferences.
252- video preview does not save caption style settings per user on close - Verifies caption style changes are not persisted to per-user video preferences.
253- video preview releases the backend stream session when closed - Verifies closing a streamed video preview sends an explicit backend release call.
253- video preview releases the backend stream session when closed - Verifies closing a streamed video preview sends an explicit backend release call.
254- rapid file reselection does not duplicate sidebar action buttons after delayed metadata - Verifies stale sidebar loads are ignored so action buttons are not duplicated.
254- rapid file reselection does not duplicate sidebar action buttons after delayed metadata - Verifies stale sidebar loads are ignored so action buttons are not duplicated.
255- video tiles show centred watched overlays after watched metadata is loaded - Verifies overlays remain absent until watched metadata is fetched, then render as filled/outlined eye icons.
255- video tiles show centred watched overlays after watched metadata is loaded - Verifies overlays remain absent until watched metadata is fetched, then render as solid eye icons for fully and partway statuses.
256
256
257## tests/video-stream.test.js
257## tests/video-stream.test.js
258- createVideoStreamSession resolves once ffmpeg starts writing stream assets - Verifies session creation no longer waits for the final master playlist before preview can begin.
258- createVideoStreamSession resolves once ffmpeg starts writing stream assets - Verifies session creation no longer waits for the final master playlist before preview can begin.
public/app.js +1 −6
@@ -4212,7 +4212,7 @@ function renderWatchedOverlayOnIcon (iconEl, watchStatus)
4212 4212
4213 4213 const overlay = document.createElement('div');
4214 4214 overlay.className = `watched-overlay watched-overlay--${watchStatus}`;
4215 overlay.innerHTML = watchStatus === 'fully' ? watchedEyeFilledSvg() : watchedEyeOutlineSvg();
4215 overlay.innerHTML = watchedEyeFilledSvg();
4216 4216 iconEl.appendChild(overlay);
4217 4217 }
4218 4218
@@ -4301,11 +4301,6 @@ function watchedEyeFilledSvg ()
4301 4301 return `<svg class="watched-overlay-svg" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path fill="#ffffff" d="M651.669528 512c0-14.5903-2.084475-28.290323-6.251378-41.395806-11.019984 24.423249-35.143405 41.395806-63.733557 41.395806l-7.440459-0.593518-5.957689 0.593518c-30.973432 0-56.285934-25.607214-56.285934-56.882522l0.297782-5.952572-0.297782-7.447623c0-28.290323 16.97665-52.709479 41.097-63.727417-13.104459-4.172019-26.802436-6.252401-41.097-6.252401-77.132728 0-139.67311 62.834071-139.67311 140.263557 0 77.428464 62.540382 139.971915 139.67311 139.971915S651.669528 589.428464 651.669528 512L651.669528 512zM958.70846 512c0 0-153.36904-297.80564-448.198905-297.80564-293.63669 0-445.219037 297.80564-445.219037 297.80564s164.385954 297.804616 447.306582 297.804616C805.038568 809.80564 958.70846 512 958.70846 512L958.70846 512zM304.725748 512c0-114.954125 92.619444-208.164017 207.27374-208.164017 114.657366 0 207.27067 93.209892 207.27067 208.164017 0 114.953102-92.613304 208.167087-207.27067 208.167087C397.345192 720.167087 304.725748 626.953102 304.725748 512L304.725748 512zM304.725748 512"/></svg>`;
4302 4302 }
4303 4303
4304 function watchedEyeOutlineSvg ()
4305 {
4306 return `<svg class="watched-overlay-svg" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path fill="none" stroke="#ffffff" stroke-width="17.8" stroke-dasharray="none" d="M651.669528 512c0-14.5903-2.084475-28.290323-6.251378-41.395806-11.019984 24.423249-35.143405 41.395806-63.733557 41.395806l-7.440459-0.593518-5.957689 0.593518c-30.973432 0-56.285934-25.607214-56.285934-56.882522l0.297782-5.952572-0.297782-7.447623c0-28.290323 16.97665-52.709479 41.097-63.727417-13.104459-4.172019-26.802436-6.252401-41.097-6.252401-77.132728 0-139.67311 62.834071-139.67311 140.263557 0 77.428464 62.540382 139.971915 139.67311 139.971915S651.669528 589.428464 651.669528 512L651.669528 512zM958.70846 512c0 0-153.36904-297.80564-448.198905-297.80564-293.63669 0-445.219037 297.80564-445.219037 297.80564s164.385954 297.804616 447.306582 297.804616C805.038568 809.80564 958.70846 512 958.70846 512L958.70846 512zM304.725748 512c0-114.954125 92.619444-208.164017 207.27374-208.164017 114.657366 0 207.27067 93.209892 207.27067 208.164017 0 114.953102-92.613304 208.167087-207.27067 208.167087C397.345192 720.167087 304.725748 626.953102 304.725748 512L304.725748 512"/></svg>`;
4307 }
4308
4309 4304 // ───────────────────────────────────────────────────────────────────────────
4310 4305 // EVENT WIRING
4311 4306 // ───────────────────────────────────────────────────────────────────────────
@@ -4212,7 +4212,7 @@ function renderWatchedOverlayOnIcon (iconEl, watchStatus)
4212
4212
4213 const overlay = document.createElement('div');
4213 const overlay = document.createElement('div');
4214 overlay.className = `watched-overlay watched-overlay--${watchStatus}`;
4214 overlay.className = `watched-overlay watched-overlay--${watchStatus}`;
4215 overlay.innerHTML = watchStatus === 'fully' ? watchedEyeFilledSvg() : watchedEyeOutlineSvg();
4215 overlay.innerHTML = watchedEyeFilledSvg();
4216 iconEl.appendChild(overlay);
4216 iconEl.appendChild(overlay);
4217}
4217}
4218
4218
@@ -4301,11 +4301,6 @@ function watchedEyeFilledSvg ()
4301 return `<svg class="watched-overlay-svg" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path fill="#ffffff" d="M651.669528 512c0-14.5903-2.084475-28.290323-6.251378-41.395806-11.019984 24.423249-35.143405 41.395806-63.733557 41.395806l-7.440459-0.593518-5.957689 0.593518c-30.973432 0-56.285934-25.607214-56.285934-56.882522l0.297782-5.952572-0.297782-7.447623c0-28.290323 16.97665-52.709479 41.097-63.727417-13.104459-4.172019-26.802436-6.252401-41.097-6.252401-77.132728 0-139.67311 62.834071-139.67311 140.263557 0 77.428464 62.540382 139.971915 139.67311 139.971915S651.669528 589.428464 651.669528 512L651.669528 512zM958.70846 512c0 0-153.36904-297.80564-448.198905-297.80564-293.63669 0-445.219037 297.80564-445.219037 297.80564s164.385954 297.804616 447.306582 297.804616C805.038568 809.80564 958.70846 512 958.70846 512L958.70846 512zM304.725748 512c0-114.954125 92.619444-208.164017 207.27374-208.164017 114.657366 0 207.27067 93.209892 207.27067 208.164017 0 114.953102-92.613304 208.167087-207.27067 208.167087C397.345192 720.167087 304.725748 626.953102 304.725748 512L304.725748 512zM304.725748 512"/></svg>`;
4301 return `<svg class="watched-overlay-svg" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path fill="#ffffff" d="M651.669528 512c0-14.5903-2.084475-28.290323-6.251378-41.395806-11.019984 24.423249-35.143405 41.395806-63.733557 41.395806l-7.440459-0.593518-5.957689 0.593518c-30.973432 0-56.285934-25.607214-56.285934-56.882522l0.297782-5.952572-0.297782-7.447623c0-28.290323 16.97665-52.709479 41.097-63.727417-13.104459-4.172019-26.802436-6.252401-41.097-6.252401-77.132728 0-139.67311 62.834071-139.67311 140.263557 0 77.428464 62.540382 139.971915 139.67311 139.971915S651.669528 589.428464 651.669528 512L651.669528 512zM958.70846 512c0 0-153.36904-297.80564-448.198905-297.80564-293.63669 0-445.219037 297.80564-445.219037 297.80564s164.385954 297.804616 447.306582 297.804616C805.038568 809.80564 958.70846 512 958.70846 512L958.70846 512zM304.725748 512c0-114.954125 92.619444-208.164017 207.27374-208.164017 114.657366 0 207.27067 93.209892 207.27067 208.164017 0 114.953102-92.613304 208.167087-207.27067 208.167087C397.345192 720.167087 304.725748 626.953102 304.725748 512L304.725748 512zM304.725748 512"/></svg>`;
4302}
4302}
4303
4303
4304function watchedEyeOutlineSvg ()
4305{
4306 return `<svg class="watched-overlay-svg" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path fill="none" stroke="#ffffff" stroke-width="17.8" stroke-dasharray="none" d="M651.669528 512c0-14.5903-2.084475-28.290323-6.251378-41.395806-11.019984 24.423249-35.143405 41.395806-63.733557 41.395806l-7.440459-0.593518-5.957689 0.593518c-30.973432 0-56.285934-25.607214-56.285934-56.882522l0.297782-5.952572-0.297782-7.447623c0-28.290323 16.97665-52.709479 41.097-63.727417-13.104459-4.172019-26.802436-6.252401-41.097-6.252401-77.132728 0-139.67311 62.834071-139.67311 140.263557 0 77.428464 62.540382 139.971915 139.67311 139.971915S651.669528 589.428464 651.669528 512L651.669528 512zM958.70846 512c0 0-153.36904-297.80564-448.198905-297.80564-293.63669 0-445.219037 297.80564-445.219037 297.80564s164.385954 297.804616 447.306582 297.804616C805.038568 809.80564 958.70846 512 958.70846 512L958.70846 512zM304.725748 512c0-114.954125 92.619444-208.164017 207.27374-208.164017 114.657366 0 207.27067 93.209892 207.27067 208.164017 0 114.953102-92.613304 208.167087-207.27067 208.167087C397.345192 720.167087 304.725748 626.953102 304.725748 512L304.725748 512"/></svg>`;
4307}
4308
4309// ───────────────────────────────────────────────────────────────────────────
4304// ───────────────────────────────────────────────────────────────────────────
4310// EVENT WIRING
4305// EVENT WIRING
4311// ───────────────────────────────────────────────────────────────────────────
4306// ───────────────────────────────────────────────────────────────────────────
public/style.css +9 −0
@@ -356,6 +356,15 @@ button.danger:hover {
356 356 background: rgba(15, 17, 23, 0.45);
357 357 }
358 358
359 .file-item .icon .watched-overlay--partway {
360 width: 16.8px;
361 height: 16.8px;
362 }
363
364 .file-item .icon .watched-overlay--partway path {
365 fill: #8f98a5;
366 }
367
359 368 .file-item .icon .watched-overlay-svg {
360 369 width: 100%;
361 370 height: 100%;
@@ -356,6 +356,15 @@ button.danger:hover {
356 background: rgba(15, 17, 23, 0.45);
356 background: rgba(15, 17, 23, 0.45);
357}
357}
358
358
359.file-item .icon .watched-overlay--partway {
360 width: 16.8px;
361 height: 16.8px;
362}
363
364.file-item .icon .watched-overlay--partway path {
365 fill: #8f98a5;
366}
367
359.file-item .icon .watched-overlay-svg {
368.file-item .icon .watched-overlay-svg {
360 width: 100%;
369 width: 100%;
361 height: 100%;
370 height: 100%;
tests/page.load.test.js +2 −2
@@ -798,8 +798,8 @@ describe('page load smoke test', () =>
798 798 expect(fullOverlayPath.getAttribute('fill')).toBe('#ffffff');
799 799
800 800 expect(partOverlayPath).toBeTruthy();
801 expect(partOverlayPath.getAttribute('fill')).toBe('none');
802 expect(partOverlayPath.getAttribute('stroke')).toBe('#ffffff');
801 expect(partOverlayPath.getAttribute('fill')).toBe('#ffffff');
802 expect(partOverlayPath.getAttribute('stroke')).toBeNull();
803 803
804 804 dom.window.close();
805 805 });
@@ -798,8 +798,8 @@ describe('page load smoke test', () =>
798 expect(fullOverlayPath.getAttribute('fill')).toBe('#ffffff');
798 expect(fullOverlayPath.getAttribute('fill')).toBe('#ffffff');
799
799
800 expect(partOverlayPath).toBeTruthy();
800 expect(partOverlayPath).toBeTruthy();
801 expect(partOverlayPath.getAttribute('fill')).toBe('none');
801 expect(partOverlayPath.getAttribute('fill')).toBe('#ffffff');
802 expect(partOverlayPath.getAttribute('stroke')).toBe('#ffffff');
802 expect(partOverlayPath.getAttribute('stroke')).toBeNull();
803
803
804 dom.window.close();
804 dom.window.close();
805 });
805 });