Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/firstrunwizard.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-12-17 15:32:23 +0300
committerJulius Härtl <jus@bitgrid.net>2019-12-18 15:28:43 +0300
commit856bbd1b4595fc7be3ffc3f593416f9c84135f93 (patch)
tree6006efa4b186872eef416d1779aecf9951521a5a
parent904cb40fb5c1a0f845215c63673e1138b3175b4d (diff)
Update recommended app notifications
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--img/apps/deck.svg6
-rw-r--r--img/apps/groupfolders.svg1
-rw-r--r--img/apps/notes.svg4
-rw-r--r--img/apps/social.svg1
-rw-r--r--img/apps/tasks.svg4
-rw-r--r--lib/Notification/AppHint.php17
-rw-r--r--lib/Notification/Notifier.php34
7 files changed, 56 insertions, 11 deletions
diff --git a/img/apps/deck.svg b/img/apps/deck.svg
new file mode 100644
index 00000000..32f6492d
--- /dev/null
+++ b/img/apps/deck.svg
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" viewBox="0 0 16 16">
+ <rect ry="1" height="8" width="14" y="7" x="1"/>
+ <rect ry=".5" height="1" width="12" y="5" x="2"/>
+ <rect ry=".5" height="1" width="10" y="3" x="3"/>
+ <rect ry=".5" height="1" width="8" y="1" x="4"/>
+</svg>
diff --git a/img/apps/groupfolders.svg b/img/apps/groupfolders.svg
new file mode 100644
index 00000000..714cfef1
--- /dev/null
+++ b/img/apps/groupfolders.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="32" width="32" viewbox="0 0 32 32"><path style="block-progression:tb;text-transform:none;text-indent:0" d="M9.24 6.67c-1.955 0-3.613 1.43-3.613 3.275.014.583.066 1.302.414 2.823v.037l.038.038c.112.32.275.503.49.753.215.25.47.544.715.79l.075.076c.048.21.107.436.15.64.117.54.105.922.076 1.053-.84.295-1.885.647-2.823 1.054-.526.228-1.002.433-1.392.677-.39.244-.777.43-.903.978a.473.473 0 0 0 0 .076c-.123 1.13-.31 2.793-.452 3.915a.618.618 0 0 0 .3.603c1.704.92 4.32 1.29 6.927 1.28 2.607-.01 5.202-.403 6.85-1.28a.618.618 0 0 0 .3-.603c-.044-.35-.1-1.14-.15-1.92-.05-.778-.09-1.543-.15-1.994a.607.607 0 0 0-.15-.3c-.524-.626-1.306-1.008-2.22-1.393-.836-.352-1.815-.717-2.786-1.13-.055-.12-.11-.473 0-1.016.03-.144.074-.3.113-.45l.263-.3c.216-.248.447-.506.64-.754.192-.25.35-.462.452-.753l.037-.038c.393-1.588.393-2.25.413-2.823v-.037c0-1.845-1.658-3.275-3.613-3.275zm10.336-3.005c-2.85 0-5.268 2.084-5.268 4.774.02.85.096 1.898.604 4.115v.055l.055.055c.162.466.4.733.713 1.097s.687.793 1.043 1.153c.04.042.068.068.11.11.07.306.155.636.22.932.168.788.15 1.346.11 1.537-1.226.43-2.75.942-4.117 1.536-.768.334-1.462.632-2.03.988-.57.356-1.134.625-1.317 1.427a.67.67 0 0 0 0 .11c-.18 1.648-.452 4.07-.66 5.707a.9.9 0 0 0 .44.878c2.48 1.34 6.295 1.88 10.096 1.865s7.584-.586 9.987-1.865a.9.9 0 0 0 .44-.878c-.067-.512-.148-1.665-.22-2.8-.072-1.133-.134-2.25-.22-2.907a.884.884 0 0 0-.22-.44c-.763-.91-1.903-1.468-3.237-2.03-1.217-.513-2.645-1.045-4.06-1.646-.08-.177-.16-.69 0-1.483.042-.212.108-.44.164-.658.133-.15.237-.272.384-.44.315-.36.652-.735.933-1.098.28-.362.51-.673.66-1.097l.053-.055c.574-2.315.574-3.28.604-4.116V8.44c0-2.69-2.418-4.775-5.268-4.775z" color="#000"/></svg>
diff --git a/img/apps/notes.svg b/img/apps/notes.svg
new file mode 100644
index 00000000..96f4ed26
--- /dev/null
+++ b/img/apps/notes.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.0" viewBox="0 0 32 32" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <path fill="#000" d="m6 2c-2.216 0-4 1.784-4 4v20c0 2.216 1.784 4 4 4h20c2.216 0 4-1.784 4-4v-16.719l-0.906 0.9068-5.282-5.2818 2.907-2.9062h-20.719zm15.812 4.9062l5.282 5.2818-8.313 8.312-8.781 3.5 3.5-8.781 8.312-8.3128zm-7.406 9.1878l-2.656 4.406 1.75 1.75 4.406-2.656-3.5-3.5z"/>
+</svg>
diff --git a/img/apps/social.svg b/img/apps/social.svg
new file mode 100644
index 00000000..e2797eab
--- /dev/null
+++ b/img/apps/social.svg
@@ -0,0 +1 @@
+<svg width="32" height="32" version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="m16 29-2.03-1.848c-7.21-6.538-11.97-10.864-11.97-16.142 0-4.326 3.388-7.7 7.7-7.7 2.436 0 4.774 1.134 6.3 2.912 1.526-1.778 3.864-2.912 6.3-2.912 4.312 0 7.7 3.374 7.7 7.7 0 5.278-4.76 9.604-11.97 16.142z" stroke-width="1.4"/></svg>
diff --git a/img/apps/tasks.svg b/img/apps/tasks.svg
new file mode 100644
index 00000000..27e5afae
--- /dev/null
+++ b/img/apps/tasks.svg
@@ -0,0 +1,4 @@
+<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
+<svg width="32px" height="32px" enable-background="new 0 0 32 32" version="1.1" viewBox="0 0 32 32" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
+<path d="m14.383 26.764s0.259-0.716 0.563-1.367c4.908-10.57 11.212-17.53 14.008-20.69 2.264-2.559 1.378-2.156 0.375-1.503-4.09 2.659-11.742 11.206-14.668 14.169-0.542 0.545-1.769 1.833-2.045 1.833-0.313 0-1.358-0.481-1.955-0.833-2.282-1.338-4.464-2.643-5.834-3.136-2.917-1.049-2.092-0.052-1.926 0.281 0.521 1.042 7.566 6.689 9.899 9.356 0.722 0.824 1.583 1.89 1.583 1.89z" fill="#000" stroke="#000" stroke-miterlimit="10" stroke-width=".75"/>
+</svg>
diff --git a/lib/Notification/AppHint.php b/lib/Notification/AppHint.php
index 01c2be88..db751388 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 @@ class AppHint {
}
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('tasks', $this->userId);
+ $this->sendNotification('deck', $this->userId);
+ $this->sendNotification('notes', $this->userId);
+ $this->sendNotification('social', $this->userId);
+ $this->sendNotification('groupfolders', $this->userId);
+ $this->config->setUserValue($this->userId, 'firstrunwizard', 'apphint', self::APP_HINT_VERSION);
}
}
@@ -78,7 +81,7 @@ class AppHint {
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 c72e8195..cf6a5deb 100644
--- a/lib/Notification/Notifier.php
+++ b/lib/Notification/Notifier.php
@@ -105,6 +105,11 @@ class Notifier implements INotifier {
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 @@ class Notifier implements INotifier {
$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