Have frontend's printer state also track file path
Also display it on mouse over on the selected file's name.
This commit is contained in:
parent
d91c6256b4
commit
db2c3bf10b
2 changed files with 4 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ $(function() {
|
|||
});
|
||||
|
||||
self.filename = ko.observable(undefined);
|
||||
self.filepath = ko.observable(undefined);
|
||||
self.progress = ko.observable(undefined);
|
||||
self.filesize = ko.observable(undefined);
|
||||
self.filepos = ko.observable(undefined);
|
||||
|
|
@ -157,10 +158,12 @@ $(function() {
|
|||
self._processJobData = function(data) {
|
||||
if (data.file) {
|
||||
self.filename(data.file.name);
|
||||
self.filepath(data.file.path);
|
||||
self.filesize(data.file.size);
|
||||
self.sd(data.file.origin == "sdcard");
|
||||
} else {
|
||||
self.filename(undefined);
|
||||
self.filepath(undefined);
|
||||
self.filesize(undefined);
|
||||
self.sd(undefined);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{ _('Machine State') }}: <strong data-bind="text: stateString"></strong><br>
|
||||
{{ _('File') }}: <strong data-bind="text: filename"></strong> <strong data-bind="visible: sd">(SD)</strong><br>
|
||||
{{ _('File') }}: <strong data-bind="text: filename, attr: {title: filepath}"></strong> <strong data-bind="visible: sd">(SD)</strong><br>
|
||||
{{ _('Timelapse') }}: <strong data-bind="text: timelapseString"></strong><br>
|
||||
<!-- ko foreach: filament -->
|
||||
<span data-bind="text: 'Filament (' + name() + '): '"></span><strong data-bind="text: formatFilament(data())"></strong><br>
|
||||
|
|
|
|||
Loading…
Reference in a new issue