Adding few stuff related to updates
This commit is contained in:
@ -14,7 +14,6 @@ export default {
|
||||
props: { saved_ssid: String, list_ssids: Array, internet: Boolean },
|
||||
data() {
|
||||
return {
|
||||
translation: {},
|
||||
current_version:""
|
||||
}
|
||||
},
|
||||
|
@ -99,8 +99,7 @@ export default {
|
||||
name: 'report',
|
||||
data() {
|
||||
return {
|
||||
results: true,
|
||||
translation: {}
|
||||
results: true
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -20,7 +20,7 @@
|
||||
},
|
||||
methods: {
|
||||
internet_check: function() {
|
||||
axios.get('/api/network/status', { timeout: 10000 })
|
||||
axios.get('/api/network/status', { timeout: 30000 })
|
||||
.then(response => {
|
||||
if (response.data.internet) this.internet = true
|
||||
if (window.config.iface_out.charAt(0) == 'e') {
|
||||
@ -32,7 +32,7 @@
|
||||
.catch(err => (console.log(err)))
|
||||
},
|
||||
get_wifi_networks: function() {
|
||||
axios.get('/api/network/wifi/list', { timeout: 10000 })
|
||||
axios.get('/api/network/wifi/list', { timeout: 30000 })
|
||||
.then(response => {
|
||||
this.list_ssids = response.data.networks
|
||||
this.goto_home();
|
||||
|
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="center">
|
||||
<p><strong>TinyCheck needs to be updated to the next version ({{next_version}}).</strong><br />
|
||||
<span v-if="!update_launched">Please click on the button below to update it.</span>
|
||||
<span v-if="update_launched&&!update_finished">The process can take few minutes, please wait...</span>
|
||||
<span v-if="update_launched&&update_finished" class="color-green">✓ Update finished, let's refresh the interface...</span>
|
||||
<p><strong>{{ $t("update.tinycheck_needs") }} ({{next_version}}).</strong><br />
|
||||
<span v-if="!update_launched">{{ $t("update.please_click") }}</span>
|
||||
<span v-if="update_launched&&!update_finished">{{ $t("update.the_process") }}</span>
|
||||
<span v-if="update_launched&&update_finished" class="color-green">✓ {{ $t("update.update_finished") }}</span>
|
||||
</p>
|
||||
<button class="btn btn-primary" :class="[ update_launched ? 'loading' : '' ]" v-on:click="launch_update()" v-if="!update_finished">Update it now</button>
|
||||
<button class="btn btn-primary" :class="[ update_launched ? 'loading' : '' ]" v-on:click="launch_update()" v-if="!update_finished">{{ $t("update.update_it") }}</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
if(response.data.status) {
|
||||
if(response.data.message == "Update successfully launched"){
|
||||
this.update_launched = true
|
||||
this.check_interval = setInterval(function(){ this.check_version(); }.bind(this), 1000);
|
||||
this.check_interval = setInterval(function(){ this.check_version(); }.bind(this), 3000);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -72,8 +72,7 @@ export default {
|
||||
virtual_keyboard: window.config.virtual_keyboard,
|
||||
have_internet: false,
|
||||
enter_creds: false,
|
||||
refreshing: false,
|
||||
translation: {}
|
||||
refreshing: false
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
Reference in New Issue
Block a user