diff options
Diffstat (limited to 'client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts index ba95b6c8b..1e569c0b6 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts | |||
@@ -3,7 +3,6 @@ import { debounceTime, mergeMap } from 'rxjs/operators' | |||
3 | import { Component, OnInit } from '@angular/core' | 3 | import { Component, OnInit } from '@angular/core' |
4 | import { AuthService, ComponentPagination, ConfirmService, Notifier, User } from '@app/core' | 4 | import { AuthService, ComponentPagination, ConfirmService, Notifier, User } from '@app/core' |
5 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' | 5 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' |
6 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
7 | import { VideoPlaylistType } from '@shared/models' | 6 | import { VideoPlaylistType } from '@shared/models' |
8 | 7 | ||
9 | @Component({ | 8 | @Component({ |
@@ -30,9 +29,8 @@ export class MyAccountVideoPlaylistsComponent implements OnInit { | |||
30 | private authService: AuthService, | 29 | private authService: AuthService, |
31 | private notifier: Notifier, | 30 | private notifier: Notifier, |
32 | private confirmService: ConfirmService, | 31 | private confirmService: ConfirmService, |
33 | private videoPlaylistService: VideoPlaylistService, | 32 | private videoPlaylistService: VideoPlaylistService |
34 | private i18n: I18n | 33 | ) {} |
35 | ) {} | ||
36 | 34 | ||
37 | ngOnInit () { | 35 | ngOnInit () { |
38 | this.user = this.authService.getUser() | 36 | this.user = this.authService.getUser() |
@@ -49,11 +47,8 @@ export class MyAccountVideoPlaylistsComponent implements OnInit { | |||
49 | 47 | ||
50 | async deleteVideoPlaylist (videoPlaylist: VideoPlaylist) { | 48 | async deleteVideoPlaylist (videoPlaylist: VideoPlaylist) { |
51 | const res = await this.confirmService.confirm( | 49 | const res = await this.confirmService.confirm( |
52 | this.i18n( | 50 | $localize`Do you really want to delete ${videoPlaylist.displayName}?`, |
53 | 'Do you really want to delete {{playlistDisplayName}}?', | 51 | $localize`Delete` |
54 | { playlistDisplayName: videoPlaylist.displayName } | ||
55 | ), | ||
56 | this.i18n('Delete') | ||
57 | ) | 52 | ) |
58 | if (res === false) return | 53 | if (res === false) return |
59 | 54 | ||
@@ -63,9 +58,7 @@ export class MyAccountVideoPlaylistsComponent implements OnInit { | |||
63 | this.videoPlaylists = this.videoPlaylists | 58 | this.videoPlaylists = this.videoPlaylists |
64 | .filter(p => p.id !== videoPlaylist.id) | 59 | .filter(p => p.id !== videoPlaylist.id) |
65 | 60 | ||
66 | this.notifier.success( | 61 | this.notifier.success($localize`Playlist ${videoPlaylist.displayName}} deleted.`) |
67 | this.i18n('Playlist {{playlistDisplayName}} deleted.', { playlistDisplayName: videoPlaylist.displayName }) | ||
68 | ) | ||
69 | }, | 62 | }, |
70 | 63 | ||
71 | error => this.notifier.error(error.message) | 64 | error => this.notifier.error(error.message) |