Skip to content

Commit

Permalink
fix: cancel button during pause
Browse files Browse the repository at this point in the history
fix: print time durations
  • Loading branch information
cadriel committed Oct 1, 2020
1 parent 6df061d commit 6647b25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions src/components/widgets/PrintStatusWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
@click="cancelPrint()"
:loading="hasWait(waits.onPrintCancel)"
:width="buttonWidths"
v-if="printerPrinting"
v-if="printerPrinting || printerPaused"
color="secondary"
class="mb-2">
<v-icon small>mdi-window-close</v-icon>
Expand Down Expand Up @@ -156,14 +156,6 @@ export default class PrintStatusWidget extends Mixins(UtilsMixin) {
}
}
// get usedFilament () {
// return this.$store.state.socket.printer.print_stats.filament_used
// }
// get estimatedTotalFilament () {
// return this.$store.state.socket.printer.current_file.filament_total
// }
cancelPrint () {
SocketActions.printerPrintCancel()
}
Expand Down
4 changes: 2 additions & 2 deletions src/store/socket/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ export const getters: GetterTree<SocketState, RootState> = {
break
}
case 'filament': {
totalDuration = duration / (usedFilament / estimatedFilament) - duration
totalDuration = duration / (usedFilament / estimatedFilament)
timeLeft = totalDuration - duration
break
}
case 'file': {
totalDuration = duration / (progress) - duration
totalDuration = duration / (progress)
timeLeft = totalDuration - duration
break
}
Expand Down

0 comments on commit 6647b25

Please sign in to comment.