diff options
author | patrick <patrick@westberliner.net> | 2021-02-28 22:35:14 +0300 |
---|---|---|
committer | patrick <patrick@westberliner.net> | 2021-02-28 22:35:14 +0300 |
commit | 431105ae4d4815a290eeee5233c4b494430a7e15 (patch) | |
tree | d7cd3494a9d94e605f6ce1c7e0745c5c37d26ac0 /src | |
parent | 53427b4347fff7b9e9a6ba75eadb8e65f58fba3c (diff) |
Fixes issue on files within directories. Reset tab view on fileinfo change - NC 21 only.v1.1.1
Diffstat (limited to 'src')
-rw-r--r-- | src/views/ChecksumTab.vue | 6 | ||||
-rw-r--r-- | src/views/ChecksumTab20.vue | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/views/ChecksumTab.vue b/src/views/ChecksumTab.vue index f08306e..3465efd 100644 --- a/src/views/ChecksumTab.vue +++ b/src/views/ChecksumTab.vue @@ -90,6 +90,7 @@ export default { * @param {Object} fileInfo the current file FileInfo. */ update(fileInfo) { + this.resetState() this.fileInfo = fileInfo }, @@ -113,7 +114,7 @@ export default { */ getChecksum(algorithmType) { const url = generateUrl('/apps/checksum/check') - const params = { source: this.fileInfo.path + this.fileInfo.name, type: algorithmType } + const params = { source: `${this.fileInfo.path}/${this.fileInfo.name}`, type: algorithmType } axios.get(url, { params }).then(response => { this.loading = false this.hash = response.data.msg @@ -127,7 +128,8 @@ export default { */ resetState() { this.loading = false - this.algorithm = '' + this.algorithm = algorithms[0] + this.hash = '' }, }, } diff --git a/src/views/ChecksumTab20.vue b/src/views/ChecksumTab20.vue index 442f515..bbd972b 100644 --- a/src/views/ChecksumTab20.vue +++ b/src/views/ChecksumTab20.vue @@ -139,7 +139,7 @@ export default { */ getChecksum(algorithmType) { const url = generateUrl('/apps/checksum/check') - const params = { source: this.fileInfo.path + this.fileInfo.name, type: algorithmType } + const params = { source: `${this.fileInfo.path}/${this.fileInfo.name}`, type: algorithmType } axios.get(url, { params }).then(response => { this.loading = false this.hash = response.data.msg @@ -153,7 +153,8 @@ export default { */ resetState() { this.loading = false - this.algorithm = '' + this.algorithm = algorithms[0] + this.hash = '' }, }, } |