diff --git a/img/apps/calendar.svg b/img/apps/calendar.svg index 020ae8fe6..252efb5d6 100644 --- a/img/apps/calendar.svg +++ b/img/apps/calendar.svg @@ -1 +1 @@ - + diff --git a/img/apps/contacts.svg b/img/apps/contacts.svg index 5bc91dc59..9efcf39d7 100644 --- a/img/apps/contacts.svg +++ b/img/apps/contacts.svg @@ -1 +1 @@ - + diff --git a/img/apps/deck.svg b/img/apps/deck.svg new file mode 100644 index 000000000..1c62ddd94 --- /dev/null +++ b/img/apps/deck.svg @@ -0,0 +1 @@ + diff --git a/img/apps/groupfolders.svg b/img/apps/groupfolders.svg new file mode 100644 index 000000000..b0a143d06 --- /dev/null +++ b/img/apps/groupfolders.svg @@ -0,0 +1 @@ + diff --git a/img/apps/mail.svg b/img/apps/mail.svg index 57c5010b0..9fc08d96d 100644 --- a/img/apps/mail.svg +++ b/img/apps/mail.svg @@ -1,4 +1 @@ - - - - + diff --git a/img/apps/notes.svg b/img/apps/notes.svg new file mode 100644 index 000000000..5e754f5e4 --- /dev/null +++ b/img/apps/notes.svg @@ -0,0 +1 @@ + diff --git a/img/apps/social.svg b/img/apps/social.svg new file mode 100644 index 000000000..e2797eab8 --- /dev/null +++ b/img/apps/social.svg @@ -0,0 +1 @@ + diff --git a/img/apps/spreed.svg b/img/apps/spreed.svg index 3b0f0e64c..3e133d0a1 100644 --- a/img/apps/spreed.svg +++ b/img/apps/spreed.svg @@ -1 +1 @@ - + diff --git a/img/apps/tasks.svg b/img/apps/tasks.svg new file mode 100644 index 000000000..ae6f22a48 --- /dev/null +++ b/img/apps/tasks.svg @@ -0,0 +1,4 @@ + + + + diff --git a/lib/Notification/AppHint.php b/lib/Notification/AppHint.php index 01c2be88d..6e0351b26 100644 --- a/lib/Notification/AppHint.php +++ b/lib/Notification/AppHint.php @@ -50,6 +50,8 @@ class AppHint { /** @var string */ private $userId; + const APP_HINT_VERSION = '18'; + public function __construct(INotificationManager $notificationManager, IGroupManager $groupManager, IAppManager $appManager, IConfig $config, IEventDispatcher $eventDispatcher, $userId) { $this->notificationManager = $notificationManager; $this->groupManager = $groupManager; @@ -60,12 +62,13 @@ public function __construct(INotificationManager $notificationManager, IGroupMan } public function sendAppHintNotifications(): void { - if ($this->userId !== null && $this->groupManager->isAdmin($this->userId) && $this->config->getUserValue($this->userId, 'firstrunwizard', 'apphint') !== 'yes') { - $this->sendNotification('calendar', $this->userId); - $this->sendNotification('contacts', $this->userId); - $this->sendNotification('mail', $this->userId); - $this->sendNotification('spreed', $this->userId); - $this->config->setUserValue($this->userId, 'firstrunwizard', 'apphint', 'yes'); + if ($this->userId !== null && $this->groupManager->isAdmin($this->userId) && $this->config->getUserValue($this->userId, 'firstrunwizard', 'apphint') !== self::APP_HINT_VERSION) { + $this->sendNotification('groupfolders', $this->userId); + $this->sendNotification('social', $this->userId); + $this->sendNotification('notes', $this->userId); + $this->sendNotification('deck', $this->userId); + $this->sendNotification('tasks', $this->userId); + $this->config->setUserValue($this->userId, 'firstrunwizard', 'apphint', self::APP_HINT_VERSION); } } @@ -78,7 +81,7 @@ public function registerAppListener(): void { protected function sendNotification(string $app, string $user): void { $notification = $this->generateNotification($app, $user); if ( - $this->config->getUserValue($this->userId, 'firstrunwizard', 'apphint') !== 'yes' + $this->config->getUserValue($this->userId, 'firstrunwizard', 'apphint') !== self::APP_HINT_VERSION && $this->notificationManager->getCount($notification) === 0 && !$this->appManager->isEnabledForUser($app) ) { diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index c72e81950..cf6a5deb9 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -105,6 +105,11 @@ public function prepare(INotification $notification, string $languageCode): INot case 'apphint-contacts': case 'apphint-mail': case 'apphint-spreed': + case 'apphint-tasks': + case 'apphint-deck': + case 'apphint-notes': + case 'apphint-social': + case 'apphint-groupfolders': $app = $notification->getObjectId(); return $this->setAppHintDetails($notification, $languageCode, $app); default: @@ -166,10 +171,31 @@ protected function setAppHintDetails(INotification $notification, $languageCode, $notification->setParsedMessage($l->t('Simple email app nicely integrated with Files, Contacts and Calendar.')); $appLink = '/social/mail'; break; - case 'spreed': - $notification->setParsedSubject($l->t('App recommendation: Nextcloud Talk')); - $notification->setParsedMessage($l->t('Screensharing, online meetings and web conferencing – on desktop and with mobile apps.')); - $appLink = '/social/spreed'; + + case 'tasks': + $notification->setParsedSubject($l->t('App recommendation: Tasks')); + $notification->setParsedMessage($l->t('Sync tasks from various devices with your Nextcloud and edit them online.')); + $appLink = '/organization/tasks'; + break; + case 'deck': + $notification->setParsedSubject($l->t('App recommendation: Deck')); + $notification->setParsedMessage($l->t('Kanban style organization for personal planning and team projects.')); + $appLink = '/organization/deck'; + break; + case 'notes': + $notification->setParsedSubject($l->t('App recommendation: Notes')); + $notification->setParsedMessage($l->t('Distraction-free notes and writing.')); + $appLink = '/organization/notes'; + break; + case 'social': + $notification->setParsedSubject($l->t('App recommendation: Social')); + $notification->setParsedMessage($l->t('Nextcloud becomes part of the federated social networks.')); + $appLink = '/social/social'; + break; + case 'groupfolders': + $notification->setParsedSubject($l->t('App recommendation: Group folders')); + $notification->setParsedMessage($l->t('Admin-configured folders shared by everyone in a group.')); + $appLink = '/files/groupfolders'; break; } $notification