Skip to content

Commit 0d7e75f

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 99b1dfe commit 0d7e75f

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

img/app-dark.svg

Lines changed: 4 additions & 0 deletions
Loading

lib/Settings/Section.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,18 @@
2222
namespace OCA\LogReader\Settings;
2323

2424
use OCP\IL10N;
25-
use OCP\Settings\ISection;
25+
use OCP\IURLGenerator;
26+
use OCP\Settings\IIconSection;
2627

27-
class Section implements ISection {
28+
class Section implements IIconSection {
2829
/** @var IL10N */
2930
private $l;
31+
/** @var IURLGenerator */
32+
private $url;
3033

31-
public function __construct(IL10N $l) {
34+
public function __construct(IL10N $l, IURLGenerator $url) {
3235
$this->l = $l;
36+
$this->url = $url;
3337
}
3438

3539
/**
@@ -62,4 +66,11 @@ public function getName() {
6266
public function getPriority() {
6367
return 90;
6468
}
69+
70+
/**
71+
* {@inheritdoc}
72+
*/
73+
public function getIcon() {
74+
return $this->url->imagePath('logreader', 'app-dark.svg');
75+
}
6576
}

0 commit comments

Comments
 (0)