diff --git a/resources/assets/js/views/settings/UpdateApp.vue b/resources/assets/js/views/settings/UpdateApp.vue index 8b9db1ea..b7511738 100644 --- a/resources/assets/js/views/settings/UpdateApp.vue +++ b/resources/assets/js/views/settings/UpdateApp.vue @@ -9,11 +9,11 @@
- + {{ $t('settings.update_app.check_update') }}
-
+

{{ $t('settings.update_app.avail_update') }}


@@ -66,15 +66,21 @@ export default { let response = await axios.post('/api/update', data) console.log(response.data) this.isUpdating = false + this.isUpdateAvail = false }, async checkUpdate () { - this.isUpdateAvail = true - let response = await axios.get('/api/check/update') - console.log(response.data) - if (response.data) { - this.updateData.isMinor = response.data.is_minor - this.updateData.version = response.data.version.version - this.updateData.description = response.data.version.description + try { + let response = await axios.get('/api/check/update') + console.log(response.data) + if (response.data) { + this.updateData.isMinor = response.data.is_minor + this.updateData.version = response.data.version + this.description = response.data.description + } + this.isUpdateAvail = true + } catch (e) { + this.isUpdateAvail = false + window.toastr['error']('Something went wrong') } } }