bugfix: fix gcode thumbnail on dashboard
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
parent
d3c3113c43
commit
ac01dce620
@ -27,7 +27,9 @@
|
||||
<v-row>
|
||||
<v-col
|
||||
class="col-12 pv-0 col-sm-4 pr-sm-0"
|
||||
v-if="current_file_metadata &&
|
||||
v-if="
|
||||
['printing', 'paused', 'complete'].includes(printer_state) &&
|
||||
current_file_metadata &&
|
||||
current_file_metadata.thumbnails &&
|
||||
current_file_metadata.thumbnails.length &&
|
||||
current_file_metadata.thumbnails.find(element => element.width === 400)
|
||||
@ -39,7 +41,8 @@
|
||||
</v-col>
|
||||
<v-col
|
||||
:class="
|
||||
(current_file_metadata &&
|
||||
(['printing', 'paused', 'complete'].includes(printer_state) &&
|
||||
current_file_metadata &&
|
||||
current_file_metadata.thumbnails &&
|
||||
current_file_metadata.thumbnails.length &&
|
||||
current_file_metadata.thumbnails.find(element => element.width === 400)) ? 'col-12 pv-0 col-sm-8 pl-sm-0' : 'col-12 pv-0'
|
||||
|
@ -415,6 +415,7 @@ export default {
|
||||
|
||||
setMetadataCurrentFile(state, data) {
|
||||
if (data !== undefined && data.filename !== "") {
|
||||
state.printer.current_file.thumbnails = [];
|
||||
Vue.set(state.printer, 'current_file', data);
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user