diff options
Diffstat (limited to 'client/src/app/+my-library')
15 files changed, 37 insertions, 28 deletions
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html index 89327b065..aa51764be 100644 --- a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html +++ b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html | |||
@@ -1,7 +1,7 @@ | |||
1 | <h1> | 1 | <h1> |
2 | <my-global-icon iconName="channel" aria-hidden="true"></my-global-icon> | 2 | <my-global-icon iconName="channel" aria-hidden="true"></my-global-icon> |
3 | <ng-container i18n>My channels</ng-container> | 3 | <ng-container i18n>My channels</ng-container> |
4 | <span class="badge badge-secondary">{{ totalItems }}</span> | 4 | <span *ngIf="totalItems" class="pt-badge badge-secondary">{{ totalItems }}</span> |
5 | </h1> | 5 | </h1> |
6 | 6 | ||
7 | <my-channels-setup-message [hideLink]="true"></my-channels-setup-message> | 7 | <my-channels-setup-message [hideLink]="true"></my-channels-setup-message> |
@@ -31,11 +31,13 @@ | |||
31 | i18n class="video-channel-followers" | 31 | i18n class="video-channel-followers" |
32 | [routerLink]="[ '/my-library', 'followers' ]" [queryParams]="{ search: 'channel:' + videoChannel.name }" | 32 | [routerLink]="[ '/my-library', 'followers' ]" [queryParams]="{ search: 'channel:' + videoChannel.name }" |
33 | > | 33 | > |
34 | {videoChannel.followersCount, plural, =1 {1 subscriber} other {{{ videoChannel.followersCount }} subscribers}} | 34 | {videoChannel.followersCount, plural, =0 {No subscribers} =1 {1 subscriber} other {{{ videoChannel.followersCount }} subscribers}} |
35 | </a> | 35 | </a> |
36 | 36 | ||
37 | <div i18n class="video-channel-videos">{videoChannel.videosCount, plural, =0 {No videos} =1 {1 video} other {{{ videoChannel.videosCount }} videos}}</div> | 37 | <div i18n class="video-channel-videos">{videoChannel.videosCount, plural, =0 {No videos} =1 {1 video} other {{{ videoChannel.videosCount }} videos}}</div> |
38 | 38 | ||
39 | <div i18n class="video-channel-views">{videoChannel.totalViews, plural, =0 {No views} =1 {1 view} other {{{ videoChannel.totalViews }} views}}</div> | ||
40 | |||
39 | <div class="video-channel-buttons"> | 41 | <div class="video-channel-buttons"> |
40 | <my-edit-button label [routerLink]="[ '/manage/update', videoChannel.nameWithHost ]"></my-edit-button> | 42 | <my-edit-button label [routerLink]="[ '/manage/update', videoChannel.nameWithHost ]"></my-edit-button> |
41 | <my-delete-button label (click)="deleteVideoChannel(videoChannel)"></my-delete-button> | 43 | <my-delete-button label (click)="deleteVideoChannel(videoChannel)"></my-delete-button> |
diff --git a/client/src/app/+my-library/my-follows/my-followers.component.html b/client/src/app/+my-library/my-follows/my-followers.component.html index a8a3da863..2827f8c41 100644 --- a/client/src/app/+my-library/my-follows/my-followers.component.html +++ b/client/src/app/+my-library/my-follows/my-followers.component.html | |||
@@ -2,7 +2,7 @@ | |||
2 | <span> | 2 | <span> |
3 | <my-global-icon iconName="follower" aria-hidden="true"></my-global-icon> | 3 | <my-global-icon iconName="follower" aria-hidden="true"></my-global-icon> |
4 | <ng-container i18n>My followers</ng-container> | 4 | <ng-container i18n>My followers</ng-container> |
5 | <span class="badge badge-secondary"> {{ pagination.totalItems }}</span> | 5 | <span *ngIf="pagination.totalItems" class="pt-badge badge-secondary"> {{ pagination.totalItems }}</span> |
6 | </span> | 6 | </span> |
7 | </h1> | 7 | </h1> |
8 | 8 | ||
diff --git a/client/src/app/+my-library/my-follows/my-subscriptions.component.html b/client/src/app/+my-library/my-follows/my-subscriptions.component.html index 391c4d3be..11d460b19 100644 --- a/client/src/app/+my-library/my-follows/my-subscriptions.component.html +++ b/client/src/app/+my-library/my-follows/my-subscriptions.component.html | |||
@@ -2,7 +2,7 @@ | |||
2 | <span> | 2 | <span> |
3 | <my-global-icon iconName="subscriptions" aria-hidden="true"></my-global-icon> | 3 | <my-global-icon iconName="subscriptions" aria-hidden="true"></my-global-icon> |
4 | <ng-container i18n>My subscriptions</ng-container> | 4 | <ng-container i18n>My subscriptions</ng-container> |
5 | <span class="badge badge-secondary"> {{ pagination.totalItems }}</span> | 5 | <span *ngIf="pagination.totalItems" class="pt-badge badge-secondary"> {{ pagination.totalItems }}</span> |
6 | </span> | 6 | </span> |
7 | </h1> | 7 | </h1> |
8 | 8 | ||
diff --git a/client/src/app/+my-library/my-history/my-history.component.html b/client/src/app/+my-library/my-history/my-history.component.html index 14bf01804..76367c029 100644 --- a/client/src/app/+my-library/my-history/my-history.component.html +++ b/client/src/app/+my-library/my-history/my-history.component.html | |||
@@ -1,6 +1,7 @@ | |||
1 | <h1> | 1 | <h1> |
2 | <my-global-icon iconName="history" aria-hidden="true"></my-global-icon> | 2 | <my-global-icon iconName="history" aria-hidden="true"></my-global-icon> |
3 | <ng-container i18n>My watch history</ng-container> <span class="badge badge-secondary">{{ pagination.totalItems }}</span> | 3 | <ng-container i18n>My watch history</ng-container> |
4 | <span *ngIf="pagination.totalItems" class="pt-badge badge-secondary">{{ pagination.totalItems }}</span> | ||
4 | </h1> | 5 | </h1> |
5 | 6 | ||
6 | <div class="top-buttons"> | 7 | <div class="top-buttons"> |
diff --git a/client/src/app/+my-library/my-history/my-history.component.ts b/client/src/app/+my-library/my-history/my-history.component.ts index f6b712908..766869637 100644 --- a/client/src/app/+my-library/my-history/my-history.component.ts +++ b/client/src/app/+my-library/my-history/my-history.component.ts | |||
@@ -93,8 +93,8 @@ export class MyHistoryComponent implements OnInit, DisableForReuseHook { | |||
93 | .subscribe({ | 93 | .subscribe({ |
94 | next: () => { | 94 | next: () => { |
95 | const message = this.videosHistoryEnabled === true | 95 | const message = this.videosHistoryEnabled === true |
96 | ? $localize`Videos history is enabled` | 96 | ? $localize`Video history is enabled` |
97 | : $localize`Videos history is disabled` | 97 | : $localize`Video history is disabled` |
98 | 98 | ||
99 | this.notifier.success(message) | 99 | this.notifier.success(message) |
100 | 100 | ||
@@ -117,8 +117,8 @@ export class MyHistoryComponent implements OnInit, DisableForReuseHook { | |||
117 | } | 117 | } |
118 | 118 | ||
119 | async clearAllHistory () { | 119 | async clearAllHistory () { |
120 | const title = $localize`Delete videos history` | 120 | const title = $localize`Delete video history` |
121 | const message = $localize`Are you sure you want to delete all your videos history?` | 121 | const message = $localize`Are you sure you want to delete all your video history?` |
122 | 122 | ||
123 | const res = await this.confirmService.confirm(message, title) | 123 | const res = await this.confirmService.confirm(message, title) |
124 | if (res !== true) return | 124 | if (res !== true) return |
@@ -126,7 +126,7 @@ export class MyHistoryComponent implements OnInit, DisableForReuseHook { | |||
126 | this.userHistoryService.clearAll() | 126 | this.userHistoryService.clearAll() |
127 | .subscribe({ | 127 | .subscribe({ |
128 | next: () => { | 128 | next: () => { |
129 | this.notifier.success($localize`Videos history deleted`) | 129 | this.notifier.success($localize`Video history deleted`) |
130 | 130 | ||
131 | this.reloadData() | 131 | this.reloadData() |
132 | }, | 132 | }, |
diff --git a/client/src/app/+my-library/my-library.component.html b/client/src/app/+my-library/my-library.component.html index b465d0156..1c44c8472 100644 --- a/client/src/app/+my-library/my-library.component.html +++ b/client/src/app/+my-library/my-library.component.html | |||
@@ -1,4 +1,4 @@ | |||
1 | <div class="row"> | 1 | <div class="root"> |
2 | <my-top-menu-dropdown [menuEntries]="menuEntries"></my-top-menu-dropdown> | 2 | <my-top-menu-dropdown [menuEntries]="menuEntries"></my-top-menu-dropdown> |
3 | 3 | ||
4 | <div class="margin-content pb-5" [ngClass]="{ 'offset-content': !isBroadcastMessageDisplayed }"> | 4 | <div class="margin-content pb-5" [ngClass]="{ 'offset-content': !isBroadcastMessageDisplayed }"> |
diff --git a/client/src/app/+my-library/my-library.component.scss b/client/src/app/+my-library/my-library.component.scss index 1ec25315a..6275b7ac2 100644 --- a/client/src/app/+my-library/my-library.component.scss +++ b/client/src/app/+my-library/my-library.component.scss | |||
@@ -1,7 +1,7 @@ | |||
1 | @use '_variables' as *; | 1 | @use '_variables' as *; |
2 | @use '_mixins' as *; | 2 | @use '_mixins' as *; |
3 | 3 | ||
4 | .row { | 4 | .root { |
5 | @include sub-menu-h1; | 5 | @include sub-menu-h1; |
6 | 6 | ||
7 | flex-direction: column; | 7 | flex-direction: column; |
diff --git a/client/src/app/+my-library/my-ownership/my-ownership.component.html b/client/src/app/+my-library/my-ownership/my-ownership.component.html index c29c71c0a..01470e46f 100644 --- a/client/src/app/+my-library/my-ownership/my-ownership.component.html +++ b/client/src/app/+my-library/my-ownership/my-ownership.component.html | |||
@@ -65,7 +65,7 @@ | |||
65 | <td>{{ videoChangeOwnership.createdAt | date: 'short' }}</td> | 65 | <td>{{ videoChangeOwnership.createdAt | date: 'short' }}</td> |
66 | 66 | ||
67 | <td> | 67 | <td> |
68 | <span class="badge" | 68 | <span class="pt-badge" |
69 | [ngClass]="getStatusClass(videoChangeOwnership.status)">{{ videoChangeOwnership.status }}</span> | 69 | [ngClass]="getStatusClass(videoChangeOwnership.status)">{{ videoChangeOwnership.status }}</span> |
70 | </td> | 70 | </td> |
71 | </tr> | 71 | </tr> |
diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.html b/client/src/app/+my-library/my-video-imports/my-video-imports.component.html index 1525d0bd1..79fb4da26 100644 --- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.html +++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.html | |||
@@ -50,7 +50,7 @@ | |||
50 | </td> | 50 | </td> |
51 | 51 | ||
52 | <td> | 52 | <td> |
53 | <span class="badge" [ngClass]="getVideoImportStateClass(videoImport.state.id)"> | 53 | <span class="pt-badge" [ngClass]="getVideoImportStateClass(videoImport.state.id)"> |
54 | {{ videoImport.state.label }} | 54 | {{ videoImport.state.label }} |
55 | </span> | 55 | </span> |
56 | </td> | 56 | </td> |
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.component.html b/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.component.html index c39e90a1e..35682cf81 100644 --- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.component.html +++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.component.html | |||
@@ -20,13 +20,13 @@ | |||
20 | 20 | ||
21 | <form role="form" (ngSubmit)="formValidated()" [formGroup]="form"> | 21 | <form role="form" (ngSubmit)="formValidated()" [formGroup]="form"> |
22 | 22 | ||
23 | <div class="form-row"> <!-- playlist grid --> | 23 | <div class="row"> <!-- playlist grid --> |
24 | <div class="form-group col-12 col-lg-4 col-xl-3"> | 24 | <div class="col-12 col-lg-4 col-xl-3"> |
25 | <div *ngIf="isCreation()" class="video-playlist-title" i18n>NEW PLAYLIST</div> | 25 | <div *ngIf="isCreation()" class="video-playlist-title" i18n>NEW PLAYLIST</div> |
26 | <div *ngIf="!isCreation() && videoPlaylistToUpdate" class="video-playlist-title" i18n>PLAYLIST</div> | 26 | <div *ngIf="!isCreation() && videoPlaylistToUpdate" class="video-playlist-title" i18n>PLAYLIST</div> |
27 | </div> | 27 | </div> |
28 | 28 | ||
29 | <div class="form-group col-12 col-lg-8 col-xl-9"> | 29 | <div class="col-12 col-lg-8 col-xl-9"> |
30 | 30 | ||
31 | <div class="col-md-12 col-xl-6"> | 31 | <div class="col-md-12 col-xl-6"> |
32 | <div class="form-group"> | 32 | <div class="form-group"> |
@@ -88,7 +88,7 @@ | |||
88 | </div> | 88 | </div> |
89 | </div> | 89 | </div> |
90 | 90 | ||
91 | <div class="form-row"> <!-- submit placement block --> | 91 | <div class="row"> <!-- submit placement block --> |
92 | <div class="col-md-7 col-xl-5"></div> | 92 | <div class="col-md-7 col-xl-5"></div> |
93 | <div class="col-md-5 col-xl-5 d-inline-flex"> | 93 | <div class="col-md-5 col-xl-5 d-inline-flex"> |
94 | <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid"> | 94 | <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid"> |
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html index 25b742bff..0091f70be 100644 --- a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html +++ b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.html | |||
@@ -1,6 +1,7 @@ | |||
1 | <h1> | 1 | <h1> |
2 | <my-global-icon iconName="playlists" aria-hidden="true"></my-global-icon> | 2 | <my-global-icon iconName="playlists" aria-hidden="true"></my-global-icon> |
3 | <ng-container i18n>My playlists</ng-container> <span class="badge badge-secondary">{{ pagination.totalItems }}</span> | 3 | <ng-container i18n>My playlists</ng-container> |
4 | <span *ngIf="pagination.totalItems" class="pt-badge badge-secondary">{{ pagination.totalItems }}</span> | ||
4 | </h1> | 5 | </h1> |
5 | 6 | ||
6 | <my-channels-setup-message></my-channels-setup-message> | 7 | <my-channels-setup-message></my-channels-setup-message> |
diff --git a/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.html b/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.html index 955fd4884..56ff0e788 100644 --- a/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.html +++ b/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.html | |||
@@ -17,7 +17,7 @@ | |||
17 | </div> | 17 | </div> |
18 | 18 | ||
19 | <div class="modal-footer"> | 19 | <div class="modal-footer"> |
20 | <div class="form-group inputs"> | 20 | <div class="inputs"> |
21 | <input | 21 | <input |
22 | type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button" | 22 | type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button" |
23 | (click)="dismiss()" (key.enter)="dismiss()" | 23 | (click)="dismiss()" (key.enter)="dismiss()" |
diff --git a/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.scss b/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.scss index 0eb694162..48c073192 100644 --- a/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.scss +++ b/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.scss | |||
@@ -4,7 +4,3 @@ | |||
4 | p-autocomplete { | 4 | p-autocomplete { |
5 | display: block; | 5 | display: block; |
6 | } | 6 | } |
7 | |||
8 | .form-group { | ||
9 | margin: 20px 0; | ||
10 | } | ||
diff --git a/client/src/app/+my-library/my-videos/my-videos.component.html b/client/src/app/+my-library/my-videos/my-videos.component.html index 7f12e2c71..146dcf41e 100644 --- a/client/src/app/+my-library/my-videos/my-videos.component.html +++ b/client/src/app/+my-library/my-videos/my-videos.component.html | |||
@@ -2,7 +2,7 @@ | |||
2 | <span> | 2 | <span> |
3 | <my-global-icon iconName="videos" aria-hidden="true"></my-global-icon> | 3 | <my-global-icon iconName="videos" aria-hidden="true"></my-global-icon> |
4 | <ng-container i18n>My videos</ng-container> | 4 | <ng-container i18n>My videos</ng-container> |
5 | <span class="badge badge-secondary"> {{ pagination.totalItems }}</span> | 5 | <span *ngIf="pagination.totalItems" class="pt-badge badge-secondary"> {{ pagination.totalItems }}</span> |
6 | </span> | 6 | </span> |
7 | 7 | ||
8 | <div> | 8 | <div> |
diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts index 91cc06702..2f1eb84ba 100644 --- a/client/src/app/+my-library/my-videos/my-videos.component.ts +++ b/client/src/app/+my-library/my-videos/my-videos.component.ts | |||
@@ -4,7 +4,7 @@ import { Component, OnInit, ViewChild } from '@angular/core' | |||
4 | import { ActivatedRoute, Router } from '@angular/router' | 4 | import { ActivatedRoute, Router } from '@angular/router' |
5 | import { AuthService, ComponentPagination, ConfirmService, Notifier, ScreenService, ServerService, User } from '@app/core' | 5 | import { AuthService, ComponentPagination, ConfirmService, Notifier, ScreenService, ServerService, User } from '@app/core' |
6 | import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' | 6 | import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' |
7 | import { immutableAssign } from '@app/helpers' | 7 | import { prepareIcu, immutableAssign } from '@app/helpers' |
8 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 8 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
9 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' | 9 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' |
10 | import { LiveStreamInformationComponent } from '@app/shared/shared-video-live' | 10 | import { LiveStreamInformationComponent } from '@app/shared/shared-video-live' |
@@ -167,7 +167,10 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { | |||
167 | .map(k => parseInt(k, 10)) | 167 | .map(k => parseInt(k, 10)) |
168 | 168 | ||
169 | const res = await this.confirmService.confirm( | 169 | const res = await this.confirmService.confirm( |
170 | $localize`Do you really want to delete ${toDeleteVideosIds.length} videos?`, | 170 | prepareIcu($localize`Do you really want to delete {length, plural, =1 {this video} other {{length} videos}}?`)( |
171 | { length: toDeleteVideosIds.length }, | ||
172 | $localize`Do you really want to delete ${toDeleteVideosIds.length} videos?` | ||
173 | ), | ||
171 | $localize`Delete` | 174 | $localize`Delete` |
172 | ) | 175 | ) |
173 | if (res === false) return | 176 | if (res === false) return |
@@ -184,7 +187,13 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { | |||
184 | .pipe(toArray()) | 187 | .pipe(toArray()) |
185 | .subscribe({ | 188 | .subscribe({ |
186 | next: () => { | 189 | next: () => { |
187 | this.notifier.success($localize`${toDeleteVideosIds.length} videos deleted.`) | 190 | this.notifier.success( |
191 | prepareIcu($localize`{length, plural, =1 {Video has been deleted} other {{length} videos have been deleted}}`)( | ||
192 | { length: toDeleteVideosIds.length }, | ||
193 | $localize`${toDeleteVideosIds.length} have been deleted.` | ||
194 | ) | ||
195 | ) | ||
196 | |||
188 | this.selection = {} | 197 | this.selection = {} |
189 | }, | 198 | }, |
190 | 199 | ||