Skip to content

Commit 988b448

Browse files
authored
Merge pull request #80 from nextcloud/settings-icon
Add icon to admin page sidebar
2 parents 48df49f + 33653aa commit 988b448

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

img/app-dark.svg

Lines changed: 5 additions & 0 deletions
Loading

lib/Settings/AdminSection.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,19 @@
2424

2525

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

29-
class AdminSection implements ISection {
30+
class AdminSection implements IIconSection {
3031

3132
/** @var IL10N */
3233
private $l;
34+
/** @var IURLGenerator */
35+
private $url;
3336

34-
public function __construct(IL10N $l) {
37+
public function __construct(IL10N $l, IURLGenerator $url) {
3538
$this->l = $l;
39+
$this->url = $url;
3640
}
3741

3842
/**
@@ -65,4 +69,10 @@ public function getPriority() {
6569
return 0;
6670
}
6771

72+
/**
73+
* {@inheritdoc}
74+
*/
75+
public function getIcon() {
76+
return $this->url->imagePath('serverinfo', 'app-dark.svg');
77+
}
6878
}

0 commit comments

Comments
 (0)