Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "tify", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "The fastest IIIF document viewer", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/subugoe/tify", |
@@ -35,3 +35,3 @@ import Vue from 'vue'; | ||
error: '', | ||
loading: false, | ||
loading: 0, | ||
messages: {}, | ||
@@ -48,5 +48,5 @@ options, | ||
}, | ||
mounted() { | ||
created() { | ||
this.$http.interceptors.request.use((request) => { | ||
this.loading = true; | ||
this.loading += 1; | ||
return request; | ||
@@ -56,4 +56,7 @@ }); | ||
this.$http.interceptors.response.use((response) => { | ||
this.loading = false; | ||
if (this.loading > 0) this.loading -= 1; | ||
return response; | ||
}, (error) => { | ||
this.loading = 0; | ||
return Promise.reject(error); | ||
}); | ||
@@ -67,8 +70,5 @@ | ||
}, (error) => { | ||
const status = (error.response ? error.response.statusText : 'Disconnected'); | ||
const status = (error.response ? error.response.statusText : error.message); | ||
this.error = `Error loading translation ${this.options.language}: ${status}`; | ||
}); | ||
// TODO: Interceptor should set this to true on first XHR, but does not | ||
this.loading = true; | ||
}, | ||
@@ -75,0 +75,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
592860
81
1362