Skip to content

Commit

Permalink
Hide additional content when share details is open
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge authored and nfebe committed Sep 13, 2023
1 parent 80f3e46 commit 9aa3c69
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 62 deletions.
112 changes: 57 additions & 55 deletions apps/files_sharing/src/views/SharingTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,53 +28,63 @@
<h2>{{ error }}</h2>
</div>

<!-- shares content -->
<div v-if="!showSharingDetailsView" class="sharingTab__content">
<!-- shared with me information -->
<SharingEntrySimple v-if="isSharedWithMe" v-bind="sharedWithMe" class="sharing-entry__reshare">
<template #avatar>
<NcAvatar :user="sharedWithMe.user"
:display-name="sharedWithMe.displayName"
class="sharing-entry__avatar" />
</template>
</SharingEntrySimple>

<!-- add new share input -->
<SharingInput v-if="!loading"
:can-reshare="canReshare"
:file-info="fileInfo"
:link-shares="linkShares"
:reshare="reshare"
:shares="shares"
@open-sharing-details="toggleShareDetailsView" />

<!-- link shares list -->
<SharingLinkList v-if="!loading"
ref="linkShareList"
:can-reshare="canReshare"
:file-info="fileInfo"
:shares="linkShares"
@open-sharing-details="toggleShareDetailsView" />

<!-- other shares list -->
<SharingList v-if="!loading"
ref="shareList"
:shares="shares"
:file-info="fileInfo"
@open-sharing-details="toggleShareDetailsView" />

<!-- inherited shares -->
<SharingInherited v-if="canReshare && !loading" :file-info="fileInfo" />

<!-- internal link copy -->
<SharingEntryInternal :file-info="fileInfo" />

<!-- projects -->
<CollectionList v-if="projectsEnabled && fileInfo"
:id="`${fileInfo.id}`"
type="file"
:name="fileInfo.name" />
</div>
<template v-if="!showSharingDetailsView">
<!-- shares content -->
<div class="sharingTab__content">
<!-- shared with me information -->
<SharingEntrySimple v-if="isSharedWithMe" v-bind="sharedWithMe" class="sharing-entry__reshare">
<template #avatar>
<NcAvatar :user="sharedWithMe.user"
:display-name="sharedWithMe.displayName"
class="sharing-entry__avatar" />
</template>
</SharingEntrySimple>

<!-- add new share input -->
<SharingInput v-if="!loading"
:can-reshare="canReshare"
:file-info="fileInfo"
:link-shares="linkShares"
:reshare="reshare"
:shares="shares"
@open-sharing-details="toggleShareDetailsView" />

<!-- link shares list -->
<SharingLinkList v-if="!loading"
ref="linkShareList"
:can-reshare="canReshare"
:file-info="fileInfo"
:shares="linkShares"
@open-sharing-details="toggleShareDetailsView" />

<!-- other shares list -->
<SharingList v-if="!loading"
ref="shareList"
:shares="shares"
:file-info="fileInfo"
@open-sharing-details="toggleShareDetailsView" />

<!-- inherited shares -->
<SharingInherited v-if="canReshare && !loading" :file-info="fileInfo" />

<!-- internal link copy -->
<SharingEntryInternal :file-info="fileInfo" />

<!-- projects -->
<CollectionList v-if="projectsEnabled && fileInfo"
:id="`${fileInfo.id}`"
type="file"
:name="fileInfo.name" />
</div>

<!-- additional 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>

<!-- share details -->
<div v-else>
Expand All @@ -84,14 +94,6 @@
@add:share="addShare"
@remove:share="removeShare" />
</div>

<!-- additional 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>

Expand Down
1 change: 0 additions & 1 deletion dist/6547-6547.js.map

This file was deleted.

6 changes: 3 additions & 3 deletions dist/6547-6547.js → dist/8706-8706.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/8706-8706.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

0 comments on commit 9aa3c69

Please sign in to comment.