mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #52423 from nextcloud/fix/51226/show-remote-shares-as-external-2
fix(files_sharing): Show remote shares as external
This commit is contained in:
commit
6a2c0a254e
10 changed files with 28 additions and 11 deletions
|
|
@ -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"
|
||||
|
|
@ -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',
|
||||
|
|
@ -215,6 +221,7 @@ export default {
|
|||
sharedWithMe: {},
|
||||
shares: [],
|
||||
linkShares: [],
|
||||
externalShares: [],
|
||||
|
||||
sections: OCA.Sharing.ShareTabSections.getSections(),
|
||||
projectsEnabled: loadState('core', 'projects_enabled', false),
|
||||
|
|
@ -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)`)
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
2
dist/1162-1162.js
vendored
2
dist/1162-1162.js
vendored
File diff suppressed because one or more lines are too long
1
dist/1162-1162.js.map
vendored
1
dist/1162-1162.js.map
vendored
File diff suppressed because one or more lines are too long
1
dist/1162-1162.js.map.license
vendored
1
dist/1162-1162.js.map.license
vendored
|
|
@ -1 +0,0 @@
|
|||
1162-1162.js.license
|
||||
2
dist/6241-6241.js
vendored
Normal file
2
dist/6241-6241.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/6241-6241.js.map
vendored
Normal file
1
dist/6241-6241.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/6241-6241.js.map.license
vendored
Symbolic link
1
dist/6241-6241.js.map.license
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
6241-6241.js.license
|
||||
4
dist/files_sharing-files_sharing_tab.js
vendored
4
dist/files_sharing-files_sharing_tab.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-files_sharing_tab.js.map
vendored
2
dist/files_sharing-files_sharing_tab.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue