Merge pull request #1622 from nextcloud/activity-sidebar-icons

Add icons to activity navigation
This commit is contained in:
Joas Schilling 2016-10-05 13:16:22 +02:00 committed by GitHub
commit 3f48cb8bfb
7 changed files with 16 additions and 3 deletions

View File

@ -247,14 +247,15 @@ class Extension implements IExtension {
public function getNavigation() { public function getNavigation() {
$l = $this->getL10N(); $l = $this->getL10N();
return [ return [
'apps' => [], 'apps' => [
'top' => [
self::APP_NAME => [ self::APP_NAME => [
'id' => self::APP_NAME, 'id' => self::APP_NAME,
'icon' => 'icon-comment',
'name' => (string) $l->t('Comments'), 'name' => (string) $l->t('Comments'),
'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::APP_NAME]), 'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::APP_NAME]),
], ],
], ],
'top' => [],
]; ];
} }

View File

@ -306,6 +306,7 @@ class Activity implements IExtension {
'top' => [ 'top' => [
self::FILTER_FAVORITES => [ self::FILTER_FAVORITES => [
'id' => self::FILTER_FAVORITES, 'id' => self::FILTER_FAVORITES,
'icon' => 'icon-favorite',
'name' => (string) $this->l->t('Favorites'), 'name' => (string) $this->l->t('Favorites'),
'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::FILTER_FAVORITES]), 'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::FILTER_FAVORITES]),
], ],
@ -313,6 +314,7 @@ class Activity implements IExtension {
'apps' => [ 'apps' => [
self::FILTER_FILES => [ self::FILTER_FILES => [
'id' => self::FILTER_FILES, 'id' => self::FILTER_FILES,
'icon' => 'icon-files-dark',
'name' => (string) $this->l->t('Files'), 'name' => (string) $this->l->t('Files'),
'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::FILTER_FILES]), 'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::FILTER_FILES]),
], ],

View File

@ -429,6 +429,7 @@ class Activity implements IExtension {
'top' => [ 'top' => [
self::FILTER_SHARES => [ self::FILTER_SHARES => [
'id' => self::FILTER_SHARES, 'id' => self::FILTER_SHARES,
'icon' => 'icon-share',
'name' => (string) $l->t('Shares'), 'name' => (string) $l->t('Shares'),
'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::FILTER_SHARES]), 'url' => $this->URLGenerator->linkToRoute('activity.Activities.showList', ['filter' => self::FILTER_SHARES]),
], ],

View File

@ -98,7 +98,7 @@ class Extension implements IExtension {
public function getTypeIcon($type) { public function getTypeIcon($type) {
switch ($type) { switch ($type) {
case self::APP_NAME: case self::APP_NAME:
return false; return 'icon-tag';
} }
return false; return false;

View File

@ -282,6 +282,10 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading-
background-image: url('../img/actions/sound-off.svg?v=1'); background-image: url('../img/actions/sound-off.svg?v=1');
} }
.icon-favorite {
background-image: url('../img/actions/star-dark.svg?v=1');
}
.icon-star, .icon-star,
.icon-starred:hover, .icon-starred:hover,
.icon-starred:focus { .icon-starred:focus {
@ -365,6 +369,9 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading-
.icon-files { .icon-files {
background-image: url('../img/places/files.svg?v=1'); background-image: url('../img/places/files.svg?v=1');
} }
.icon-files-dark {
background-image: url('../img/places/files-dark.svg?v=1');
}
.icon-file, .icon-file,
.icon-filetype-text { .icon-filetype-text {
background-image: url('../img/filetypes/text.svg?v=1'); background-image: url('../img/filetypes/text.svg?v=1');

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22"><path d="M11.017.06l2.946 7.384L22 8.077l-6.11 5.082L17.77 21l-6.72-4.242-6.876 4.213 1.957-7.703L0 8.03l7.932-.52z"/></svg>

After

Width:  |  Height:  |  Size: 188 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="32" width="32"><path d="M2.917 5.015c-.5 0-.92.42-.92.92v22.16c0 .516.402.92.92.92h26.157a.91.91 0 0 0 .92-.92V9.938c0-.5-.418-.926-.92-.926H15.997l-4-4z" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 230 B