mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #54413 from nextcloud/perf/render-sharing-tab-sections-only-once
perf: render sharing tab sections only once
This commit is contained in:
commit
ec3be25955
11 changed files with 21 additions and 10 deletions
|
|
@ -3,6 +3,14 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
/**
|
||||
* Callback to render a section in the sharing tab.
|
||||
*
|
||||
* @callback registerSectionCallback
|
||||
* @param {undefined} el - Deprecated and will always be undefined (formerly the root element)
|
||||
* @param {object} fileInfo - File info object
|
||||
*/
|
||||
|
||||
export default class TabSections {
|
||||
|
||||
_sections
|
||||
|
|
|
|||
|
|
@ -127,11 +127,10 @@
|
|||
</NcPopover>
|
||||
</div>
|
||||
<!-- additional entries, use it with cautious -->
|
||||
<div v-for="(section, index) in sections"
|
||||
:ref="'section-' + index"
|
||||
<div v-for="(component, index) in sectionComponents"
|
||||
:key="index"
|
||||
class="sharingTab__additionalContent">
|
||||
<component :is="section($refs['section-'+index], fileInfo)" :file-info="fileInfo" />
|
||||
<component :is="component" :file-info="fileInfo" />
|
||||
</div>
|
||||
|
||||
<!-- projects (deprecated as of NC25 (replaced by related_resources) - see instance config "projects.enabled" ; ignore this / remove it / move into own section) -->
|
||||
|
|
@ -286,6 +285,10 @@ export default {
|
|||
// TRANSLATORS: Type as in with a keyboard
|
||||
: t('files_sharing', 'Type an email or federated cloud ID')
|
||||
},
|
||||
|
||||
sectionComponents() {
|
||||
return this.sections.map((section) => section(undefined, this.fileInfo))
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
|
|
|
|||
2
dist/6348-6348.js
vendored
Normal file
2
dist/6348-6348.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/6348-6348.js.map
vendored
Normal file
1
dist/6348-6348.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/6348-6348.js.map.license
vendored
Symbolic link
1
dist/6348-6348.js.map.license
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
6348-6348.js.license
|
||||
2
dist/7639-7639.js
vendored
2
dist/7639-7639.js
vendored
File diff suppressed because one or more lines are too long
1
dist/7639-7639.js.map
vendored
1
dist/7639-7639.js.map
vendored
File diff suppressed because one or more lines are too long
1
dist/7639-7639.js.map.license
vendored
1
dist/7639-7639.js.map.license
vendored
|
|
@ -1 +0,0 @@
|
|||
7639-7639.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