fix: switch back to files, after clear printjob from status panel (#816)

This commit is contained in:
Stefan Dej 2022-05-20 21:56:43 +02:00 committed by GitHub
parent fccd8321bb
commit bc841609ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions

View File

@ -57,7 +57,7 @@
</template>
</td>
<td class="pr-2">
<template v-if="item.isFirst">
<template v-if="item.isFirst && !printerIsPrinting">
<v-btn icon color="success" class="float-right minwidth-0 mt-1" @click="startJobqueue">
<v-icon>{{ mdiPlay }}</v-icon>
</v-btn>

View File

@ -122,13 +122,13 @@ export default class StatusPanel extends Mixins(BaseMixin) {
mdiCloseCircle = mdiCloseCircle
private boolShowObjects = false
private boolFirstLoad = true
declare $refs: {
bigThumbnail: any
}
private activeTab = 'files'
private lastFilename = ''
get jobs() {
return this.$store.getters['server/jobQueue/getJobs']
@ -241,11 +241,10 @@ export default class StatusPanel extends Mixins(BaseMixin) {
@Watch('current_filename')
current_filenameChanged(newVal: string) {
if (this.current_filename === '' && newVal !== '') this.activeTab = 'status'
if (this.boolFirstLoad && newVal !== '') {
this.boolFirstLoad = false
this.activeTab = 'status'
}
if (newVal === '') this.activeTab = 'files'
else if (this.lastFilename !== newVal) this.activeTab = 'status'
this.lastFilename = newVal
}
clearDisplayMessage() {