From 653a320e6c2a0cea6d2e71b036e2eabb1bb7d799 Mon Sep 17 00:00:00 2001 From: chfhtw Date: Fri, 10 Apr 2026 12:57:58 +0200 Subject: [PATCH] Display section name only in admin mode & display source information for widgets (from which section it is) in non-admin mode --- public/js/components/Dashboard/Item.js | 26 ++++++++-- public/js/components/Dashboard/Section.js | 47 +++++++++--------- system/phrasesupdate.php | 60 +++++++++++++++++++++++ 3 files changed, 107 insertions(+), 26 deletions(-) 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 }}: