Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions apps/files_sharing/src/views/SharingTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
:reshare="reshare"
:shares="shares"
@open-sharing-details="toggleShareDetailsView" />
<!-- Non link external shares list -->
<SharingList v-if="!loading"
:shares="externalShares"
:file-info="fileInfo"
@open-sharing-details="toggleShareDetailsView" />
<!-- link shares list -->
<SharingLinkList v-if="!loading"
ref="linkShareList"
Expand Down Expand Up @@ -180,6 +185,7 @@ import SharingList from './SharingList.vue'
import SharingDetailsTab from './SharingDetailsTab.vue'

import ShareDetails from '../mixins/ShareDetails.js'
import logger from '../services/logger.ts'

export default {
name: 'SharingTab',
Expand Down Expand Up @@ -215,6 +221,7 @@ export default {
sharedWithMe: {},
shares: [],
linkShares: [],
externalShares: [],

sections: OCA.Sharing.ShareTabSections.getSections(),
projectsEnabled: loadState('core', 'projects_enabled', false),
Expand Down Expand Up @@ -358,11 +365,19 @@ export default {
],
)

this.linkShares = shares.filter(share => share.type === ShareType.Link || share.type === ShareType.Email)
this.shares = shares.filter(share => share.type !== ShareType.Link && share.type !== ShareType.Email)
for (const share of shares) {
if ([ShareType.Link, ShareType.Email].includes(share.type)) {
this.linkShares.push(share)
} else if ([ShareType.Remote, ShareType.RemoteGroup].includes(share.type)) {
this.externalShares.push(share)
} else {
this.shares.push(share)
}
}

console.debug('Processed', this.linkShares.length, 'link share(s)')
console.debug('Processed', this.shares.length, 'share(s)')
logger.debug(`Processed ${this.linkShares.length} link share(s)`)
logger.debug(`Processed ${this.shares.length} share(s)`)
logger.debug(`Processed ${this.externalShares.length} external share(s)`)
}
},

Expand Down Expand Up @@ -423,6 +438,8 @@ export default {
// meaning: not from the ShareInput
if (share.type === ShareType.Email) {
this.linkShares.unshift(share)
} else if ([ShareType.Remote, ShareType.RemoteGroup].includes(share.type)) {
this.externalShares.unshift(share)
} else {
this.shares.unshift(share)
}
Expand Down
2 changes: 0 additions & 2 deletions dist/1162-1162.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/1162-1162.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/1162-1162.js.map.license

This file was deleted.

2 changes: 2 additions & 0 deletions dist/6241-6241.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/6241-6241.js.map.license
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.

Loading