From 722e94c0d016f65fe43d6fe4c1211955e2a08b4d Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 24 Jan 2017 12:01:34 -0600 Subject: [PATCH] Add icon to admin page sidebar * follow up to nextcloud/server#3151 Signed-off-by: Morris Jobke --- img/app-dark.svg | 4 ++++ img/app.svg | 3 +-- lib/Settings/Section.php | 20 ++++++++++++++------ 3 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 img/app-dark.svg diff --git a/img/app-dark.svg b/img/app-dark.svg new file mode 100644 index 0000000..6bd2478 --- /dev/null +++ b/img/app-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/img/app.svg b/img/app.svg index 5642ad9..15bc9e6 100644 --- a/img/app.svg +++ b/img/app.svg @@ -1,5 +1,4 @@ - - + diff --git a/lib/Settings/Section.php b/lib/Settings/Section.php index c31568b..7f6c218 100644 --- a/lib/Settings/Section.php +++ b/lib/Settings/Section.php @@ -24,17 +24,18 @@ namespace OCA\User_SAML\Settings; use OCP\IL10N; -use OCP\Settings\ISection; +use OCP\IURLGenerator; +use OCP\Settings\IIconSection; -class Section implements ISection { +class Section implements IIconSection { /** @var IL10N */ private $l; + /** @var IURLGenerator */ + private $url; - /** - * @param IL10N $l - */ - public function __construct(IL10N $l) { + public function __construct(IL10N $l, IURLGenerator $url) { $this->l = $l; + $this->url = $url; } /** @@ -57,4 +58,11 @@ class Section implements ISection { public function getPriority() { return 75; } + + /** + * {@inheritdoc} + */ + public function getIcon() { + return $this->url->imagePath('user_saml', 'app-dark.svg'); + } }