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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-05-27 19:54:49 +0300
committerGitHub <noreply@github.com>2022-05-27 19:54:49 +0300
commitec96aa527b3ef2c32d460740093c777ee7695248 (patch)
tree14bc56a425633e8260eb17b147944c24c3042996 /apps/files_sharing
parente4378fd18cb39407097f40431cd28c1fa01ba75d (diff)
parent581e13a2d3a0b0087ba7de049083cd733cc83bf4 (diff)
Merge pull request #32594 from nextcloud/fix/groupfolder-not-loading-when-share-disabled
Fix loading groupfolder info when share api is disabled
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/src/views/SharingTab.vue30
1 files changed, 20 insertions, 10 deletions
diff --git a/apps/files_sharing/src/views/SharingTab.vue b/apps/files_sharing/src/views/SharingTab.vue
index d1174218b08..53e48dfa1e9 100644
--- a/apps/files_sharing/src/views/SharingTab.vue
+++ b/apps/files_sharing/src/views/SharingTab.vue
@@ -23,7 +23,7 @@
<template>
<div :class="{ 'icon-loading': loading }">
<!-- error message -->
- <div v-if="error" class="emptycontent">
+ <div v-if="error" class="emptycontent" :class="{ emptyContentWithSections: sections.length > 0 }">
<div class="icon icon-error" />
<h2>{{ error }}</h2>
</div>
@@ -73,15 +73,15 @@
:id="`${fileInfo.id}`"
type="file"
:name="fileInfo.name" />
-
- <!-- additionnal entries, use it with cautious -->
- <div v-for="(section, index) in sections"
- :ref="'section-' + index"
- :key="index"
- class="sharingTab__additionalContent">
- <component :is="section($refs['section-'+index], fileInfo)" :file-info="fileInfo" />
- </div>
</template>
+
+ <!-- additionnal entries, use it with cautious -->
+ <div v-for="(section, index) in sections"
+ :ref="'section-' + index"
+ :key="index"
+ class="sharingTab__additionalContent">
+ <component :is="section($refs['section-'+index], fileInfo)" :file-info="fileInfo" />
+ </div>
</div>
</template>
@@ -204,7 +204,11 @@ export default {
this.processSharedWithMe(sharedWithMe)
this.processShares(shares)
} catch (error) {
- this.error = t('files_sharing', 'Unable to load the shares list')
+ if (error.response.data?.ocs?.meta?.message) {
+ this.error = error.response.data.ocs.meta.message
+ } else {
+ this.error = t('files_sharing', 'Unable to load the shares list')
+ }
this.loading = false
console.error('Error loading the shares list', error)
}
@@ -353,3 +357,9 @@ export default {
},
}
</script>
+
+<style scoped lang="scss">
+.emptyContentWithSections {
+ margin: 1rem auto;
+}
+</style>