Skip to content

Commit 7bbf44e

Browse files
committed
Fix loading groupfolder info when share api is disabled
Signed-off-by: Carl Schwan <[email protected]>
1 parent 51afde1 commit 7bbf44e

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

apps/files_sharing/src/views/SharingTab.vue

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<template>
2424
<div :class="{ 'icon-loading': loading }">
2525
<!-- error message -->
26-
<div v-if="error" class="emptycontent">
26+
<div v-if="error" class="emptycontent" :class="{ emptyContentWithSections: sections.length > 0 }">
2727
<div class="icon icon-error" />
2828
<h2>{{ error }}</h2>
2929
</div>
@@ -73,15 +73,15 @@
7373
:id="`${fileInfo.id}`"
7474
type="file"
7575
:name="fileInfo.name" />
76-
77-
<!-- additionnal entries, use it with cautious -->
78-
<div v-for="(section, index) in sections"
79-
:ref="'section-' + index"
80-
:key="index"
81-
class="sharingTab__additionalContent">
82-
<component :is="section($refs['section-'+index], fileInfo)" :file-info="fileInfo" />
83-
</div>
8476
</template>
77+
78+
<!-- additionnal entries, use it with cautious -->
79+
<div v-for="(section, index) in sections"
80+
:ref="'section-' + index"
81+
:key="index"
82+
class="sharingTab__additionalContent">
83+
<component :is="section($refs['section-'+index], fileInfo)" :file-info="fileInfo" />
84+
</div>
8585
</div>
8686
</template>
8787

@@ -204,7 +204,11 @@ export default {
204204
this.processSharedWithMe(sharedWithMe)
205205
this.processShares(shares)
206206
} catch (error) {
207-
this.error = t('files_sharing', 'Unable to load the shares list')
207+
if (error.response.data?.ocs?.meta?.message) {
208+
this.error = error.response.data.ocs.meta.message
209+
} else {
210+
this.error = t('files_sharing', 'Unable to load the shares list')
211+
}
208212
this.loading = false
209213
console.error('Error loading the shares list', error)
210214
}
@@ -353,3 +357,9 @@ export default {
353357
},
354358
}
355359
</script>
360+
361+
<style scoped lang="scss">
362+
.emptyContentWithSections {
363+
margin: 1rem auto;
364+
}
365+
</style>

dist/files_sharing-files_sharing_tab.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-files_sharing_tab.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)