Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: fix issue with previewing meta revision files

Ilian Sapundshieva50d5ab65a38
diff --git a/src/renderer/components/FileView.tsx b/src/renderer/components/FileView.tsx
index 8ce357650..2471d8688 100644
--- a/src/renderer/components/FileView.tsx
+++ b/src/renderer/components/FileView.tsx
@@ -243,22 +243,20 @@ function FileView(props: Props) {
<span>ESC</span>
</Box>
)}
- {openedEntry.isFile && (
- <iframe
- ref={fileViewer}
- style={{
- width: '100%',
- height: '100%',
- zIndex: 3,
- border: 0,
- }}
- allow="clipboard-write *"
- src={fileOpenerURL}
- allowFullScreen
- sandbox="allow-same-origin allow-scripts allow-modals allow-downloads"
- id={'FileViewer' + eventID.current}
- />
- )}
+ <iframe
+ ref={fileViewer}
+ style={{
+ width: '100%',
+ height: '100%',
+ zIndex: 3,
+ border: 0,
+ }}
+ allow="clipboard-write *"
+ src={fileOpenerURL}
+ allowFullScreen
+ sandbox="allow-same-origin allow-scripts allow-modals allow-downloads"
+ id={'FileViewer' + eventID.current}
+ />
</Box>
);
}
diff --git a/src/renderer/components/dialogs/FilePreviewDialog.tsx b/src/renderer/components/dialogs/FilePreviewDialog.tsx
index 348506d8f..536598377 100644
--- a/src/renderer/components/dialogs/FilePreviewDialog.tsx
+++ b/src/renderer/components/dialogs/FilePreviewDialog.tsx
@@ -65,24 +65,17 @@ function FilePreviewDialog(props: Props) {
}
: undefined;
+ // Choosing the current json viewer as viewer of the meta revision file
if (fsEntry?.name?.endsWith(AppConfig.sidecarRevisionExtension)) {
const fileType: TS.FileTypes = supportedFileTypes.find(
(fileType) => fileType.viewer && fileType.type.toLowerCase() === 'json',
);
if (fileType) {
- openedEntry.isFile = true;
openedEntry.viewingExtensionId = fileType.viewer;
openedEntry.viewingExtensionPath = findExtensionPathForId(
fileType.viewer,
fileType.extensionExternalPath,
);
- // if (fileType.editor && fileType.editor.length > 0) {
- // openedEntry.editingExtensionId = fileType.editor;
- // openedEntry.editingExtensionPath = findExtensionPathForId(
- // fileType.editor,
- // fileType.extensionExternalPath,
- // );
- // }
}
}