|
9 | 9 |
|
10 | 10 | namespace OCA\Libresign\Dashboard; |
11 | 11 |
|
| 12 | +use OCA\UserStatus\AppInfo\Application; |
12 | 13 | use OCA\Libresign\Db\SignRequestMapper; |
13 | 14 | use OCA\Libresign\Service\SignFileService; |
| 15 | +use OCP\Dashboard\IAPIWidget; |
14 | 16 | use OCP\Dashboard\IAPIWidgetV2; |
15 | 17 | use OCP\Dashboard\IButtonWidget; |
16 | 18 | use OCP\Dashboard\Model\WidgetButton; |
|
21 | 23 | use OCP\IUserSession; |
22 | 24 | use OCP\Util; |
23 | 25 |
|
24 | | -class PendingSignaturesWidget implements IAPIWidgetV2, IButtonWidget { |
| 26 | +class PendingSignaturesWidget implements IAPIWidget, IAPIWidgetV2, IButtonWidget { |
25 | 27 | public function __construct( |
26 | 28 | private IL10N $l10n, |
27 | 29 | private IURLGenerator $urlGenerator, |
@@ -56,7 +58,16 @@ public function getOrder(): int { |
56 | 58 | * @inheritDoc |
57 | 59 | */ |
58 | 60 | public function getIconClass(): string { |
59 | | - return 'icon-libresign-dark'; |
| 61 | + return 'icon-libresign'; |
| 62 | + } |
| 63 | + |
| 64 | + /** |
| 65 | + * @inheritDoc |
| 66 | + */ |
| 67 | + public function getIconUrl(): string { |
| 68 | + return $this->urlGenerator->getAbsoluteURL( |
| 69 | + $this->urlGenerator->imagePath(Application::APP_ID, 'app-dark.svg') |
| 70 | + ); |
60 | 71 | } |
61 | 72 |
|
62 | 73 | /** |
@@ -104,7 +115,7 @@ public function getItemsV2(string $userId, ?string $since = null, int $limit = 7 |
104 | 115 | $item = new WidgetItem( |
105 | 116 | $this->getDocumentTitle($fileEntity), |
106 | 117 | $this->getSubtitle($signRequest, $fileEntity), |
107 | | - $this->urlGenerator->linkToRouteAbsolute('libresign.page.sign', ['uuid' => $signRequest->getUuid()]), |
| 118 | + $this->urlGenerator->linkToRouteAbsolute('libresign.page.signFPath', ['uuid' => $signRequest->getUuid(), 'path' => 'pdf']), |
108 | 119 | $this->urlGenerator->getAbsoluteURL( |
109 | 120 | $this->urlGenerator->imagePath('libresign', 'app-dark.svg') |
110 | 121 | ), |
|
0 commit comments