mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 02:05:53 +01:00
fix(react/collections/geomap): "note not found" when deleting GPX
This commit is contained in:
@@ -12,7 +12,7 @@ import FNote from "../../entities/fnote";
|
||||
export default function FilePropertiesTab({ note }: { note?: FNote | null }) {
|
||||
const [ originalFileName ] = useNoteLabel(note, "originalFileName");
|
||||
const canAccessProtectedNote = !note?.isProtected || protected_session_holder.isProtectedSessionAvailable();
|
||||
const [ blob ] = useNoteBlob(note);
|
||||
const blob = useNoteBlob(note);
|
||||
|
||||
return (
|
||||
<div className="file-properties-widget">
|
||||
@@ -52,7 +52,7 @@ export default function FilePropertiesTab({ note }: { note?: FNote | null }) {
|
||||
<FormFileUploadButton
|
||||
icon="bx bx-folder-open"
|
||||
text={t("file_properties.upload_new_revision")}
|
||||
disabled={!canAccessProtectedNote}
|
||||
disabled={!canAccessProtectedNote}
|
||||
onChange={(fileToUpload) => {
|
||||
if (!fileToUpload) {
|
||||
return;
|
||||
@@ -74,4 +74,4 @@ export default function FilePropertiesTab({ note }: { note?: FNote | null }) {
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import toast from "../../services/toast";
|
||||
|
||||
export default function ImagePropertiesTab({ note, ntxId }: TabContext) {
|
||||
const [ originalFileName ] = useNoteLabel(note, "originalFileName");
|
||||
const [ blob ] = useNoteBlob(note);
|
||||
const blob = useNoteBlob(note);
|
||||
|
||||
const parentComponent = useContext(ParentComponent);
|
||||
|
||||
@@ -25,12 +25,12 @@ export default function ImagePropertiesTab({ note, ntxId }: TabContext) {
|
||||
<strong>{t("image_properties.original_file_name")}:</strong>{" "}
|
||||
<span>{originalFileName ?? "?"}</span>
|
||||
</span>
|
||||
|
||||
|
||||
<span>
|
||||
<strong>{t("image_properties.file_type")}:</strong>{" "}
|
||||
<span>{note.mime}</span>
|
||||
</span>
|
||||
|
||||
|
||||
<span>
|
||||
<strong>{t("image_properties.file_size")}:</strong>{" "}
|
||||
<span>{formatSize(blob?.contentLength)}</span>
|
||||
@@ -48,7 +48,7 @@ export default function ImagePropertiesTab({ note, ntxId }: TabContext) {
|
||||
<Button
|
||||
text={t("image_properties.open")}
|
||||
icon="bx bx-link-external"
|
||||
onClick={() => openNoteExternally(note.noteId, note.mime)}
|
||||
onClick={() => openNoteExternally(note.noteId, note.mime)}
|
||||
/>
|
||||
|
||||
<Button
|
||||
@@ -79,4 +79,4 @@ export default function ImagePropertiesTab({ note, ntxId }: TabContext) {
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user