Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/westberliner/checksum.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpatrick <patrick@westberliner.net>2021-02-28 14:20:54 +0300
committerpatrick <patrick@westberliner.net>2021-02-28 14:20:54 +0300
commit6abb3b5741e540e45929b77fe7adeccb9d89db05 (patch)
tree347881d96483e344de05db1dc68f7de863d1d109 /src
parent0322cca43be3474894e1a15c7438d790719618e7 (diff)
Working solution on Nextcloud 20 to allow checksum only on files.
Diffstat (limited to 'src')
-rw-r--r--src/views/ChecksumTab.vue19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/views/ChecksumTab.vue b/src/views/ChecksumTab.vue
index f450bfb..d174d29 100644
--- a/src/views/ChecksumTab.vue
+++ b/src/views/ChecksumTab.vue
@@ -76,9 +76,10 @@ export default {
data() {
return {
- icon: 'icon-category-auth',
- loading: false,
+ // Enabled won't work as intended. This is a workaround for now.
+ icon: (this.fileInfo.type === 'file') ? 'icon-category-auth' : '',
name: t('checksum', 'Checksum'),
+ loading: false,
algorithm: algorithms[0],
algorithms,
hash: '',
@@ -87,8 +88,8 @@ export default {
computed: {
/**
- * Needed to differenciate the tabs.
- * Pulled from the AppSidebarTab component.
+ * Needed to differenciate the tabs
+ * pulled from the AppSidebarTab component.
*
* @returns {string}
*/
@@ -97,6 +98,15 @@ export default {
},
/**
+ * Allow checksum only on files.
+ *
+ * @returns {boolean}
+ */
+ enabled() {
+ return (this.fileInfo.type === 'file')
+ },
+
+ /**
* Returns the current active tab.
* Needed because AppSidebarTab also uses $parent.activeTab.
*
@@ -105,6 +115,7 @@ export default {
activeTab() {
return this.$parent.activeTab
},
+
},
methods: {