aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-07-16 13:20:56 +0200
committerGitHub <noreply@github.com>2019-07-16 13:20:56 +0200
commit86a399d82b15dc7afe9f01c73b5d292f3a286522 (patch)
treea16eecfbe788850a21eed8c81334eba72f0c5bf0
parent84a1712d9991df554a190750edf6dd1bb5d912f2 (diff)
parent51517d3a36d6571cc7905632f6db1d4a8f3c4863 (diff)
downloadnextcloud-server-86a399d82b15dc7afe9f01c73b5d292f3a286522.tar.gz
nextcloud-server-86a399d82b15dc7afe9f01c73b5d292f3a286522.zip
Merge pull request #16417 from nextcloud/design/backupcodes-notification
Backupcodes notification design details
-rw-r--r--apps/twofactor_backupcodes/lib/Notifications/Notifier.php5
-rw-r--r--apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php2
2 files changed, 5 insertions, 2 deletions
diff --git a/apps/twofactor_backupcodes/lib/Notifications/Notifier.php b/apps/twofactor_backupcodes/lib/Notifications/Notifier.php
index df92c7a9e01..e4e2bcebb68 100644
--- a/apps/twofactor_backupcodes/lib/Notifications/Notifier.php
+++ b/apps/twofactor_backupcodes/lib/Notifications/Notifier.php
@@ -56,10 +56,13 @@ class Notifier implements INotifier {
$notification->setParsedSubject(
$l->t('Generate backup codes')
)->setParsedMessage(
- $l->t('You have enabled two-factor authentication but have not yet generated backup codes. Be sure to do this in case you lose access to your second factor.')
+ $l->t('You enabled two-factor authentication but did not generate backup codes yet. They are needed to restore access to your account in case you lose your second factor.')
);
$notification->setLink($this->url->linkToRouteAbsolute('settings.PersonalSettings.index', ['section' => 'security']));
+
+ $notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/password.svg')));
+
return $notification;
default:
diff --git a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
index 9a641eb9f85..0f03fba7de8 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
@@ -117,7 +117,7 @@ class NotifierTest extends TestCase {
->willReturnSelf();
$notification->expects($this->once())
->method('setParsedMessage')
- ->with('You have enabled two-factor authentication but have not yet generated backup codes. Be sure to do this in case you lose access to your second factor.')
+ ->with('You enabled two-factor authentication but did not generate backup codes yet. They are needed to restore access to your account in case you lose your second factor.')
->willReturnSelf();
$this->url->expects($this->once())