mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 14:25:51 +01:00
always use template strings instead of string concatenation
This commit is contained in:
@@ -88,7 +88,7 @@ export default class ImagePropertiesWidget extends NoteContextAwareWidget {
|
||||
formData.append('upload', fileToUpload);
|
||||
|
||||
const result = await $.ajax({
|
||||
url: baseApiUrl + 'images/' + this.noteId,
|
||||
url: `${baseApiUrl}images/${this.noteId}`,
|
||||
headers: await server.getHeaders(),
|
||||
data: formData,
|
||||
type: 'PUT',
|
||||
@@ -105,7 +105,7 @@ export default class ImagePropertiesWidget extends NoteContextAwareWidget {
|
||||
this.refresh();
|
||||
}
|
||||
else {
|
||||
toastService.showError("Upload of a new image revision failed: " + result.message);
|
||||
toastService.showError(`Upload of a new image revision failed: ${result.message}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -119,7 +119,7 @@ export default class ImagePropertiesWidget extends NoteContextAwareWidget {
|
||||
const noteComplement = await this.noteContext.getNoteComplement();
|
||||
|
||||
this.$fileName.text(attributeMap.originalFileName || "?");
|
||||
this.$fileSize.text(noteComplement.contentLength + " bytes");
|
||||
this.$fileSize.text(`${noteComplement.contentLength} bytes`);
|
||||
this.$fileType.text(note.mime);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user