+
info
+
+
delete
+
diff --git a/frontend/src/components/common/Share.vue b/frontend/src/components/common/Share.vue
index 8f6e0603..a0a0917d 100644
--- a/frontend/src/components/common/Share.vue
+++ b/frontend/src/components/common/Share.vue
@@ -22,16 +22,19 @@ const props = withDefaults(defineProps
(), {
// store
const { getConfig } = storeToRefs(useConfigStore());
+// TODO: public folders
// Share link
-const shareLink: Ref = computed(() => {
- if(props.inviteLink) return props.inviteLink; // use invite link if defined in prop
- else if(props.resource.public) { // else if a public file
+const shareLink: Ref = computed(() => {
+ if (props.inviteLink)
+ return props.inviteLink; // use invite link if defined in prop
+ else if (props.resource.public && props.resourceType === 'object') {
return `${getConfig.value.coms?.apiPath}/object/${props.resource.id}`;
- } else { // else either a protected file or bucket
- const path = props.resourceType === 'object'
- // eslint-disable-next-line max-len
- ? `detail/objects?objectId=${props.resource.id}`
- : `list/objects?bucketId=${props.resource.bucketId}`;
+ } else {
+ // else either a bucket or protected file
+ const path =
+ props.resourceType === 'object'
+ ? `detail/objects?objectId=${props.resource.id}`
+ : `list/objects?bucketId=${props.resource.bucketId}`;
return `${window.location.origin}/${path}`;
}
});
diff --git a/frontend/src/components/common/ShareButton.vue b/frontend/src/components/common/ShareButton.vue
index 945affee..5aa0b497 100644
--- a/frontend/src/components/common/ShareButton.vue
+++ b/frontend/src/components/common/ShareButton.vue
@@ -110,7 +110,7 @@ const showDialog = (x: boolean) => {