Modal loading improvements

This commit is contained in:
Chris Kankiewicz
2021-06-20 00:22:18 -07:00
parent 2dd969ddad
commit a8078c1617

View File

@@ -8,7 +8,7 @@ export default () => ({
sha1: '••••••••••••••••••••••••••••••••••••••••',
sha256: '••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••'
},
loading: true,
loading: false,
visible: false,
get title() {
@@ -17,12 +17,14 @@ export default () => ({
async show(filePath) {
this.filePath = filePath;
this.loading = true;
this.visible = true;
try {
var response = await axios.get('?info=' + filePath);
} catch (error) {
this.error = error.response.request.statusText;
this.loading = false;
}
this.hashes = response.data.hashes;
@@ -31,10 +33,7 @@ export default () => ({
hide() {
this.visible = false;
this.$nextTick(() => {
this.loading = true;
this.error = null;
});
this.loading = false;
this.error = null;
}
});