diff options
author | Louis <louis@chmn.me> | 2024-07-11 16:40:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-11 16:40:43 +0200 |
commit | 8cdc4054bb3aa9224a7a347d2c416ffde77b5cd9 (patch) | |
tree | 3e045d1cf281284b0ef68a87a53947d314ca8aee | |
parent | aca36089cb5bf751ab4e97f6d28bc6fbb7ff699f (diff) | |
parent | 6968f4afe4872809144ecd49325cd714280625bd (diff) |
Merge pull request #2543 from nextcloud/backport/2542/stable29v29.0.4rc1
[stable29] fix(dashboard): Fix ID and provide icon url
-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'); } /** |