Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dashboard icons #1124

Merged
merged 1 commit into from Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 3 additions & 5 deletions lib/AppInfo/DashboardWidget.php
Expand Up @@ -74,10 +74,10 @@

public function getWidgetButtons(string $userId): array {
$buttons = [
new WidgetButton(WidgetButton::TYPE_NEW, $this->url->linkToRouteAbsolute('notes.page.create'), $this->l10n->t('Create new note'))

Check warning on line 77 in lib/AppInfo/DashboardWidget.php

View workflow job for this annotation

GitHub Actions / lint-php (min)

Line exceeds 120 characters; contains 141 characters

Check warning on line 77 in lib/AppInfo/DashboardWidget.php

View workflow job for this annotation

GitHub Actions / lint-php (max)

Line exceeds 120 characters; contains 141 characters
];
if ($this->notesService->countNotes($userId) > 7) {
$buttons[] = new WidgetButton(WidgetButton::TYPE_MORE, $this->url->linkToRouteAbsolute('notes.page.index'), $this->l10n->t('More notes'));

Check warning on line 80 in lib/AppInfo/DashboardWidget.php

View workflow job for this annotation

GitHub Actions / lint-php (min)

Line exceeds 120 characters; contains 150 characters

Check warning on line 80 in lib/AppInfo/DashboardWidget.php

View workflow job for this annotation

GitHub Actions / lint-php (max)

Line exceeds 120 characters; contains 150 characters
}
return $buttons;
}
Expand All @@ -92,11 +92,9 @@
} catch (\Throwable $e) {
}
$link = $this->url->linkToRouteAbsolute('notes.page.indexnote', ['id' => $note->getId()]);
$icon = $this->url->getAbsoluteURL(
$note->getFavorite()
? $this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/starred.svg'))
: $this->getIconUrl()
);
$icon = $note->getFavorite()
? $this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/starred.svg'))
: $this->getIconUrl();
return new WidgetItem($note->getTitle(), $excerpt, $link, $icon, (string)$note->getModified());
}, $notes);
}
Expand Down