fix(thumbnails): display thumbnails in file grid/list and fix WOPI intercepting all file opens

wopiEditor.canEdit() is async but was called without await, so the
returned Promise was always truthy — routing every file click to the
WOPI editor (which 404'd). Made openFile() async and added await in
both ui.js and inlineViewer.js.

Added <img> thumbnail elements to _createFileCard() and
_createFileItem() for image files, loading from
/api/files/{id}/thumbnail/icon with lazy loading and error fallback.
This commit is contained in:
Jared Wolff
2026-03-04 21:44:02 -05:00
parent 6db4e07538
commit 2a75e83752
4 changed files with 20 additions and 4 deletions
+11
View File
@@ -322,6 +322,17 @@ button.favorite-star {
overflow: hidden;
}
/* Thumbnail image inside file-icon (grid and list views) */
.file-icon .file-thumb {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 1;
}
.file-icon.image-icon::before {
content: "";
position: absolute;