Skip to content

Commit 18d3498

Browse files
committed
Add icon to admin page sidebar
* follow up to nextcloud/server#3151 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
1 parent f1b886e commit 18d3498

3 files changed

Lines changed: 21 additions & 4 deletions

File tree

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<category>office</category>
1313
<category>integration</category>
1414
<dependencies>
15-
<nextcloud min-version="11" max-version="11" />
15+
<nextcloud min-version="12" max-version="12" />
1616
</dependencies>
1717
<documentation>
1818
<admin>https://nextcloud.com/collaboraonline/</admin>

img/app-dark.svg

Lines changed: 4 additions & 0 deletions
Loading

lib/Settings/Section.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,22 @@
2424
namespace OCA\Richdocuments\Settings;
2525

2626
use OCP\IL10N;
27-
use OCP\Settings\ISection;
27+
use OCP\IURLGenerator;
28+
use OCP\Settings\IIconSection;
2829

29-
class Section implements ISection {
30+
class Section implements IIconSection {
3031
/** @var IL10N */
3132
private $l;
33+
/** @var IURLGenerator */
34+
private $url;
35+
3236
/**
3337
* @param IL10N $l
38+
* @param IURLGenerator $url
3439
*/
35-
public function __construct(IL10N $l) {
40+
public function __construct(IL10N $l, IURLGenerator $url) {
3641
$this->l = $l;
42+
$this->url = $url;
3743
}
3844
/**
3945
* {@inheritdoc}
@@ -53,4 +59,11 @@ public function getName() {
5359
public function getPriority() {
5460
return 75;
5561
}
62+
63+
/**
64+
* {@inheritdoc}
65+
*/
66+
public function getIcon() {
67+
return $this->url->imagePath('richdocuments', 'app-dark.svg');
68+
}
5669
}

0 commit comments

Comments
 (0)