File details can now be hidden

This commit is contained in:
n1474335 2022-12-09 19:24:43 +00:00
parent a116a2a423
commit c1d2970f1e
3 changed files with 68 additions and 2 deletions

View file

@ -548,7 +548,9 @@ class InputWaiter {
progress: inputData.progress,
status: inputData.status,
buffer: inputData.buffer,
renderPreview: this.app.options.imagePreview
renderPreview: this.app.options.imagePreview,
toggleHandler: this.toggleFileDetails.bind(this),
hidden: false
};
this.inputEditorView.dispatch({
effects: this.inputEditorConf.fileDetailsPanel.reconfigure(
@ -572,6 +574,20 @@ class InputWaiter {
});
}
/**
* Handler for file details toggle clicks
* @param {event} e
*/
toggleFileDetails(e) {
$("[data-toggle='tooltip']").tooltip("hide");
this.fileDetails.hidden = !this.fileDetails.hidden;
this.inputEditorView.dispatch({
effects: this.inputEditorConf.fileDetailsPanel.reconfigure(
fileDetailsPanel(this.fileDetails)
)
});
}
/**
* Update file details when a file completes loading
*