diff --git a/public/js/components/Dashboard/Item.js b/public/js/components/Dashboard/Item.js index 196329377..3ba1971d2 100644 --- a/public/js/components/Dashboard/Item.js +++ b/public/js/components/Dashboard/Item.js @@ -39,9 +39,22 @@ export default { "place", "resizeLimits", "dragstate", - "resizeOverlay" + "resizeOverlay", + "source" ], computed: { + sourceInfoTooltip() { + switch (this.source) { + case null: + return ''; + case 'general': + return this.$p.t('dashboard', 'widgetFromGeneralSection'); + case 'custom': + return this.$p.t('dashboard', 'widgetFromCustomSection'); + default: + return this.$p.t('dashboard', 'widgetFromFunktionSection', [this.source]); + } + }, isResizeableHorizontal() { if (this.resizeLimits.width === undefined) return true; @@ -193,6 +206,13 @@ export default { {{ widget.setup.name }} +
+ +
- - + + diff --git a/public/js/components/Dashboard/Section.js b/public/js/components/Dashboard/Section.js index e04cc2473..159763da9 100644 --- a/public/js/components/Dashboard/Section.js +++ b/public/js/components/Dashboard/Section.js @@ -52,6 +52,26 @@ export default { }; }, computed: { + sectionNameTranslation() { + switch (this.name) { + case "general": + return this.$p.t('dashboard', this.name); + case "custom": + return this.$p.t('dashboard', this.name); + default: + return 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]); + } + }, computedWidgetsSetup() { if (!this.widgetsSetup) return {}; @@ -92,26 +112,6 @@ export default { } }, methods: { - sectionNameTranslation() { - switch (this.name) { - case "general": - return this.$p.t('dashboard', this.name); - case "custom": - return this.$p.t('dashboard', this.name); - default: - return 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() { this.configOpened = true }, @@ -225,9 +225,9 @@ export default { class="dashboard-section position-relative pb-3 mb-3 border-bottom" ref="container" > -

- - {{ sectionNameTranslation() }}: +

+ + {{ sectionNameTranslation }}: