test
This commit is contained in:
@@ -11,6 +11,7 @@ export function createFilePreviewModal({
|
||||
clientId,
|
||||
notifyToast,
|
||||
onDownload,
|
||||
beforeFileRead,
|
||||
}) {
|
||||
const filePreviewModal = document.getElementById("file-preview-modal");
|
||||
const previewFileNameEl = document.getElementById("preview-file-name");
|
||||
@@ -43,6 +44,10 @@ export function createFilePreviewModal({
|
||||
return;
|
||||
}
|
||||
|
||||
if (beforeFileRead && !(await beforeFileRead(path, "preview file"))) {
|
||||
return;
|
||||
}
|
||||
|
||||
currentPreviewPath = path;
|
||||
if (previewFileNameEl) previewFileNameEl.textContent = fileName;
|
||||
if (previewContent) previewContent.innerHTML = '<i class="fa-solid fa-circle-notch fa-spin text-slate-400 text-2xl"></i>';
|
||||
|
||||
Reference in New Issue
Block a user