From 6d039ffba8a7e7e48d30998feeb804024dfcf9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 23 Nov 2022 13:38:31 +0100 Subject: [PATCH] MOBILE-4081 notifications: Change notification preferences layout --- scripts/langindex.json | 2 + src/addons/notifications/lang.json | 2 + .../pages/settings/settings.html | 62 +++++++++++-------- .../pages/settings/settings.scss | 4 ++ 4 files changed, 45 insertions(+), 25 deletions(-) diff --git a/scripts/langindex.json b/scripts/langindex.json index 65bdc325e..6d9c132b6 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -1095,12 +1095,14 @@ "addon.notes.publishstate": "notes", "addon.notes.sitenotes": "notes", "addon.notes.warningnotenotsent": "local_moodlemobileapp", + "addon.notifications.allownotifications": "local_moodlemobileapp", "addon.notifications.errorgetnotifications": "local_moodlemobileapp", "addon.notifications.markallread": "moodle", "addon.notifications.notificationpreferences": "message", "addon.notifications.notifications": "local_moodlemobileapp", "addon.notifications.playsound": "local_moodlemobileapp", "addon.notifications.therearentnotificationsyet": "local_moodlemobileapp", + "addon.notifications.typeofnotification": "local_moodlemobileapp", "addon.notifications.unreadnotification": "message", "addon.privatefiles.couldnotloadfiles": "local_moodlemobileapp", "addon.privatefiles.emptyfilelist": "local_moodlemobileapp", diff --git a/src/addons/notifications/lang.json b/src/addons/notifications/lang.json index b3c02b52e..200844392 100644 --- a/src/addons/notifications/lang.json +++ b/src/addons/notifications/lang.json @@ -1,9 +1,11 @@ { + "allownotifications": "Allow notifications", "errorgetnotifications": "Error getting notifications.", "markallread": "Mark all as read", "notificationpreferences": "Notification preferences", "notifications": "Notifications", "playsound": "Play sound", "therearentnotificationsyet": "There are no notifications.", + "typeofnotification": "Type of notification", "unreadnotification": "Unread notification: {{$a}}" } diff --git a/src/addons/notifications/pages/settings/settings.html b/src/addons/notifications/pages/settings/settings.html index 274953f0d..97174d554 100644 --- a/src/addons/notifications/pages/settings/settings.html +++ b/src/addons/notifications/pages/settings/settings.html @@ -24,38 +24,49 @@ - {{ 'addon.notifications.notifications' | translate }} - + +

{{ 'addon.notifications.allownotifications' | translate }}

+
+
- {{ 'addon.notifications.playsound' | translate }} - + +

{{ 'addon.notifications.playsound' | translate }}

+
+
- - - - {{ processor.displayname }} - - + + + +

{{ 'addon.notifications.typeofnotification' | translate }}

+
+ + + + {{ processor.displayname }} + + +
- - - + + + - - - + + + +
+ - + - + @@ -108,7 +119,9 @@ -

{{ notification.displayname }}

+ +

{{ notification.displayname }}

+
@@ -135,12 +148,12 @@ {{ 'core.settings.disabled' | translate }}
-
+
- + - +

{{ component.displayname }}

@@ -173,6 +186,5 @@ {{ 'core.settings.disabled' | translate }}
-
- +
diff --git a/src/addons/notifications/pages/settings/settings.scss b/src/addons/notifications/pages/settings/settings.scss index d224357cb..3a21dcc3f 100644 --- a/src/addons/notifications/pages/settings/settings.scss +++ b/src/addons/notifications/pages/settings/settings.scss @@ -1,3 +1,7 @@ .addon-notifications-table-content ion-row { min-height: 35px; } + +ion-item-divider, ion-card-header { + border-top: 1px solid var(--stroke); +}