mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 23:59:27 -04:00
fix(dashboard): don't initially load items of hidden api widgets
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
parent
d4b862e513
commit
0bb7be28f0
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