Update loading features to login page

This commit is contained in:
Mohd Arief
2018-06-11 16:29:30 +08:00
parent 007d426f63
commit a2262ee3c9
+13
View File
@@ -42,6 +42,8 @@
{{ $t('login') }}
</v-button>
<!-- <el-button type="primary" @click="openFullScreen2">As a service</el-button> -->
<!-- GitHub Login Button -->
<login-with-github/>
</div>
@@ -78,6 +80,17 @@ export default {
methods: {
async login () {
const loading = this.$loading({
lock: true,
text: 'Logging in',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => {
loading.close();
}, 1500);
// Submit the form.
const { data } = await this.form.post('/api/login')