/** * First we will load all of this project's JavaScript dependencies which * includes Vue and other libraries. It is a great starting point when * building robust, powerful web applications using Vue and Laravel. */ require('../../bootstrap'); import Vue from 'vue'; import DashboardPlugin from './../../plugins/dashboard-plugin'; import Global from './../../mixins/global'; import {Progress} from 'element-ui'; Vue.use(Progress); // plugin setup Vue.use(DashboardPlugin); const app = new Vue({ el: '#app', mixins: [ Global ], components: { [Progress.name]: Progress, }, data: function () { return { changelog: { show:false, html: null }, update: { steps: [], steps_total: 0, total: 0, path: '', status: 'success', html: '' }, page: 'check', name: null, version: null } }, mounted() { if (document.getElementById('page') != null && document.getElementById('page').value == 'update') { this.steps(); } }, methods: { async onChangelog() { let changelog_promise = Promise.resolve(axios.get(url + '/install/updates/changelog')); changelog_promise.then(response => { this.changelog.show = true; this.changelog.html = response.data; }) .catch(e => { this.errors.push(e) }) .finally(function () { // always executed }); }, async steps() { let name = document.getElementById('name').value; let steps_promise = Promise.resolve(axios.post(url + '/install/updates/steps', { name: name, version: version })); steps_promise.then(response => { if (response.data.error) { this.update.status = 'exception'; this.update.html = '