From c5c09c1e5017844027ef77785f2d0406fa6b7039 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Thu, 19 Dec 2019 18:08:21 +0100 Subject: fix deleted comment layout and its notification display --- .../app/shared/users/user-notification.model.ts | 1 + .../shared/users/user-notifications.component.html | 68 +++++++++++++++++----- .../shared/users/user-notifications.component.scss | 1 + client/src/app/shared/video/feed.component.html | 6 +- client/src/app/shared/video/feed.component.scss | 2 + 5 files changed, 63 insertions(+), 15 deletions(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/users/user-notification.model.ts b/client/src/app/shared/users/user-notification.model.ts index c3f4bf429..ba29cb462 100644 --- a/client/src/app/shared/users/user-notification.model.ts +++ b/client/src/app/shared/users/user-notification.model.ts @@ -102,6 +102,7 @@ export class UserNotification implements UserNotificationServer { case UserNotificationType.NEW_COMMENT_ON_MY_VIDEO: case UserNotificationType.COMMENT_MENTION: + if (!this.comment) break this.accountUrl = this.buildAccountUrl(this.comment.account) this.commentUrl = [ this.buildVideoUrl(this.comment.video), { threadId: this.comment.threadId } ] break diff --git a/client/src/app/shared/users/user-notifications.component.html b/client/src/app/shared/users/user-notifications.component.html index 9f0ae4337..108122b57 100644 --- a/client/src/app/shared/users/user-notifications.component.html +++ b/client/src/app/shared/users/user-notifications.component.html @@ -5,11 +5,25 @@ - - -
- {{ notification.video.channel.displayName }} published a new video: {{ notification.video.name }} -
+ + + + + + + +
+ {{ notification.video.channel.displayName }} published a new video: {{ notification.video.name }} +
+
+ + + + +
+ The notification concerns a video now unavailable +
+
@@ -45,11 +59,25 @@ - - - + + + + + + + + + + + + + +
+ The notification concerns a comment now unavailable +
+
@@ -80,12 +108,14 @@
- User {{ notification.account.name }} registered on your instance + User {{ notification.account.name }} registered on your instance
- + + +
{{ notification.actorFollow.follower.displayName }} is following @@ -96,7 +126,9 @@ - + + + + + + + +
+ The notification points to a content now unavailable +
+
-
{{ notification.createdAt | myFromNow }}
+
{{ notification.createdAt | myFromNow }}
diff --git a/client/src/app/shared/users/user-notifications.component.scss b/client/src/app/shared/users/user-notifications.component.scss index 0c6c70d98..59e1bcc26 100644 --- a/client/src/app/shared/users/user-notifications.component.scss +++ b/client/src/app/shared/users/user-notifications.component.scss @@ -48,5 +48,6 @@ padding-left: 5px; min-width: 70px; text-align: right; + margin-left: auto; } } diff --git a/client/src/app/shared/video/feed.component.html b/client/src/app/shared/video/feed.component.html index f7624ec01..ac0b1f454 100644 --- a/client/src/app/shared/video/feed.component.html +++ b/client/src/app/shared/video/feed.component.html @@ -1,4 +1,8 @@ -
+