Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(dashboard): Fix ID and provide icon url
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Jul 11, 2024
commit 99919d0f9139df8b4cc8527d4b1c57fac0da6b7a
15 changes: 11 additions & 4 deletions lib/Dashboard/OnThisDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

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,
Expand All @@ -24,7 +24,7 @@ public function __construct(
* @inheritDoc
*/
public function getId(): string {
return 'photos.onthisday';
return 'photos-onthisday';
}

/**
Expand All @@ -48,11 +48,18 @@ public function getIconClass(): string {
return 'icon-calendar-dark';
}

/**
* @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');
}

/**
Expand Down