mirror of
https://github.com/nextcloud/server.git
synced 2026-04-29 01:50:33 -04:00
Merge pull request #50152 from nextcloud/fix/dashboard/dont-load-hidden-widgets-initially
fix(dashboard): don't initially load items of hidden api widgets
This commit is contained in:
commit
40dd2a93bd
3 changed files with 7 additions and 5 deletions
|
|
@ -299,7 +299,7 @@ export default {
|
|||
|
||||
const apiWidgetIdsToFetch = Object
|
||||
.values(this.apiWidgets)
|
||||
.filter(widget => this.isApiWidgetV2(widget.id))
|
||||
.filter(widget => this.isApiWidgetV2(widget.id) && this.layout.includes(widget.id))
|
||||
.map(widget => widget.id)
|
||||
await Promise.all(apiWidgetIdsToFetch.map(id => this.fetchApiWidgetItems([id], true)))
|
||||
|
||||
|
|
@ -397,9 +397,11 @@ export default {
|
|||
const index = this.layout.indexOf(panel.id)
|
||||
if (!currentValue && index > -1) {
|
||||
this.layout.splice(index, 1)
|
||||
|
||||
} else {
|
||||
this.layout.push(panel.id)
|
||||
if (this.isApiWidgetV2(panel.id)) {
|
||||
this.fetchApiWidgetItems([panel.id], true)
|
||||
}
|
||||
}
|
||||
Vue.set(this.panels[panel.id], 'mounted', false)
|
||||
this.saveLayout()
|
||||
|
|
|
|||
4
dist/dashboard-main.js
vendored
4
dist/dashboard-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/dashboard-main.js.map
vendored
2
dist/dashboard-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue