summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis <louis@chmn.me>2024-07-11 16:40:43 +0200
committerGitHub <noreply@github.com>2024-07-11 16:40:43 +0200
commit8cdc4054bb3aa9224a7a347d2c416ffde77b5cd9 (patch)
tree3e045d1cf281284b0ef68a87a53947d314ca8aee
parentaca36089cb5bf751ab4e97f6d28bc6fbb7ff699f (diff)
parent6968f4afe4872809144ecd49325cd714280625bd (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.php15
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');
}
/**