Skip to content

Commit

Permalink
fix: reprint button now works
Browse files Browse the repository at this point in the history
  • Loading branch information
cadriel committed Oct 26, 2020
1 parent d4483c9 commit 0667cd7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/cards/StatusCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
</v-btn>

<v-btn
@click="rePrint()"
v-if="!printerPrinting && !printerPaused && filename"
color="secondary"
class="ml-0 ml-md-2 mr-2 mr-md-0 my-1">
Expand Down Expand Up @@ -111,7 +112,7 @@ export default class StatusCard extends Mixins(UtilsMixin) {
}
get filename () {
return this.$store.state.socket.printer.print_stats.filename
return this.$store.state.socket.printer.current_file.filename || ''
}
cancelPrint (val: boolean) {
Expand All @@ -127,5 +128,11 @@ export default class StatusCard extends Mixins(UtilsMixin) {
resumePrint () {
SocketActions.printerPrintResume()
}
rePrint () {
if (this.filename && this.filename.length > 0) {
SocketActions.printerPrintStart(this.filename)
}
}
}
</script>

0 comments on commit 0667cd7

Please sign in to comment.