From 1808a1f8e4b7b102823492a2007a46929aebf189 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 22 Mar 2022 14:35:04 +0100 Subject: Add video edition finished notification --- .../my-account-notification-preferences.component.ts | 6 ++++-- .../app/shared/shared-main/users/user-notification.model.ts | 4 ++++ .../shared/shared-main/users/user-notifications.component.html | 10 +++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts index 09da979ab..187a3818a 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts @@ -44,7 +44,8 @@ export class MyAccountNotificationPreferencesComponent implements OnInit { abuseNewMessage: $localize`An abuse report received a new message`, abuseStateChange: $localize`One of your abuse reports has been accepted or rejected by moderators`, newPeerTubeVersion: $localize`A new PeerTube version is available`, - newPluginVersion: $localize`One of your plugin/theme has a new available version` + newPluginVersion: $localize`One of your plugin/theme has a new available version`, + myVideoEditionFinished: $localize`Video edition finished` } this.notificationSettingGroups = [ { @@ -62,7 +63,8 @@ export class MyAccountNotificationPreferencesComponent implements OnInit { 'newCommentOnMyVideo', 'blacklistOnMyVideo', 'myVideoPublished', - 'myVideoImportFinished' + 'myVideoImportFinished', + 'myVideoEditionFinished' ] }, diff --git a/client/src/app/shared/shared-main/users/user-notification.model.ts b/client/src/app/shared/shared-main/users/user-notification.model.ts index 1eb69d5a2..d1b36f347 100644 --- a/client/src/app/shared/shared-main/users/user-notification.model.ts +++ b/client/src/app/shared/shared-main/users/user-notification.model.ts @@ -227,6 +227,10 @@ export class UserNotification implements UserNotificationServer { this.pluginUrl = `/admin/plugins/list-installed` this.pluginQueryParams.pluginType = this.plugin.type + '' break + + case UserNotificationType.MY_VIDEO_EDITION_FINISHED: + this.videoUrl = this.buildVideoUrl(this.video) + break } } catch (err) { this.type = null diff --git a/client/src/app/shared/shared-main/users/user-notifications.component.html b/client/src/app/shared/shared-main/users/user-notifications.component.html index 9af6da784..ff1259fb8 100644 --- a/client/src/app/shared/shared-main/users/user-notifications.component.html +++ b/client/src/app/shared/shared-main/users/user-notifications.component.html @@ -203,7 +203,15 @@
- A new version of PeerTube is available: {{ notification.peertube.latestVersion }} + A new version of PeerTube is available: {{ notification.peertube.latestVersion }} +
+ + + + + +
+ Your video {{ notification.video.name }} edition has finished
-- cgit v1.2.3