mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix(files_sharing): tab shares title and creation sort
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
This commit is contained in:
parent
cb341fc64c
commit
6cf1aed93a
9 changed files with 15 additions and 10 deletions
|
|
@ -260,11 +260,16 @@ export default {
|
|||
*/
|
||||
processShares({ data }) {
|
||||
if (data.ocs && data.ocs.data && data.ocs.data.length > 0) {
|
||||
// create Share objects and sort by newest
|
||||
// create Share objects and sort by title in alphabetical order and then by creation time
|
||||
const shares = data.ocs.data
|
||||
.map(share => new Share(share))
|
||||
.sort((a, b) => b.createdTime - a.createdTime)
|
||||
|
||||
.sort((a, b) => {
|
||||
const localCompare = a.title.localeCompare(b.title)
|
||||
if (localCompare !== 0) {
|
||||
return localCompare
|
||||
}
|
||||
return b.createdTime - a.createdTime
|
||||
})
|
||||
this.linkShares = shares.filter(share => share.type === this.SHARE_TYPES.SHARE_TYPE_LINK || share.type === this.SHARE_TYPES.SHARE_TYPE_EMAIL)
|
||||
this.shares = shares.filter(share => share.type !== this.SHARE_TYPES.SHARE_TYPE_LINK && share.type !== this.SHARE_TYPES.SHARE_TYPE_EMAIL)
|
||||
|
||||
|
|
|
|||
4
dist/9549-9549.js → dist/6880-6880.js
vendored
4
dist/9549-9549.js → dist/6880-6880.js
vendored
File diff suppressed because one or more lines are too long
1
dist/6880-6880.js.map
vendored
Normal file
1
dist/6880-6880.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/6880-6880.js.map.license
vendored
Symbolic link
1
dist/6880-6880.js.map.license
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
6880-6880.js.license
|
||||
1
dist/9549-9549.js.map
vendored
1
dist/9549-9549.js.map
vendored
File diff suppressed because one or more lines are too long
1
dist/9549-9549.js.map.license
vendored
1
dist/9549-9549.js.map.license
vendored
|
|
@ -1 +0,0 @@
|
|||
9549-9549.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