Skip to content

Commit 17a7eaa

Browse files
committed
Add the icons for shipped apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent c3985ab commit 17a7eaa

File tree

6 files changed

+74
-12
lines changed

6 files changed

+74
-12
lines changed
Lines changed: 1 addition & 0 deletions
Loading

apps/files_external/lib/Settings/Section.php

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,21 @@
2424
namespace OCA\Files_External\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;
3235

33-
public function __construct(IL10N $l) {
36+
/**
37+
* @param IURLGenerator $url
38+
* @param IL10N $l
39+
*/
40+
public function __construct(IURLGenerator $url, IL10N $l) {
41+
$this->url = $url;
3442
$this->l = $l;
3543
}
3644

@@ -64,4 +72,11 @@ public function getName() {
6472
public function getPriority() {
6573
return 10;
6674
}
75+
76+
/**
77+
* {@inheritdoc}
78+
*/
79+
public function getIcon() {
80+
return $this->url->imagePath('files_external', 'app-dark.svg');
81+
}
6782
}

apps/theming/img/app-dark.svg

Lines changed: 1 addition & 0 deletions
Loading

apps/theming/lib/Settings/Section.php

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,21 @@
2424
namespace OCA\Theming\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;
3235

33-
public function __construct(IL10N $l) {
36+
/**
37+
* @param IURLGenerator $url
38+
* @param IL10N $l
39+
*/
40+
public function __construct(IURLGenerator $url, IL10N $l) {
41+
$this->url = $url;
3442
$this->l = $l;
3543
}
3644

@@ -64,4 +72,11 @@ public function getName() {
6472
public function getPriority() {
6573
return 30;
6674
}
75+
76+
/**
77+
* {@inheritdoc}
78+
*/
79+
public function getIcon() {
80+
return $this->url->imagePath('theming', 'app-dark.svg');
81+
}
6782
}

apps/user_ldap/lib/Settings/Section.php

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,21 @@
2424
namespace OCA\User_LDAP\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;
3235

33-
public function __construct(IL10N $l) {
36+
/**
37+
* @param IURLGenerator $url
38+
* @param IL10N $l
39+
*/
40+
public function __construct(IURLGenerator $url, IL10N $l) {
41+
$this->url = $url;
3442
$this->l = $l;
3543
}
3644

@@ -64,4 +72,11 @@ public function getName() {
6472
public function getPriority() {
6573
return 25;
6674
}
75+
76+
/**
77+
* {@inheritdoc}
78+
*/
79+
public function getIcon() {
80+
return $this->url->imagePath('user_ldap', 'app.svg');
81+
}
6782
}

apps/workflowengine/lib/Settings/Section.php

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,21 @@
2424
namespace OCA\WorkflowEngine\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;
3235

33-
public function __construct(IL10N $l) {
36+
/**
37+
* @param IURLGenerator $url
38+
* @param IL10N $l
39+
*/
40+
public function __construct(IURLGenerator $url, IL10N $l) {
41+
$this->url = $url;
3442
$this->l = $l;
3543
}
3644

@@ -54,4 +62,11 @@ public function getName() {
5462
public function getPriority() {
5563
return 55;
5664
}
65+
66+
/**
67+
* {@inheritdoc}
68+
*/
69+
public function getIcon() {
70+
return $this->url->imagePath('core', 'actions/tag.svg');
71+
}
5772
}

0 commit comments

Comments
 (0)