Skip to content

Commit 1e20a49

Browse files
committed
Update route, warn about package overwrritng and immiment reboot
1 parent 5144b6e commit 1e20a49

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/components/Settings.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
<v-card>
8080
<div class="cardContent">
8181
<template v-if="updateStatus==1">
82+
Caricamento del file:
8283
<h3>{{ counter }} %</h3>
8384
<br>
8485
{{ updateStatusText }}
@@ -88,8 +89,11 @@
8889

8990
</template>
9091
<template v-if="updateStatus==0">
92+
9193
<v-text-field label="Seleziona il pacchetto di aggiornamento" @click='pickFile' v-model='fileName' prepend-icon='attach_file'></v-text-field>
9294
<input type="file" style="display: none" ref="file" @change="onFilePicked">
95+
<template v-if="this.fileObj"> Qualsiasi pacchetto di aggiornamento esistente verrà sovrascritto. CoderBot verrà riavviato per applicare l'aggiornamento.<br></template>
96+
9397
<v-btn v-if="this.fileObj" @click="upload" color="error">Conferma</v-btn>
9498
</template>
9599
</div>
@@ -272,19 +276,17 @@ export default {
272276
headers: { 'Content-Type': 'multipart/form-data' },
273277
onUploadProgress: progressEvent => {
274278
this.counter = Math.floor((progressEvent.loaded * 100) / progressEvent.total);
275-
if (this.counter == 100){
276-
this.updateStatusText = 'Upload completato. Aggiornamento in corso...'
277-
}
279+
278280
}
279281
}
280282
this.updateStatus = 1
281283
282-
this.$axios.post(this.CB + '/uploadFile', formdata, config).then(function(result) {
284+
this.$axios.post(this.CB + '/updateFromPackage', formdata, config).then(function(result) {
283285
this.uploadCompleted = true;
284286
this.uploadInProgress = false;
285287
console.dir(result.data);
286288
287-
this.updateStatusText = 'Upload completato. Aggiornamento in corso...'
289+
this.updateStatusText = 'Upload completato. Riavvio in corso.'
288290
289291
}.bind(this))
290292

0 commit comments

Comments
 (0)