From 431105ae4d4815a290eeee5233c4b494430a7e15 Mon Sep 17 00:00:00 2001 From: patrick Date: Sun, 28 Feb 2021 20:35:14 +0100 Subject: Fixes issue on files within directories. Reset tab view on fileinfo change - NC 21 only. --- Changelog.md | 4 ++++ appinfo/info.xml | 2 +- package.json | 2 +- src/views/ChecksumTab.vue | 6 ++++-- src/views/ChecksumTab20.vue | 5 +++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Changelog.md b/Changelog.md index e908b8e..1ed159d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,10 @@ Changelog ========= +**1.1.1** +- NC 20|21: Fixes issue on checksum files in folders not working. +- NC 21: Fixed issue on fileinfo change not resetting view. + **1.1.0** - Upgrade frontend to vue. (thx to @st3iny for the basics) - Added possibility to translate via transifex. diff --git a/appinfo/info.xml b/appinfo/info.xml index d8ab655..a4de3cc 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -12,7 +12,7 @@ Select a algorithm and it will try to generate a hash. If you want an other algorithm, just click on the reload button. - 1.1.0 + 1.1.1 agpl westberliner diff --git a/package.json b/package.json index 785788c..3d97d5d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "checksum", "description": "Checksum app for Nextcloud", - "version": "1.1.0", + "version": "1.1.1", "author": "westberliner", "license": "agpl", "private": true, 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 = '' }, }, } -- cgit v1.2.3