diff --git a/public/js/components/Dashboard/Section.js b/public/js/components/Dashboard/Section.js index fbe26695c..f1c1bb7ce 100644 --- a/public/js/components/Dashboard/Section.js +++ b/public/js/components/Dashboard/Section.js @@ -12,7 +12,7 @@ export default { WidgetIcon, }, inject: { - widgetsSetup:{ + widgetsSetup: { type: Array, default: [], }, @@ -41,7 +41,7 @@ export default { gridHeight: null, draggedItem:null, additionalRow:false, - } + }; }, provide() { return { @@ -49,7 +49,7 @@ export default { this.editModeIsActive ), sectionName: Vue.computed(() => this.name), - } + }; }, computed: { computedWidgetsSetup() { @@ -88,34 +88,29 @@ export default { } return { ...item, ...(item.place[this.gridWidth] || { x: 0, y: 0, w: 1, h: 1 }) }; }); + return placedItems; - - }, - + } }, methods: { - sectionNameTranslation(){ - switch(this.name){ + sectionNameTranslation() { + switch (this.name) { case "general": - return this.$p.t('dashboard',this.name); - break; + return this.$p.t('dashboard', this.name); case "custom": - return this.$p.t('dashboard',this.name); - break; + return this.$p.t('dashboard', this.name); default: return this.name; - break; } }, - showSectionInformation(){ - if (this.name == "general"){ - return this.$p.t('dashboard', 'dashboardGeneralSectionDescription'); - } - else if(this.name == "custom"){ - return this.$p.t('dashboard', 'dashboardCustomSectionDescription'); - } - else{ - return this.$p.t('dashboard', 'dashboardSectionDescription', [this.name]); + showSectionInformation() { + switch (this.name) { + case "general": + return this.$p.t('dashboard', 'dashboardGeneralSectionDescription'); + case "custom": + return this.$p.t('dashboard', 'dashboardCustomSectionDescription'); + default: + return this.$p.t('dashboard', 'dashboardSectionDescription', [this.name]); } }, handleConfigOpened() { @@ -226,16 +221,40 @@ export default { self.gridWidth = parseInt(window.getComputedStyle(cont).getPropertyValue('--fhc-dashboard-grid-size')); }); }, - template: ` -
+ template: /* html */` +

- {{sectionNameTranslation()}}: + {{ sectionNameTranslation() }}:

- - + +