aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/services/OctoPrint.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/services/OctoPrint.vue')
-rw-r--r--src/components/services/OctoPrint.vue18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/components/services/OctoPrint.vue b/src/components/services/OctoPrint.vue
index 1428d9a..aceb2d8 100644
--- a/src/components/services/OctoPrint.vue
+++ b/src/components/services/OctoPrint.vue
@@ -6,7 +6,9 @@
6 <template v-if="item.subtitle && !state"> 6 <template v-if="item.subtitle && !state">
7 {{ item.subtitle }} 7 {{ item.subtitle }}
8 </template> 8 </template>
9 <template v-if="!error && display == 'text' && statusClass == 'in-progress'"> 9 <template
10 v-if="!error && display == 'text' && statusClass == 'in-progress'"
11 >
10 <i class="fa-solid fa-gear mr-1"></i> 12 <i class="fa-solid fa-gear mr-1"></i>
11 <b v-if="completion">{{ completion.toFixed() }}%</b> 13 <b v-if="completion">{{ completion.toFixed() }}%</b>
12 <span class="separator mx-1"> | </span> 14 <span class="separator mx-1"> | </span>
@@ -17,9 +19,13 @@
17 </template> 19 </template>
18 <template v-if="!error && display == 'text' && statusClass == 'ready'"> 20 <template v-if="!error && display == 'text' && statusClass == 'ready'">
19 <i class="fa-solid fa-temperature-half mr-1"></i> 21 <i class="fa-solid fa-temperature-half mr-1"></i>
20 <b v-if="printer.temperature.bed">{{ printer.temperature.bed.actual.toFixed() }} C</b> 22 <b v-if="printer.temperature.bed"
23 >{{ printer.temperature.bed.actual.toFixed() }} C</b
24 >
21 <span class="separator mx-1"> | </span> 25 <span class="separator mx-1"> | </span>
22 <b v-if="printer.temperature.tool0">{{ printer.temperature.tool0.actual.toFixed() }} C</b> 26 <b v-if="printer.temperature.tool0"
27 >{{ printer.temperature.tool0.actual.toFixed() }} C</b
28 >
23 </template> 29 </template>
24 <template v-if="!error && display == 'bar'"> 30 <template v-if="!error && display == 'bar'">
25 <progress 31 <progress
@@ -28,7 +34,7 @@
28 :value="completion" 34 :value="completion"
29 max="100" 35 max="100"
30 :title="`${state} - ${completion.toFixed()}%, ${toTime( 36 :title="`${state} - ${completion.toFixed()}%, ${toTime(
31 printTimeLeft 37 printTimeLeft,
32 )} left`" 38 )} left`"
33 > 39 >
34 {{ completion }}% 40 {{ completion }}%
@@ -99,7 +105,9 @@ export default {
99 }, 105 },
100 fetchPrinterStatus: async function () { 106 fetchPrinterStatus: async function () {
101 try { 107 try {
102 const response = await this.fetch(`api/printer?apikey=${this.item.apikey}`); 108 const response = await this.fetch(
109 `api/printer?apikey=${this.item.apikey}`,
110 );
103 this.printer = response; 111 this.printer = response;
104 this.error = response.error; 112 this.error = response.error;
105 } catch (e) { 113 } catch (e) {