Skip to content

Commit b71b7ef

Browse files
committed
fix #10
1 parent 791dbe1 commit b71b7ef

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

src/components/Activity.vue

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,22 @@
5555
<v-dialog v-model="runtimeDialog" width="500">
5656
<v-card>
5757
<v-card-title class="headline grey lighten-2" primary-title>
58-
{{ $t("message.running") }}
58+
{{ $t("message.program_status_title") }}
59+
<v-spacer></v-spacer>
60+
<v-chip v-if="program_status"
61+
class="ma-2"
62+
color="red"
63+
text-color="white"
64+
>
65+
{{ $t("message.program_running")}}
66+
</v-chip>
67+
<v-chip v-else
68+
class="ma-2"
69+
color="grey"
70+
text-color="white"
71+
>
72+
{{ $t("message.program_completed")}}
73+
</v-chip>
5974
</v-card-title>
6075
<template v-if="activity.exec.camera">
6176
<v-card-text v-if="runtimeDialog">
@@ -69,7 +84,8 @@
6984
<v-card-actions>
7085
<v-spacer></v-spacer>
7186
<v-btn color="primary" text @click="runtimeDialog = false; stopProgram()">
72-
{{ $t("message.close") }}
87+
<span v-if="program_status">{{ $t("message.program_stop") }}</span>
88+
<span v-else>{{ $t("message.close") }}</span>
7389
</v-btn>
7490
</v-card-actions>
7591
</v-card>
@@ -364,6 +380,7 @@ export default {
364380
dirty: false,
365381
confirm_exit_dialog: null,
366382
router_next: null,
383+
program_status: null
367384
}),
368385
computed: {
369386
statusText() {
@@ -921,7 +938,8 @@ export default {
921938
console.log('Updating Execution status');
922939
axios.get(`${this.CBv1}/program/status`)
923940
.then((response) => {
924-
if (response.data.running) {
941+
this.program_status = response.data.running;
942+
if (this.program_status) {
925943
// Check again in a second
926944
setTimeout(() => {
927945
this.updateExecStatus();

src/i18n/locales/it/messages.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
"no": "No",
1919
"yes": "",
2020
"confirm": "Conferma",
21+
"program_status_title": "Stato Esecuzione",
22+
"program_running": "In esecuzione",
23+
"program_completed": "Completato",
2124
"program_name_must_be_filled": "Il nome del programma non può essere vuoto.",
2225
"cannot_overwrite_default_program": "Impossibile sovrascrivere un programma di default, cambiare il nome.",
2326
"overwrite": "Sovrascrivi",

0 commit comments

Comments
 (0)