11<template >
22 <v-app >
3+ <div v-if =" isBusy" class =" loading-line" ></div >
34 <v-main >
4- <v-overlay v-if =" isBusy" absolute v-ripple =" { center: true }" >
5- <div class =" text-center headline" >
6- <v-icon >mdi-loading mdi-spin</v-icon > Loading...
7- </div >
8- </v-overlay >
95 <router-view ></router-view >
106 <v-dialog persistent :value =" error" >
117 <v-card >
12- <v-card-title class =" red--text" ><v-icon color =" red" >mdi-exclamation-thick</v-icon > Error Occurred</v-card-title >
8+ <v-card-title class =" red--text"
9+ ><v-icon color =" red" >mdi-exclamation-thick</v-icon > Error
10+ Occurred</v-card-title
11+ >
1312 <v-card-text class =" body-1" >{{ error }}</v-card-text >
1413 <v-card-actions >
1514 <v-btn text @click =" $store.commit('setError', '')" >Close</v-btn >
@@ -60,7 +59,7 @@ export default {
6059 },
6160 error () {
6261 return this .$store .state .error ;
63- },
62+ }
6463 },
6564 methods: {
6665 login () {
@@ -69,10 +68,72 @@ export default {
6968 // Log the user out
7069 logout () {
7170 this .$auth .logout ({
72- returnTo: window .location .origin ,
71+ returnTo: window .location .origin
7372 });
74- },
75- },
73+ }
74+ }
7675};
7776 </script >
7877
78+ <style scoped>
79+ .loading-line {
80+ height : 3px ;
81+ position : absolute ;
82+ top : 0 ;
83+ background-color : #eeffff ;
84+ animation : loading-animate 5s linear infinite ;
85+ z-index : 50 ;
86+ }
87+
88+ @keyframes loading-animate {
89+ 0% {
90+ width : 0% ;
91+ background-color : #dff ;
92+ }
93+ 10% {
94+ width : 5% ;
95+ background-color : #cff ;
96+ }
97+ 20% {
98+ width : 10% ;
99+ background-color : #bff ;
100+ }
101+ 30% {
102+ width : 15% ;
103+ background-color : #aef ;
104+ }
105+ 40% {
106+ width : 25% ;
107+ background-color : #8cf ;
108+ }
109+ 50% {
110+ width : 35% ;
111+ background-color : #7af ;
112+ }
113+ 60% {
114+ width : 50% ;
115+ background-color : #69f ;
116+ }
117+ 70% {
118+ width : 65% ;
119+ background-color : #57f ;
120+ }
121+ 80% {
122+ width : 80% ;
123+ background-color : #38f ;
124+ }
125+ 90% {
126+ width : 90% ;
127+ background-color : #03f ;
128+ }
129+ 100% {
130+ width : 100% ;
131+ background-color : #00f ;
132+ }
133+
134+ 0% {
135+ width : 0% ;
136+ background-color : #eff ;
137+ }
138+ }
139+ </style >
0 commit comments