Merge pull request #13794 from nextcloud/backport/13742/stable15
[stable15] Add icon to restore activity
This commit is contained in:
commit
07ded47c22
|
@ -106,6 +106,7 @@ class FavoriteProvider implements IProvider {
|
|||
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/starred.svg')));
|
||||
}
|
||||
} else if ($event->getSubject() === self::SUBJECT_REMOVED) {
|
||||
$event->setType('unfavorite');
|
||||
$event->setParsedSubject($this->l->t('Removed from favorites'));
|
||||
if ($this->activityManager->getRequirePNG()) {
|
||||
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/star.png')));
|
||||
|
@ -136,6 +137,7 @@ class FavoriteProvider implements IProvider {
|
|||
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/starred.svg')));
|
||||
}
|
||||
} else if ($event->getSubject() === self::SUBJECT_REMOVED) {
|
||||
$event->setType('unfavorite');
|
||||
$subject = $this->l->t('You removed {file} from your favorites');
|
||||
if ($this->activityManager->getRequirePNG()) {
|
||||
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/star.png')));
|
||||
|
|
|
@ -113,11 +113,11 @@ class Provider implements IProvider {
|
|||
return $this->parseLongVersion($event, $previousEvent);
|
||||
}
|
||||
|
||||
protected function setIcon(IEvent $event, $icon) {
|
||||
protected function setIcon(IEvent $event, string $icon, string $app = 'files') {
|
||||
if ($this->activityManager->getRequirePNG()) {
|
||||
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('files', $icon . '.png')));
|
||||
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath($app, $icon . '.png')));
|
||||
} else {
|
||||
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('files', $icon . '.svg')));
|
||||
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath($app, $icon . '.svg')));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,6 +142,7 @@ class Provider implements IProvider {
|
|||
$this->setIcon($event, 'delete-color');
|
||||
} else if ($event->getSubject() === 'restored_by') {
|
||||
$subject = $this->l->t('Restored by {user}');
|
||||
$this->setIcon($event, 'actions/history', 'core');
|
||||
} else if ($event->getSubject() === 'renamed_by') {
|
||||
$subject = $this->l->t('Renamed by {user}');
|
||||
$this->setIcon($event, 'change');
|
||||
|
@ -214,8 +215,10 @@ class Provider implements IProvider {
|
|||
$this->setIcon($event, 'delete-color');
|
||||
} else if ($event->getSubject() === 'restored_self') {
|
||||
$subject = $this->l->t('You restored {file}');
|
||||
$this->setIcon($event, 'actions/history', 'core');
|
||||
} else if ($event->getSubject() === 'restored_by') {
|
||||
$subject = $this->l->t('{user} restored {file}');
|
||||
$this->setIcon($event, 'actions/history', 'core');
|
||||
} else if ($event->getSubject() === 'renamed_self') {
|
||||
$subject = $this->l->t('You renamed {oldfile} to {newfile}');
|
||||
$this->setIcon($event, 'change');
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 358 B |
Loading…
Reference in New Issue