From 8ce1ba6e3efe0a688d6a0b57e8201cde33ad7aac Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 9 Apr 2019 10:42:07 +0200 Subject: Add new instance follower notification in client --- .../my-account-notification-preferences.component.html | 8 ++++---- client/src/app/shared/images/global-icon.component.ts | 3 ++- client/src/app/shared/users/user-notification.model.ts | 5 +++++ client/src/app/shared/users/user-notifications.component.html | 9 +++++++++ 4 files changed, 20 insertions(+), 5 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.html b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.html index 59422d682..93e294a96 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.html @@ -4,8 +4,8 @@
Email
-
- + +
{{ labelNotifications[notificationType] }}
@@ -15,5 +15,5 @@
- -
+
+
diff --git a/client/src/app/shared/images/global-icon.component.ts b/client/src/app/shared/images/global-icon.component.ts index d85f269ea..bd5b11bb0 100644 --- a/client/src/app/shared/images/global-icon.component.ts +++ b/client/src/app/shared/images/global-icon.component.ts @@ -43,7 +43,8 @@ const icons = { 'videos': require('../../../assets/images/global/videos.html'), 'folder': require('../../../assets/images/global/folder.html'), 'administration': require('../../../assets/images/menu/administration.html'), - 'subscriptions': require('../../../assets/images/menu/subscriptions.html') + 'subscriptions': require('../../../assets/images/menu/subscriptions.html'), + 'users': require('../../../assets/images/global/users.html') } export type GlobalIconName = keyof typeof icons diff --git a/client/src/app/shared/users/user-notification.model.ts b/client/src/app/shared/users/user-notification.model.ts index 76b983152..72fc3e7b4 100644 --- a/client/src/app/shared/users/user-notification.model.ts +++ b/client/src/app/shared/users/user-notification.model.ts @@ -59,6 +59,7 @@ export class UserNotification implements UserNotificationServer { accountUrl?: string videoImportIdentifier?: string videoImportUrl?: string + instanceFollowUrl?: string constructor (hash: UserNotificationServer) { this.id = hash.id @@ -141,6 +142,10 @@ export class UserNotification implements UserNotificationServer { case UserNotificationType.NEW_FOLLOW: this.accountUrl = this.buildAccountUrl(this.actorFollow.follower) break + + case UserNotificationType.NEW_INSTANCE_FOLLOWER: + this.instanceFollowUrl = '/admin/follows/followers-list' + break } } catch (err) { console.error(err) diff --git a/client/src/app/shared/users/user-notifications.component.html b/client/src/app/shared/users/user-notifications.component.html index 6d2f2750e..d27f60158 100644 --- a/client/src/app/shared/users/user-notifications.component.html +++ b/client/src/app/shared/users/user-notifications.component.html @@ -102,6 +102,15 @@ {{ notification.comment.account.displayName }} mentioned you on video {{ notification.comment.video.name }}
+ + + + +
+ Your instance has a new follower + awaiting your approval +
+
{{ notification.createdAt | myFromNow }}
-- cgit v1.2.3