aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dashboard/lib/Controller
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-07-11 13:22:46 +0200
committerAndy Scherzinger <info@andy-scherzinger.de>2024-07-11 14:18:22 +0200
commit5368b935393c1bd7e192c35498eda9d76ad99ee8 (patch)
tree64270290a88cb563a9b5c805375a6909b99d45b1 /apps/dashboard/lib/Controller
parent6acecb6f68301e17274bd84d1c9dbff516b52ead (diff)
downloadnextcloud-server-5368b935393c1bd7e192c35498eda9d76ad99ee8.tar.gz
nextcloud-server-5368b935393c1bd7e192c35498eda9d76ad99ee8.zip
fix(dashboard): Use the widget icon URL when it was provided
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dashboard/lib/Controller')
-rw-r--r--apps/dashboard/lib/Controller/DashboardController.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/dashboard/lib/Controller/DashboardController.php b/apps/dashboard/lib/Controller/DashboardController.php
index 9c1ab7813f2..ebd6fdd5ae7 100644
--- a/apps/dashboard/lib/Controller/DashboardController.php
+++ b/apps/dashboard/lib/Controller/DashboardController.php
@@ -15,6 +15,7 @@ use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
+use OCP\Dashboard\IIconWidget;
use OCP\Dashboard\IManager;
use OCP\Dashboard\IWidget;
use OCP\EventDispatcher\IEventDispatcher;
@@ -54,6 +55,7 @@ class DashboardController extends Controller {
'id' => $widget->getId(),
'title' => $widget->getTitle(),
'iconClass' => $widget->getIconClass(),
+ 'iconUrl' => $widget instanceof IIconWidget ? $widget->getIconUrl() : '',
'url' => $widget->getUrl()
];
}, $this->dashboardManager->getWidgets());