WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 3382efd

Browse files
committed
Add icon to admin page sidebar
* follow up to nextcloud/server#3151 Signed-off-by: Morris Jobke <[email protected]>
1 parent f8c7afb commit 3382efd

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

img/app-dark.svg

Lines changed: 1 addition & 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
/**
@@ -63,4 +67,10 @@ public function getPriority() {
6367
return 80;
6468
}
6569

70+
/**
71+
* {@inheritdoc}
72+
*/
73+
public function getIcon() {
74+
return $this->url->imagePath('survey_client', 'app-dark.svg');
75+
}
6676
}

0 commit comments

Comments
 (0)