fix widget api buttons
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
@@ -41,7 +41,6 @@ use OCP\IURLGenerator;
|
||||
use OCP\Util;
|
||||
|
||||
class DeckWidget implements IAPIWidget, IButtonWidget, IIconWidget {
|
||||
|
||||
private IL10N $l10n;
|
||||
private OverviewService $dashboardService;
|
||||
private IURLGenerator $urlGenerator;
|
||||
@@ -160,19 +159,12 @@ class DeckWidget implements IAPIWidget, IButtonWidget, IIconWidget {
|
||||
*/
|
||||
public function getWidgetButtons(string $userId): array {
|
||||
return [
|
||||
new WidgetButton(
|
||||
WidgetButton::TYPE_NEW,
|
||||
$this->urlGenerator->getAbsoluteURL(
|
||||
$this->urlGenerator->linkToRoute(Application::APP_ID . '.page.index')
|
||||
),
|
||||
$this->l10n->t('Add card')
|
||||
),
|
||||
new WidgetButton(
|
||||
WidgetButton::TYPE_MORE,
|
||||
$this->urlGenerator->getAbsoluteURL(
|
||||
$this->urlGenerator->linkToRoute(Application::APP_ID . '.page.index')
|
||||
),
|
||||
$this->l10n->t('Add card')
|
||||
$this->l10n->t('Load more')
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user