Browse Source

Merge pull request #54413 from nextcloud/perf/render-sharing-tab-sections-only-once

perf: render sharing tab sections only once
pull/54393/head
Simon L. 5 months ago
committed by GitHub
parent
commit
ec3be25955
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      apps/files_sharing/src/services/TabSections.js
  2. 9
      apps/files_sharing/src/views/SharingTab.vue
  3. 2
      dist/6348-6348.js
  4. 0
      dist/6348-6348.js.license
  5. 1
      dist/6348-6348.js.map
  6. 1
      dist/6348-6348.js.map.license
  7. 2
      dist/7639-7639.js
  8. 1
      dist/7639-7639.js.map
  9. 1
      dist/7639-7639.js.map.license
  10. 4
      dist/files_sharing-files_sharing_tab.js
  11. 2
      dist/files_sharing-files_sharing_tab.js.map

8
apps/files_sharing/src/services/TabSections.js

@ -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

9
apps/files_sharing/src/views/SharingTab.vue

@ -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
File diff suppressed because it is too large
View File

0
dist/7639-7639.js.license → dist/6348-6348.js.license

1
dist/6348-6348.js.map
File diff suppressed because it is too large
View File

1
dist/6348-6348.js.map.license

@ -0,0 +1 @@
6348-6348.js.license

2
dist/7639-7639.js
File diff suppressed because it is too large
View File

1
dist/7639-7639.js.map
File diff suppressed because it is too large
View File

1
dist/7639-7639.js.map.license

@ -1 +0,0 @@
7639-7639.js.license

4
dist/files_sharing-files_sharing_tab.js
File diff suppressed because it is too large
View File

2
dist/files_sharing-files_sharing_tab.js.map
File diff suppressed because it is too large
View File

Loading…
Cancel
Save