diff options
author | Joas Schilling <coding@schilljs.com> | 2024-07-11 13:31:15 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-07-11 12:32:35 +0000 |
commit | 6968f4afe4872809144ecd49325cd714280625bd (patch) | |
tree | 3e045d1cf281284b0ef68a87a53947d314ca8aee | |
parent | aca36089cb5bf751ab4e97f6d28bc6fbb7ff699f (diff) |
fix(dashboard): Fix ID and provide icon url
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/Dashboard/OnThisDay.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/Dashboard/OnThisDay.php b/lib/Dashboard/OnThisDay.php index 187648b3..36eb432e 100644 --- a/lib/Dashboard/OnThisDay.php +++ b/lib/Dashboard/OnThisDay.php @@ -4,12 +4,12 @@ namespace OCA\Photos\Dashboard; use OCA\Photos\AppInfo\Application; use OCP\AppFramework\Services\IInitialState; -use OCP\Dashboard\IWidget; +use OCP\Dashboard\IIconWidget; use OCP\IL10N; use OCP\IURLGenerator; use OCP\Util; -class OnThisDay implements IWidget { +class OnThisDay implements IIconWidget { public function __construct( private IL10N $l, private IURLGenerator $url, @@ -21,7 +21,7 @@ class OnThisDay implements IWidget { * @inheritDoc */ public function getId(): string { - return 'photos.onthisday'; + return 'photos-onthisday'; } /** @@ -48,8 +48,15 @@ class OnThisDay implements IWidget { /** * @inheritDoc */ + public function getIconUrl(): string { + return $this->url->getAbsoluteURL($this->url->imagePath('core', 'places/calendar.svg')); + } + + /** + * @inheritDoc + */ public function getUrl(): ?string { - return $this->url->linkToRoute('photos.page.indexthisday'); + return $this->url->linkToRouteAbsolute('photos.page.indexthisday'); } /** |