mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 06:45:49 +01:00
small refactorings and fixes
This commit is contained in:
@@ -111,15 +111,12 @@ export default class ImagePropertiesWidget extends NoteContextAwareWidget {
|
||||
}
|
||||
|
||||
async refreshWithNote(note) {
|
||||
const attributes = note.getAttributes();
|
||||
const attributeMap = utils.toObject(attributes, l => [l.name, l.value]);
|
||||
|
||||
this.$widget.show();
|
||||
|
||||
const blob = await this.note.getBlob();
|
||||
|
||||
this.$fileName.text(attributeMap.originalFileName || "?");
|
||||
this.$fileSize.text(`${blob.contentLength} bytes`);
|
||||
this.$fileName.text(note.getLabelValue('originalFileName') || "?");
|
||||
this.$fileSize.text(utils.formatSize(blob.contentLength));
|
||||
this.$fileType.text(note.mime);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user