From ddb83e49ece4e76df1af98aeea30c1d8d133f48c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 5 Dec 2018 14:21:10 +0100 Subject: My account menu -> open entries on hover --- .../src/app/+my-account/my-account.component.html | 37 +-------- .../src/app/+my-account/my-account.component.scss | 15 +--- client/src/app/+my-account/my-account.component.ts | 97 ++++++++++++---------- 3 files changed, 57 insertions(+), 92 deletions(-) (limited to 'client/src/app/+my-account') diff --git a/client/src/app/+my-account/my-account.component.html b/client/src/app/+my-account/my-account.component.html index 41333c25a..3999252be 100644 --- a/client/src/app/+my-account/my-account.component.html +++ b/client/src/app/+my-account/my-account.component.html @@ -1,40 +1,5 @@
- +
diff --git a/client/src/app/+my-account/my-account.component.scss b/client/src/app/+my-account/my-account.component.scss index 6243c6dcf..4f111efdf 100644 --- a/client/src/app/+my-account/my-account.component.scss +++ b/client/src/app/+my-account/my-account.component.scss @@ -1,14 +1,3 @@ -.my-library, .misc { - span[role=button] { - cursor: pointer; - } - - a { - display: block; - } +.row { + flex-direction: column; } - -/deep/ .dropdown-toggle::after { - position: relative; - top: 2px; -} \ No newline at end of file diff --git a/client/src/app/+my-account/my-account.component.ts b/client/src/app/+my-account/my-account.component.ts index d728caf07..d9381ebfa 100644 --- a/client/src/app/+my-account/my-account.component.ts +++ b/client/src/app/+my-account/my-account.component.ts @@ -1,38 +1,72 @@ -import { Component, OnDestroy, OnInit } from '@angular/core' +import { Component } from '@angular/core' import { ServerService } from '@app/core' -import { NavigationStart, Router } from '@angular/router' -import { filter } from 'rxjs/operators' import { I18n } from '@ngx-translate/i18n-polyfill' -import { Subscription } from 'rxjs' +import { TopMenuDropdownParam } from '@app/shared/menu/top-menu-dropdown.component' @Component({ selector: 'my-my-account', templateUrl: './my-account.component.html', styleUrls: [ './my-account.component.scss' ] }) -export class MyAccountComponent implements OnInit, OnDestroy { - - libraryLabel = '' - miscLabel = '' - - private routeSub: Subscription +export class MyAccountComponent { + menuEntries: TopMenuDropdownParam[] = [] constructor ( private serverService: ServerService, - private router: Router, private i18n: I18n - ) {} + ) { + + const libraryEntries: TopMenuDropdownParam = { + label: this.i18n('My library'), + children: [ + { + label: this.i18n('My channels'), + routerLink: '/my-account/videos' + }, + { + label: this.i18n('My videos'), + routerLink: '/my-account/videos' + }, + { + label: this.i18n('My subscriptions'), + routerLink: '/my-account/subscriptions' + } + ] + } - ngOnInit () { - this.updateLabels(this.router.url) + if (this.isVideoImportEnabled()) { + libraryEntries.children.push({ + label: 'My imports', + routerLink: '/my-account/video-imports' + }) + } - this.routeSub = this.router.events - .pipe(filter(event => event instanceof NavigationStart)) - .subscribe((event: NavigationStart) => this.updateLabels(event.url)) - } + const miscEntries: TopMenuDropdownParam = { + label: this.i18n('Misc'), + children: [ + { + label: this.i18n('Muted accounts'), + routerLink: '/my-account/blocklist/accounts' + }, + { + label: this.i18n('Muted instances'), + routerLink: '/my-account/blocklist/servers' + }, + { + label: this.i18n('Ownership changes'), + routerLink: '/my-account/ownership' + } + ] + } - ngOnDestroy () { - if (this.routeSub) this.routeSub.unsubscribe() + this.menuEntries = [ + { + label: this.i18n('My settings'), + routerLink: '/my-account/settings' + }, + libraryEntries, + miscEntries + ] } isVideoImportEnabled () { @@ -41,27 +75,4 @@ export class MyAccountComponent implements OnInit, OnDestroy { return importConfig.http.enabled || importConfig.torrent.enabled } - private updateLabels (url: string) { - const [ path ] = url.split('?') - - if (path.startsWith('/my-account/video-channels')) { - this.libraryLabel = this.i18n('Channels') - } else if (path.startsWith('/my-account/videos')) { - this.libraryLabel = this.i18n('Videos') - } else if (path.startsWith('/my-account/subscriptions')) { - this.libraryLabel = this.i18n('Subscriptions') - } else if (path.startsWith('/my-account/video-imports')) { - this.libraryLabel = this.i18n('Video imports') - } else { - this.libraryLabel = '' - } - - if (path.startsWith('/my-account/blocklist/accounts')) { - this.miscLabel = this.i18n('Muted accounts') - } else if (path.startsWith('/my-account/blocklist/servers')) { - this.miscLabel = this.i18n('Muted instances') - } else { - this.miscLabel = '' - } - } } -- cgit v1.2.3 From 80bfd33c0bf910e2cfdd3270b14ba9eddd90e2e8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 18 Dec 2018 09:31:09 +0100 Subject: Add history page on client --- .../my-account-history.component.html | 15 +++++ .../my-account-history.component.scss | 68 ++++++++++++++++++++++ .../my-account-history.component.ts | 66 +++++++++++++++++++++ .../app/+my-account/my-account-routing.module.ts | 10 ++++ .../my-account-videos.component.scss | 2 +- client/src/app/+my-account/my-account.component.ts | 6 +- client/src/app/+my-account/my-account.module.ts | 4 +- 7 files changed, 168 insertions(+), 3 deletions(-) create mode 100644 client/src/app/+my-account/my-account-history/my-account-history.component.html create mode 100644 client/src/app/+my-account/my-account-history/my-account-history.component.scss create mode 100644 client/src/app/+my-account/my-account-history/my-account-history.component.ts (limited to 'client/src/app/+my-account') diff --git a/client/src/app/+my-account/my-account-history/my-account-history.component.html b/client/src/app/+my-account/my-account-history/my-account-history.component.html new file mode 100644 index 000000000..653b33f89 --- /dev/null +++ b/client/src/app/+my-account/my-account-history/my-account-history.component.html @@ -0,0 +1,15 @@ +
You don't have history yet.
+ +
+
+
+ + +
+ {{ video.name }} + {{ video.views | myNumberFormatter }} views + +
+
+
+
diff --git a/client/src/app/+my-account/my-account-history/my-account-history.component.scss b/client/src/app/+my-account/my-account-history/my-account-history.component.scss new file mode 100644 index 000000000..115bb0e5c --- /dev/null +++ b/client/src/app/+my-account/my-account-history/my-account-history.component.scss @@ -0,0 +1,68 @@ +@import '_variables'; +@import '_mixins'; + +.video { + @include row-blocks; + + my-video-thumbnail { + margin-right: 10px; + } + + .video-info { + flex-grow: 1; + + .video-info-name { + @include disable-default-a-behaviour; + + color: var(--mainForegroundColor); + display: block; + width: fit-content; + font-size: 18px; + font-weight: $font-semibold; + } + + .video-info-date-views { + font-size: 14px; + } + + .video-info-account { + @include disable-default-a-behaviour; + + display: block; + width: fit-content; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 14px; + color: #585858; + + &:hover { + color: #303030; + } + } + } +} + +@media screen and (max-width: $small-view) { + .video { + flex-direction: column; + height: auto; + text-align: center; + + .video-info-name { + margin: auto; + } + + input[type=checkbox] { + display: none; + } + + my-video-thumbnail { + margin-right: 0; + } + + .video-buttons { + margin-top: 10px; + } + } +} diff --git a/client/src/app/+my-account/my-account-history/my-account-history.component.ts b/client/src/app/+my-account/my-account-history/my-account-history.component.ts new file mode 100644 index 000000000..508552167 --- /dev/null +++ b/client/src/app/+my-account/my-account-history/my-account-history.component.ts @@ -0,0 +1,66 @@ +import { Component, OnDestroy, OnInit } from '@angular/core' +import { ActivatedRoute, Router } from '@angular/router' +import { Location } from '@angular/common' +import { immutableAssign } from '@app/shared/misc/utils' +import { ComponentPagination } from '@app/shared/rest/component-pagination.model' +import { NotificationsService } from 'angular2-notifications' +import { AuthService } from '../../core/auth' +import { ConfirmService } from '../../core/confirm' +import { AbstractVideoList } from '../../shared/video/abstract-video-list' +import { VideoService } from '../../shared/video/video.service' +import { I18n } from '@ngx-translate/i18n-polyfill' +import { ScreenService } from '@app/shared/misc/screen.service' +import { UserHistoryService } from '@app/shared/users/user-history.service' + +@Component({ + selector: 'my-account-history', + templateUrl: './my-account-history.component.html', + styleUrls: [ './my-account-history.component.scss' ] +}) +export class MyAccountHistoryComponent extends AbstractVideoList implements OnInit, OnDestroy { + titlePage: string + currentRoute = '/my-account/history/videos' + pagination: ComponentPagination = { + currentPage: 1, + itemsPerPage: 5, + totalItems: null + } + + protected baseVideoWidth = -1 + protected baseVideoHeight = 155 + + constructor ( + protected router: Router, + protected route: ActivatedRoute, + protected authService: AuthService, + protected notificationsService: NotificationsService, + protected location: Location, + protected screenService: ScreenService, + protected i18n: I18n, + private confirmService: ConfirmService, + private videoService: VideoService, + private userHistoryService: UserHistoryService + ) { + super() + + this.titlePage = this.i18n('My videos history') + } + + ngOnInit () { + super.ngOnInit() + } + + ngOnDestroy () { + super.ngOnDestroy() + } + + getVideosObservable (page: number) { + const newPagination = immutableAssign(this.pagination, { currentPage: page }) + + return this.userHistoryService.getUserVideosHistory(newPagination) + } + + generateSyndicationList () { + throw new Error('Method not implemented.') + } +} diff --git a/client/src/app/+my-account/my-account-routing.module.ts b/client/src/app/+my-account/my-account-routing.module.ts index 601e517b4..a2cbeaffc 100644 --- a/client/src/app/+my-account/my-account-routing.module.ts +++ b/client/src/app/+my-account/my-account-routing.module.ts @@ -13,6 +13,7 @@ import { MyAccountSubscriptionsComponent } from '@app/+my-account/my-account-sub import { MyAccountOwnershipComponent } from '@app/+my-account/my-account-ownership/my-account-ownership.component' import { MyAccountBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-blocklist.component' import { MyAccountServerBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-server-blocklist.component' +import { MyAccountHistoryComponent } from '@app/+my-account/my-account-history/my-account-history.component' const myAccountRoutes: Routes = [ { @@ -114,6 +115,15 @@ const myAccountRoutes: Routes = [ title: 'Muted instances' } } + }, + { + path: 'history/videos', + component: MyAccountHistoryComponent, + data: { + meta: { + title: 'Videos history' + } + } } ] } diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss index 2db81a3fe..a735562f8 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss @@ -97,7 +97,7 @@ } } -@media screen and (max-width: 800px) { +@media screen and (max-width: $small-view) { .video { flex-direction: column; height: auto; diff --git a/client/src/app/+my-account/my-account.component.ts b/client/src/app/+my-account/my-account.component.ts index d9381ebfa..1bac9547d 100644 --- a/client/src/app/+my-account/my-account.component.ts +++ b/client/src/app/+my-account/my-account.component.ts @@ -21,7 +21,7 @@ export class MyAccountComponent { children: [ { label: this.i18n('My channels'), - routerLink: '/my-account/videos' + routerLink: '/my-account/video-channels' }, { label: this.i18n('My videos'), @@ -30,6 +30,10 @@ export class MyAccountComponent { { label: this.i18n('My subscriptions'), routerLink: '/my-account/subscriptions' + }, + { + label: this.i18n('My history'), + routerLink: '/my-account/history/videos' } ] } diff --git a/client/src/app/+my-account/my-account.module.ts b/client/src/app/+my-account/my-account.module.ts index 017ebd57d..c05406438 100644 --- a/client/src/app/+my-account/my-account.module.ts +++ b/client/src/app/+my-account/my-account.module.ts @@ -21,6 +21,7 @@ import { MyAccountDangerZoneComponent } from '@app/+my-account/my-account-settin import { MyAccountSubscriptionsComponent } from '@app/+my-account/my-account-subscriptions/my-account-subscriptions.component' import { MyAccountBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-blocklist.component' import { MyAccountServerBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-server-blocklist.component' +import { MyAccountHistoryComponent } from '@app/+my-account/my-account-history/my-account-history.component' @NgModule({ imports: [ @@ -49,7 +50,8 @@ import { MyAccountServerBlocklistComponent } from '@app/+my-account/my-account-b MyAccountDangerZoneComponent, MyAccountSubscriptionsComponent, MyAccountBlocklistComponent, - MyAccountServerBlocklistComponent + MyAccountServerBlocklistComponent, + MyAccountHistoryComponent ], exports: [ -- cgit v1.2.3 From 276d96529529621d5f70473990095495f2743c29 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 18 Dec 2018 11:32:37 +0100 Subject: Add ability to disable and clear history --- .../my-account-history.component.html | 14 +++++++- .../my-account-history.component.scss | 31 ++++++++++++++++ .../my-account-history.component.ts | 41 ++++++++++++++++++++++ client/src/app/+my-account/my-account.module.ts | 4 ++- 4 files changed, 88 insertions(+), 2 deletions(-) (limited to 'client/src/app/+my-account') diff --git a/client/src/app/+my-account/my-account-history/my-account-history.component.html b/client/src/app/+my-account/my-account-history/my-account-history.component.html index 653b33f89..d42af37d4 100644 --- a/client/src/app/+my-account/my-account-history/my-account-history.component.html +++ b/client/src/app/+my-account/my-account-history/my-account-history.component.html @@ -1,4 +1,16 @@ -
You don't have history yet.
+
+
+ + +
+ +
+ +
+
+ + +
You don't have videos history yet.
diff --git a/client/src/app/+my-account/my-account-history/my-account-history.component.scss b/client/src/app/+my-account/my-account-history/my-account-history.component.scss index 115bb0e5c..82150cbe3 100644 --- a/client/src/app/+my-account/my-account-history/my-account-history.component.scss +++ b/client/src/app/+my-account/my-account-history/my-account-history.component.scss @@ -1,6 +1,37 @@ @import '_variables'; @import '_mixins'; +.no-history { + display: flex; + justify-content: center; + margin-top: 50px; + font-weight: $font-semibold; + font-size: 16px; +} + +.top-buttons { + margin-bottom: 20px; + display: flex; + + .history-switch { + display: flex; + flex-grow: 1; + + label { + margin: 0 0 0 5px; + } + } + + .delete-history { + font-size: 15px; + + button { + @include peertube-button; + @include grey-button; + } + } +} + .video { @include row-blocks; diff --git a/client/src/app/+my-account/my-account-history/my-account-history.component.ts b/client/src/app/+my-account/my-account-history/my-account-history.component.ts index 508552167..6ec4fefe8 100644 --- a/client/src/app/+my-account/my-account-history/my-account-history.component.ts +++ b/client/src/app/+my-account/my-account-history/my-account-history.component.ts @@ -11,6 +11,7 @@ import { VideoService } from '../../shared/video/video.service' import { I18n } from '@ngx-translate/i18n-polyfill' import { ScreenService } from '@app/shared/misc/screen.service' import { UserHistoryService } from '@app/shared/users/user-history.service' +import { UserService } from '@app/shared' @Component({ selector: 'my-account-history', @@ -25,6 +26,7 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn itemsPerPage: 5, totalItems: null } + videosHistoryEnabled: boolean protected baseVideoWidth = -1 protected baseVideoHeight = 155 @@ -33,6 +35,7 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn protected router: Router, protected route: ActivatedRoute, protected authService: AuthService, + protected userService: UserService, protected notificationsService: NotificationsService, protected location: Location, protected screenService: ScreenService, @@ -48,6 +51,8 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn ngOnInit () { super.ngOnInit() + + this.videosHistoryEnabled = this.authService.getUser().videosHistoryEnabled } ngOnDestroy () { @@ -63,4 +68,40 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn generateSyndicationList () { throw new Error('Method not implemented.') } + + onVideosHistoryChange () { + this.userService.updateMyProfile({ videosHistoryEnabled: this.videosHistoryEnabled }) + .subscribe( + () => { + const message = this.videosHistoryEnabled === true ? + this.i18n('Videos history is enabled') : + this.i18n('Videos history is disabled') + + this.notificationsService.success(this.i18n('Success'), message) + + this.authService.refreshUserInformation() + }, + + err => this.notificationsService.error(this.i18n('Error'), err.message) + ) + } + + async deleteHistory () { + const title = this.i18n('Delete videos history') + const message = this.i18n('Are you sure you want to delete all your videos history?') + + const res = await this.confirmService.confirm(message, title) + if (res !== true) return + + this.userHistoryService.deleteUserVideosHistory() + .subscribe( + () => { + this.notificationsService.success(this.i18n('Success'), this.i18n('Videos history deleted')) + + this.reloadVideos() + }, + + err => this.notificationsService.error(this.i18n('Error'), err.message) + ) + } } diff --git a/client/src/app/+my-account/my-account.module.ts b/client/src/app/+my-account/my-account.module.ts index c05406438..80d9f0cf7 100644 --- a/client/src/app/+my-account/my-account.module.ts +++ b/client/src/app/+my-account/my-account.module.ts @@ -1,6 +1,7 @@ import { TableModule } from 'primeng/table' import { NgModule } from '@angular/core' import { AutoCompleteModule } from 'primeng/autocomplete' +import { InputSwitchModule } from 'primeng/inputswitch' import { SharedModule } from '../shared' import { MyAccountRoutingModule } from './my-account-routing.module' import { MyAccountChangePasswordComponent } from './my-account-settings/my-account-change-password/my-account-change-password.component' @@ -29,7 +30,8 @@ import { MyAccountHistoryComponent } from '@app/+my-account/my-account-history/m MyAccountRoutingModule, AutoCompleteModule, SharedModule, - TableModule + TableModule, + InputSwitchModule ], declarations: [ -- cgit v1.2.3 From f8b2c1b4f509c037b9650cca2c5befd21f056df3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 19 Dec 2018 16:04:34 +0100 Subject: Refractor notification service Shorter name and use primeng component --- .../my-account-blocklist.component.ts | 13 +++++-------- .../my-account-server-blocklist.component.ts | 11 ++++------- .../my-account-history.component.ts | 12 ++++++------ .../my-account-accept-ownership.component.ts | 9 ++++----- .../my-account-ownership.component.ts | 15 ++++++--------- .../my-account-change-password.component.ts | 7 +++---- .../my-account-danger-zone.component.ts | 8 ++++---- .../my-account-profile.component.ts | 6 +++--- .../my-account-settings.component.ts | 8 ++++---- .../my-account-video-settings.component.ts | 8 ++++---- .../my-account-subscriptions.component.ts | 6 +++--- .../my-account-video-channel-create.component.ts | 9 ++++----- .../my-account-video-channel-update.component.ts | 14 +++++++------- .../my-account-video-channels.component.ts | 11 +++++------ .../my-account-video-imports.component.ts | 6 +++--- .../my-account-videos/my-account-videos.component.ts | 20 +++++++------------- .../video-change-ownership.component.ts | 14 ++++++-------- .../shared/actor-avatar-info.component.ts | 6 +++--- 18 files changed, 81 insertions(+), 102 deletions(-) (limited to 'client/src/app/+my-account') diff --git a/client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts b/client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts index fbad28410..e3025dec4 100644 --- a/client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts +++ b/client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts @@ -1,9 +1,9 @@ import { Component, OnInit } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { I18n } from '@ngx-translate/i18n-polyfill' import { RestPagination, RestTable } from '@app/shared' import { SortMeta } from 'primeng/components/common/sortmeta' -import { BlocklistService, AccountBlock } from '@app/shared/blocklist' +import { AccountBlock, BlocklistService } from '@app/shared/blocklist' @Component({ selector: 'my-account-blocklist', @@ -18,7 +18,7 @@ export class MyAccountBlocklistComponent extends RestTable implements OnInit { pagination: RestPagination = { count: this.rowsPerPage, start: 0 } constructor ( - private notificationsService: NotificationsService, + private notifier: Notifier, private blocklistService: BlocklistService, private i18n: I18n ) { @@ -35,10 +35,7 @@ export class MyAccountBlocklistComponent extends RestTable implements OnInit { this.blocklistService.unblockAccountByUser(blockedAccount) .subscribe( () => { - this.notificationsService.success( - this.i18n('Success'), - this.i18n('Account {{nameWithHost}} unmuted.', { nameWithHost: blockedAccount.nameWithHost }) - ) + this.notifier.success(this.i18n('Account {{nameWithHost}} unmuted.', { nameWithHost: blockedAccount.nameWithHost })) this.loadData() } @@ -53,7 +50,7 @@ export class MyAccountBlocklistComponent extends RestTable implements OnInit { this.totalRecords = resultList.total }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } } diff --git a/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts b/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts index b411d6926..4c5cc28b8 100644 --- a/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts +++ b/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { I18n } from '@ngx-translate/i18n-polyfill' import { RestPagination, RestTable } from '@app/shared' import { SortMeta } from 'primeng/components/common/sortmeta' @@ -19,7 +19,7 @@ export class MyAccountServerBlocklistComponent extends RestTable implements OnIn pagination: RestPagination = { count: this.rowsPerPage, start: 0 } constructor ( - private notificationsService: NotificationsService, + private notifier: Notifier, private blocklistService: BlocklistService, private i18n: I18n ) { @@ -36,10 +36,7 @@ export class MyAccountServerBlocklistComponent extends RestTable implements OnIn this.blocklistService.unblockServerByUser(host) .subscribe( () => { - this.notificationsService.success( - this.i18n('Success'), - this.i18n('Instance {{host}} unmuted.', { host }) - ) + this.notifier.success(this.i18n('Instance {{host}} unmuted.', { host })) this.loadData() } @@ -54,7 +51,7 @@ export class MyAccountServerBlocklistComponent extends RestTable implements OnIn this.totalRecords = resultList.total }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } } diff --git a/client/src/app/+my-account/my-account-history/my-account-history.component.ts b/client/src/app/+my-account/my-account-history/my-account-history.component.ts index 6ec4fefe8..394091bad 100644 --- a/client/src/app/+my-account/my-account-history/my-account-history.component.ts +++ b/client/src/app/+my-account/my-account-history/my-account-history.component.ts @@ -3,7 +3,6 @@ import { ActivatedRoute, Router } from '@angular/router' import { Location } from '@angular/common' import { immutableAssign } from '@app/shared/misc/utils' import { ComponentPagination } from '@app/shared/rest/component-pagination.model' -import { NotificationsService } from 'angular2-notifications' import { AuthService } from '../../core/auth' import { ConfirmService } from '../../core/confirm' import { AbstractVideoList } from '../../shared/video/abstract-video-list' @@ -12,6 +11,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill' import { ScreenService } from '@app/shared/misc/screen.service' import { UserHistoryService } from '@app/shared/users/user-history.service' import { UserService } from '@app/shared' +import { Notifier } from '@app/core' @Component({ selector: 'my-account-history', @@ -36,7 +36,7 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn protected route: ActivatedRoute, protected authService: AuthService, protected userService: UserService, - protected notificationsService: NotificationsService, + protected notifier: Notifier, protected location: Location, protected screenService: ScreenService, protected i18n: I18n, @@ -77,12 +77,12 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn this.i18n('Videos history is enabled') : this.i18n('Videos history is disabled') - this.notificationsService.success(this.i18n('Success'), message) + this.notifier.success(message) this.authService.refreshUserInformation() }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } @@ -96,12 +96,12 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn this.userHistoryService.deleteUserVideosHistory() .subscribe( () => { - this.notificationsService.success(this.i18n('Success'), this.i18n('Videos history deleted')) + this.notifier.success(this.i18n('Videos history deleted')) this.reloadVideos() }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } } diff --git a/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts b/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts index a68b452ec..79d29b139 100644 --- a/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts +++ b/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts @@ -1,5 +1,5 @@ import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { AuthService, Notifier } from '@app/core' import { FormReactive } from '@app/shared' import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' import { VideoOwnershipService } from '@app/shared/video-ownership' @@ -8,7 +8,6 @@ import { VideoAcceptOwnershipValidatorsService } from '@app/shared/forms/form-va import { VideoChannel } from '@app/shared/video-channel/video-channel.model' import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' import { I18n } from '@ngx-translate/i18n-polyfill' -import { AuthService } from '@app/core' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' @Component({ @@ -31,7 +30,7 @@ export class MyAccountAcceptOwnershipComponent extends FormReactive implements O protected formValidatorService: FormValidatorService, private videoChangeOwnershipValidatorsService: VideoAcceptOwnershipValidatorsService, private videoOwnershipService: VideoOwnershipService, - private notificationsService: NotificationsService, + private notifier: Notifier, private authService: AuthService, private videoChannelService: VideoChannelService, private modalService: NgbModal, @@ -68,12 +67,12 @@ export class MyAccountAcceptOwnershipComponent extends FormReactive implements O .acceptOwnership(videoChangeOwnership.id, { channelId: channel }) .subscribe( () => { - this.notificationsService.success(this.i18n('Success'), this.i18n('Ownership accepted')) + this.notifier.success(this.i18n('Ownership accepted')) if (this.accepted) this.accepted.emit() this.videoChangeOwnership = undefined }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } } diff --git a/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts b/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts index 0b51ac13c..77857c4fd 100644 --- a/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts +++ b/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts @@ -1,13 +1,11 @@ import { Component, OnInit, ViewChild } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' -import { I18n } from '@ngx-translate/i18n-polyfill' +import { Notifier } from '@app/core' import { RestPagination, RestTable } from '@app/shared' import { SortMeta } from 'primeng/components/common/sortmeta' import { VideoChangeOwnership } from '../../../../../shared' import { VideoOwnershipService } from '@app/shared/video-ownership' import { Account } from '@app/shared/account/account.model' -import { MyAccountAcceptOwnershipComponent } -from '@app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component' +import { MyAccountAcceptOwnershipComponent } from './my-account-accept-ownership/my-account-accept-ownership.component' @Component({ selector: 'my-account-ownership', @@ -23,9 +21,8 @@ export class MyAccountOwnershipComponent extends RestTable implements OnInit { @ViewChild('myAccountAcceptOwnershipComponent') myAccountAcceptOwnershipComponent: MyAccountAcceptOwnershipComponent constructor ( - private notificationsService: NotificationsService, - private videoOwnershipService: VideoOwnershipService, - private i18n: I18n + private notifier: Notifier, + private videoOwnershipService: VideoOwnershipService ) { super() } @@ -50,7 +47,7 @@ export class MyAccountOwnershipComponent extends RestTable implements OnInit { this.videoOwnershipService.refuseOwnership(videoChangeOwnership.id) .subscribe( () => this.loadData(), - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } @@ -62,7 +59,7 @@ export class MyAccountOwnershipComponent extends RestTable implements OnInit { this.totalRecords = resultList.total }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } } diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts index e5343b33d..cbb068c7c 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts @@ -1,11 +1,10 @@ import { Component, OnInit } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { AuthService, Notifier } from '@app/core' import { FormReactive, UserService } from '../../../shared' import { I18n } from '@ngx-translate/i18n-polyfill' import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service' import { filter } from 'rxjs/operators' -import { AuthService } from '@app/core' import { User } from '../../../../../../shared' @Component({ @@ -20,7 +19,7 @@ export class MyAccountChangePasswordComponent extends FormReactive implements On constructor ( protected formValidatorService: FormValidatorService, private userValidatorsService: UserValidatorsService, - private notificationsService: NotificationsService, + private notifier: Notifier, private authService: AuthService, private userService: UserService, private i18n: I18n @@ -50,7 +49,7 @@ export class MyAccountChangePasswordComponent extends FormReactive implements On this.userService.changePassword(currentPassword, newPassword).subscribe( () => { - this.notificationsService.success(this.i18n('Success'), this.i18n('Password updated.')) + this.notifier.success(this.i18n('Password updated.')) this.form.reset() this.error = null diff --git a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts index 63a121f64..3f79efe20 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts @@ -1,5 +1,5 @@ import { Component, Input } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { AuthService, ConfirmService, RedirectService } from '../../../core' import { UserService } from '../../../shared' import { I18n } from '@ngx-translate/i18n-polyfill' @@ -15,7 +15,7 @@ export class MyAccountDangerZoneComponent { constructor ( private authService: AuthService, - private notificationsService: NotificationsService, + private notifier: Notifier, private userService: UserService, private confirmService: ConfirmService, private redirectService: RedirectService, @@ -34,13 +34,13 @@ export class MyAccountDangerZoneComponent { this.userService.deleteMe().subscribe( () => { - this.notificationsService.success(this.i18n('Success'), this.i18n('Your account is deleted.')) + this.notifier.success(this.i18n('Your account is deleted.')) this.authService.logout() this.redirectService.redirectToHomepage() }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } } diff --git a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts index 967e21f0b..a9503ed1b 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { FormReactive, UserService } from '../../../shared' import { User } from '@app/shared' import { I18n } from '@ngx-translate/i18n-polyfill' @@ -21,7 +21,7 @@ export class MyAccountProfileComponent extends FormReactive implements OnInit { constructor ( protected formValidatorService: FormValidatorService, private userValidatorsService: UserValidatorsService, - private notificationsService: NotificationsService, + private notifier: Notifier, private userService: UserService, private i18n: I18n ) { @@ -53,7 +53,7 @@ export class MyAccountProfileComponent extends FormReactive implements OnInit { this.user.account.displayName = displayName this.user.account.description = description - this.notificationsService.success(this.i18n('Success'), this.i18n('Profile updated.')) + this.notifier.success(this.i18n('Profile updated.')) }, err => this.error = err.message diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts index 62053d97b..f4b954e54 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit, ViewChild } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { BytesPipe } from 'ngx-pipes' import { AuthService } from '../../core' import { User } from '../../shared' @@ -19,7 +19,7 @@ export class MyAccountSettingsComponent implements OnInit { constructor ( private userService: UserService, private authService: AuthService, - private notificationsService: NotificationsService, + private notifier: Notifier, private i18n: I18n ) {} @@ -48,12 +48,12 @@ export class MyAccountSettingsComponent implements OnInit { this.userService.changeAvatar(formData) .subscribe( data => { - this.notificationsService.success(this.i18n('Success'), this.i18n('Avatar changed.')) + this.notifier.success(this.i18n('Avatar changed.')) this.user.updateAccountAvatar(data.avatar) }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } } diff --git a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts index 6c9a7ce75..b8f80bc1a 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { UserUpdateMe } from '../../../../../../shared' import { AuthService } from '../../../core' import { FormReactive, User, UserService } from '../../../shared' @@ -19,7 +19,7 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI constructor ( protected formValidatorService: FormValidatorService, private authService: AuthService, - private notificationsService: NotificationsService, + private notifier: Notifier, private userService: UserService, private i18n: I18n ) { @@ -54,12 +54,12 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI this.userService.updateMyProfile(details).subscribe( () => { - this.notificationsService.success(this.i18n('Success'), this.i18n('Information updated.')) + this.notifier.success(this.i18n('Information updated.')) this.authService.refreshUserInformation() }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } } diff --git a/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.ts b/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.ts index 9517a3705..9d2dccdf0 100644 --- a/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.ts +++ b/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { VideoChannel } from '@app/shared/video-channel/video-channel.model' import { I18n } from '@ngx-translate/i18n-polyfill' import { UserSubscriptionService } from '@app/shared/user-subscription' @@ -21,7 +21,7 @@ export class MyAccountSubscriptionsComponent implements OnInit { constructor ( private userSubscriptionService: UserSubscriptionService, - private notificationsService: NotificationsService, + private notifier: Notifier, private i18n: I18n ) {} @@ -37,7 +37,7 @@ export class MyAccountSubscriptionsComponent implements OnInit { this.pagination.totalItems = res.total }, - error => this.notificationsService.error(this.i18n('Error'), error.message) + error => this.notifier.error(error.message) ) } diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts index 81608d837..a68f79b47 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts @@ -1,10 +1,9 @@ import { Component, OnInit } from '@angular/core' import { Router } from '@angular/router' -import { NotificationsService } from 'angular2-notifications' +import { AuthService, Notifier } from '@app/core' import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' import { VideoChannelCreate } from '../../../../../shared/models/videos' import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' -import { AuthService } from '@app/core' import { I18n } from '@ngx-translate/i18n-polyfill' import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' import { VideoChannelValidatorsService } from '@app/shared/forms/form-validators/video-channel-validators.service' @@ -21,7 +20,7 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE protected formValidatorService: FormValidatorService, private authService: AuthService, private videoChannelValidatorsService: VideoChannelValidatorsService, - private notificationsService: NotificationsService, + private notifier: Notifier, private router: Router, private videoChannelService: VideoChannelService, private i18n: I18n @@ -56,8 +55,8 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE this.videoChannelService.createVideoChannel(videoChannelCreate).subscribe( () => { this.authService.refreshUserInformation() - this.notificationsService.success( - this.i18n('Success'), + + this.notifier.success( this.i18n('Video channel {{videoChannelName}} created.', { videoChannelName: videoChannelCreate.displayName }) ) this.router.navigate([ '/my-account', 'video-channels' ]) diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts index 5d43956f2..da4fb645a 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts @@ -1,12 +1,11 @@ import { Component, OnDestroy, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' -import { NotificationsService } from 'angular2-notifications' +import { AuthService, Notifier, ServerService } from '@app/core' import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' import { VideoChannelUpdate } from '../../../../../shared/models/videos' import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' import { Subscription } from 'rxjs' import { VideoChannel } from '@app/shared/video-channel/video-channel.model' -import { AuthService, ServerService } from '@app/core' import { I18n } from '@ngx-translate/i18n-polyfill' import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' import { VideoChannelValidatorsService } from '@app/shared/forms/form-validators/video-channel-validators.service' @@ -26,7 +25,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE protected formValidatorService: FormValidatorService, private authService: AuthService, private videoChannelValidatorsService: VideoChannelValidatorsService, - private notificationsService: NotificationsService, + private notifier: Notifier, private router: Router, private route: ActivatedRoute, private videoChannelService: VideoChannelService, @@ -79,10 +78,11 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE this.videoChannelService.updateVideoChannel(this.videoChannelToUpdate.name, videoChannelUpdate).subscribe( () => { this.authService.refreshUserInformation() - this.notificationsService.success( - this.i18n('Success'), + + this.notifier.success( this.i18n('Video channel {{videoChannelName}} updated.', { videoChannelName: videoChannelUpdate.displayName }) ) + this.router.navigate([ '/my-account', 'video-channels' ]) }, @@ -94,12 +94,12 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE this.videoChannelService.changeVideoChannelAvatar(this.videoChannelToUpdate.name, formData) .subscribe( data => { - this.notificationsService.success(this.i18n('Success'), this.i18n('Avatar changed.')) + this.notifier.success(this.i18n('Avatar changed.')) this.videoChannelToUpdate.updateAvatar(data.avatar) }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts index 6d1098865..0ab3e2067 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { AuthService } from '../../core/auth' import { ConfirmService } from '../../core/confirm' import { VideoChannel } from '@app/shared/video-channel/video-channel.model' @@ -20,7 +20,7 @@ export class MyAccountVideoChannelsComponent implements OnInit { constructor ( private authService: AuthService, - private notificationsService: NotificationsService, + private notifier: Notifier, private confirmService: ConfirmService, private videoChannelService: VideoChannelService, private i18n: I18n @@ -46,15 +46,14 @@ export class MyAccountVideoChannelsComponent implements OnInit { this.videoChannelService.removeVideoChannel(videoChannel) .subscribe( - status => { + () => { this.loadVideoChannels() - this.notificationsService.success( - this.i18n('Success'), + this.notifier.success( this.i18n('Video channel {{videoChannelName}} deleted.', { videoChannelName: videoChannel.displayName }) ) }, - error => this.notificationsService.error(this.i18n('Error'), error.message) + error => this.notifier.error(error.message) ) } diff --git a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts index 5b920c98d..21a10c8ff 100644 --- a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts +++ b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core' import { RestPagination, RestTable } from '@app/shared' import { SortMeta } from 'primeng/components/common/sortmeta' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { I18n } from '@ngx-translate/i18n-polyfill' import { VideoImport, VideoImportState } from '../../../../../shared/models/videos' import { VideoImportService } from '@app/shared/video-import' @@ -19,7 +19,7 @@ export class MyAccountVideoImportsComponent extends RestTable implements OnInit pagination: RestPagination = { count: this.rowsPerPage, start: 0 } constructor ( - private notificationsService: NotificationsService, + private notifier: Notifier, private videoImportService: VideoImportService, private i18n: I18n ) { @@ -58,7 +58,7 @@ export class MyAccountVideoImportsComponent extends RestTable implements OnInit this.totalRecords = resultList.total }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } } diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts index 2d88ac760..41608f796 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts @@ -5,7 +5,7 @@ import { ActivatedRoute, Router } from '@angular/router' import { Location } from '@angular/common' import { immutableAssign } from '@app/shared/misc/utils' import { ComponentPagination } from '@app/shared/rest/component-pagination.model' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { AuthService } from '../../core/auth' import { ConfirmService } from '../../core/confirm' import { AbstractVideoList } from '../../shared/video/abstract-video-list' @@ -40,7 +40,7 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni protected router: Router, protected route: ActivatedRoute, protected authService: AuthService, - protected notificationsService: NotificationsService, + protected notifier: Notifier, protected location: Location, protected screenService: ScreenService, protected i18n: I18n, @@ -102,16 +102,13 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni .pipe(concatAll()) .subscribe( res => { - this.notificationsService.success( - this.i18n('Success'), - this.i18n('{{deleteLength}} videos deleted.', { deleteLength: toDeleteVideosIds.length }) - ) + this.notifier.success(this.i18n('{{deleteLength}} videos deleted.', { deleteLength: toDeleteVideosIds.length })) this.abortSelectionMode() this.reloadVideos() }, - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } @@ -124,15 +121,12 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni this.videoService.removeVideo(video.id) .subscribe( - status => { - this.notificationsService.success( - this.i18n('Success'), - this.i18n('Video {{videoName}} deleted.', { videoName: video.name }) - ) + () => { + this.notifier.success(this.i18n('Video {{videoName}} deleted.', { videoName: video.name })) this.reloadVideos() }, - error => this.notificationsService.error(this.i18n('Error'), error.message) + error => this.notifier.error(error.message) ) } diff --git a/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts b/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts index 9f94f3c13..37d7cf2a4 100644 --- a/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts +++ b/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts @@ -1,5 +1,5 @@ import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' -import { NotificationsService } from 'angular2-notifications' +import { Notifier } from '@app/core' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { FormReactive, UserService } from '../../../shared/index' import { Video } from '@app/shared/video/video.model' @@ -25,7 +25,7 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni protected formValidatorService: FormValidatorService, private videoChangeOwnershipValidatorsService: VideoChangeOwnershipValidatorsService, private videoOwnershipService: VideoOwnershipService, - private notificationsService: NotificationsService, + private notifier: Notifier, private userService: UserService, private modalService: NgbModal, private i18n: I18n @@ -53,11 +53,9 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni const query = event.query this.userService.autocomplete(query) .subscribe( - usernames => { - this.usernamePropositions = usernames - }, + usernames => this.usernamePropositions = usernames, - err => this.notificationsService.error('Error', err.message) + err => this.notifier.error(err.message) ) } @@ -67,9 +65,9 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni this.videoOwnershipService .changeOwnership(this.video.id, username) .subscribe( - () => this.notificationsService.success(this.i18n('Success'), this.i18n('Ownership change request sent.')), + () => this.notifier.success(this.i18n('Ownership change request sent.')), - err => this.notificationsService.error(this.i18n('Error'), err.message) + err => this.notifier.error(err.message) ) } } diff --git a/client/src/app/+my-account/shared/actor-avatar-info.component.ts b/client/src/app/+my-account/shared/actor-avatar-info.component.ts index 54bacc212..72c815a0c 100644 --- a/client/src/app/+my-account/shared/actor-avatar-info.component.ts +++ b/client/src/app/+my-account/shared/actor-avatar-info.component.ts @@ -1,8 +1,8 @@ import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core' import { ServerService } from '../../core/server' -import { NotificationsService } from 'angular2-notifications' import { VideoChannel } from '@app/shared/video-channel/video-channel.model' import { Account } from '@app/shared/account/account.model' +import { Notifier } from '@app/core' @Component({ selector: 'my-actor-avatar-info', @@ -18,13 +18,13 @@ export class ActorAvatarInfoComponent { constructor ( private serverService: ServerService, - private notificationsService: NotificationsService + private notifier: Notifier ) {} onAvatarChange () { const avatarfile = this.avatarfileInput.nativeElement.files[ 0 ] if (avatarfile.size > this.maxAvatarSize) { - this.notificationsService.error('Error', 'This image is too large.') + this.notifier.error('Error', 'This image is too large.') return } -- cgit v1.2.3 From 2f1548fda32c3ba9e53913270394eedfacd55986 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 8 Jan 2019 11:26:41 +0100 Subject: Add notifications in the client --- .../my-account-notifications.component.html | 7 ++ .../my-account-notifications.component.scss | 23 +++++ .../my-account-notifications.component.ts | 14 +++ .../app/+my-account/my-account-routing.module.ts | 10 +++ .../my-account-notification-preferences/index.ts | 1 + ...account-notification-preferences.component.html | 19 +++++ ...account-notification-preferences.component.scss | 25 ++++++ ...y-account-notification-preferences.component.ts | 99 ++++++++++++++++++++++ .../my-account-settings.component.html | 5 +- client/src/app/+my-account/my-account.component.ts | 4 + client/src/app/+my-account/my-account.module.ts | 6 +- 11 files changed, 211 insertions(+), 2 deletions(-) create mode 100644 client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html create mode 100644 client/src/app/+my-account/my-account-notifications/my-account-notifications.component.scss create mode 100644 client/src/app/+my-account/my-account-notifications/my-account-notifications.component.ts create mode 100644 client/src/app/+my-account/my-account-settings/my-account-notification-preferences/index.ts create mode 100644 client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.html create mode 100644 client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.scss create mode 100644 client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts (limited to 'client/src/app/+my-account') diff --git a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html new file mode 100644 index 000000000..d2810c343 --- /dev/null +++ b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html @@ -0,0 +1,7 @@ +
+ Notification preferences + + +
+ + diff --git a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.scss b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.scss new file mode 100644 index 000000000..86ac094c5 --- /dev/null +++ b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.scss @@ -0,0 +1,23 @@ +@import '_variables'; +@import '_mixins'; + +.header { + display: flex; + justify-content: space-between; + font-size: 15px; + margin-bottom: 10px; + + a { + @include peertube-button-link; + @include grey-button; + } + + button { + @include peertube-button; + @include grey-button; + } +} + +my-user-notifications { + font-size: 15px; +} diff --git a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.ts b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.ts new file mode 100644 index 000000000..3e197088d --- /dev/null +++ b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.ts @@ -0,0 +1,14 @@ +import { Component, ViewChild } from '@angular/core' +import { UserNotificationsComponent } from '@app/shared' + +@Component({ + templateUrl: './my-account-notifications.component.html', + styleUrls: [ './my-account-notifications.component.scss' ] +}) +export class MyAccountNotificationsComponent { + @ViewChild('userNotification') userNotification: UserNotificationsComponent + + markAllAsRead () { + this.userNotification.markAllAsRead() + } +} diff --git a/client/src/app/+my-account/my-account-routing.module.ts b/client/src/app/+my-account/my-account-routing.module.ts index a2cbeaffc..9996218ca 100644 --- a/client/src/app/+my-account/my-account-routing.module.ts +++ b/client/src/app/+my-account/my-account-routing.module.ts @@ -14,6 +14,7 @@ import { MyAccountOwnershipComponent } from '@app/+my-account/my-account-ownersh import { MyAccountBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-blocklist.component' import { MyAccountServerBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-server-blocklist.component' import { MyAccountHistoryComponent } from '@app/+my-account/my-account-history/my-account-history.component' +import { MyAccountNotificationsComponent } from '@app/+my-account/my-account-notifications/my-account-notifications.component' const myAccountRoutes: Routes = [ { @@ -124,6 +125,15 @@ const myAccountRoutes: Routes = [ title: 'Videos history' } } + }, + { + path: 'notifications', + component: MyAccountNotificationsComponent, + data: { + meta: { + title: 'Notifications' + } + } } ] } diff --git a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/index.ts b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/index.ts new file mode 100644 index 000000000..5e1d51339 --- /dev/null +++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/index.ts @@ -0,0 +1 @@ +export * from './my-account-notification-preferences.component' 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 new file mode 100644 index 000000000..59422d682 --- /dev/null +++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.html @@ -0,0 +1,19 @@ +
+
Activities
+
Web
+
Email
+
+ +
+ +
{{ labelNotifications[notificationType] }}
+ +
+ +
+ +
+ +
+
+
diff --git a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.scss b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.scss new file mode 100644 index 000000000..6feb16ab1 --- /dev/null +++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.scss @@ -0,0 +1,25 @@ +@import '_variables'; +@import '_mixins'; + +.custom-row { + display: flex; + align-items: center; + border-bottom: 1px solid rgba(0, 0, 0, 0.10); + + &:first-child { + font-size: 16px; + + & > div { + font-weight: $font-semibold; + } + } + + & > div { + width: 350px; + } + + & > div { + padding: 10px + } +} + 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 new file mode 100644 index 000000000..519bdfab4 --- /dev/null +++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts @@ -0,0 +1,99 @@ +import { Component, Input, OnInit } from '@angular/core' +import { User } from '@app/shared' +import { I18n } from '@ngx-translate/i18n-polyfill' +import { Subject } from 'rxjs' +import { UserNotificationSetting, UserNotificationSettingValue, UserRight } from '../../../../../../shared' +import { Notifier, ServerService } from '@app/core' +import { debounce } from 'lodash-es' +import { UserNotificationService } from '@app/shared/users/user-notification.service' + +@Component({ + selector: 'my-account-notification-preferences', + templateUrl: './my-account-notification-preferences.component.html', + styleUrls: [ './my-account-notification-preferences.component.scss' ] +}) +export class MyAccountNotificationPreferencesComponent implements OnInit { + @Input() user: User = null + @Input() userInformationLoaded: Subject + + notificationSettingKeys: (keyof UserNotificationSetting)[] = [] + emailNotifications: { [ id in keyof UserNotificationSetting ]: boolean } = {} as any + webNotifications: { [ id in keyof UserNotificationSetting ]: boolean } = {} as any + labelNotifications: { [ id in keyof UserNotificationSetting ]: string } = {} as any + rightNotifications: { [ id in keyof Partial ]: UserRight } = {} as any + emailEnabled: boolean + + private savePreferences = debounce(this.savePreferencesImpl.bind(this), 500) + + constructor ( + private i18n: I18n, + private userNotificationService: UserNotificationService, + private serverService: ServerService, + private notifier: Notifier + ) { + this.labelNotifications = { + newVideoFromSubscription: this.i18n('New video from your subscriptions'), + newCommentOnMyVideo: this.i18n('New comment on your video'), + videoAbuseAsModerator: this.i18n('New video abuse on local video'), + blacklistOnMyVideo: this.i18n('One of your video is blacklisted/unblacklisted'), + myVideoPublished: this.i18n('Video published (after transcoding/scheduled update)'), + myVideoImportFinished: this.i18n('Video import finished'), + newUserRegistration: this.i18n('A new user registered on your instance'), + newFollow: this.i18n('You or your channel(s) has a new follower'), + commentMention: this.i18n('Someone mentioned you in video comments') + } + this.notificationSettingKeys = Object.keys(this.labelNotifications) as (keyof UserNotificationSetting)[] + + this.rightNotifications = { + videoAbuseAsModerator: UserRight.MANAGE_VIDEO_ABUSES, + newUserRegistration: UserRight.MANAGE_USERS + } + + this.emailEnabled = this.serverService.getConfig().email.enabled + } + + ngOnInit () { + this.userInformationLoaded.subscribe(() => this.loadNotificationSettings()) + } + + hasUserRight (field: keyof UserNotificationSetting) { + const rightToHave = this.rightNotifications[field] + if (!rightToHave) return true // No rights needed + + return this.user.hasRight(rightToHave) + } + + updateEmailSetting (field: keyof UserNotificationSetting, value: boolean) { + if (value === true) this.user.notificationSettings[field] |= UserNotificationSettingValue.EMAIL + else this.user.notificationSettings[field] &= ~UserNotificationSettingValue.EMAIL + + this.savePreferences() + } + + updateWebSetting (field: keyof UserNotificationSetting, value: boolean) { + if (value === true) this.user.notificationSettings[field] |= UserNotificationSettingValue.WEB + else this.user.notificationSettings[field] &= ~UserNotificationSettingValue.WEB + + this.savePreferences() + } + + private savePreferencesImpl () { + this.userNotificationService.updateNotificationSettings(this.user, this.user.notificationSettings) + .subscribe( + () => { + this.notifier.success(this.i18n('Preferences saved'), undefined, 2000) + }, + + err => this.notifier.error(err.message) + ) + } + + private loadNotificationSettings () { + for (const key of Object.keys(this.user.notificationSettings)) { + const value = this.user.notificationSettings[key] + this.emailNotifications[key] = value & UserNotificationSettingValue.EMAIL + + this.webNotifications[key] = value & UserNotificationSettingValue.WEB + } + } +} diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html index c7e23cd1f..2eb7dd56e 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html @@ -9,6 +9,9 @@ + + + @@ -16,4 +19,4 @@ - \ No newline at end of file + diff --git a/client/src/app/+my-account/my-account.component.ts b/client/src/app/+my-account/my-account.component.ts index 1bac9547d..8a4102d80 100644 --- a/client/src/app/+my-account/my-account.component.ts +++ b/client/src/app/+my-account/my-account.component.ts @@ -68,6 +68,10 @@ export class MyAccountComponent { label: this.i18n('My settings'), routerLink: '/my-account/settings' }, + { + label: this.i18n('My notifications'), + routerLink: '/my-account/notifications' + }, libraryEntries, miscEntries ] diff --git a/client/src/app/+my-account/my-account.module.ts b/client/src/app/+my-account/my-account.module.ts index 80d9f0cf7..18f51f171 100644 --- a/client/src/app/+my-account/my-account.module.ts +++ b/client/src/app/+my-account/my-account.module.ts @@ -23,6 +23,8 @@ import { MyAccountSubscriptionsComponent } from '@app/+my-account/my-account-sub import { MyAccountBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-blocklist.component' import { MyAccountServerBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-server-blocklist.component' import { MyAccountHistoryComponent } from '@app/+my-account/my-account-history/my-account-history.component' +import { MyAccountNotificationsComponent } from '@app/+my-account/my-account-notifications/my-account-notifications.component' +import { MyAccountNotificationPreferencesComponent } from '@app/+my-account/my-account-settings/my-account-notification-preferences' @NgModule({ imports: [ @@ -53,7 +55,9 @@ import { MyAccountHistoryComponent } from '@app/+my-account/my-account-history/m MyAccountSubscriptionsComponent, MyAccountBlocklistComponent, MyAccountServerBlocklistComponent, - MyAccountHistoryComponent + MyAccountHistoryComponent, + MyAccountNotificationsComponent, + MyAccountNotificationPreferencesComponent ], exports: [ -- cgit v1.2.3 From 07a982363fcc6f838dd3f5c2039a2affaea3b0b2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 8 Jan 2019 15:06:58 +0100 Subject: Correctly scroll in notification preferences --- .../my-account-notifications.component.html | 2 +- .../my-account-settings/my-account-settings.component.html | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'client/src/app/+my-account') diff --git a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html index d2810c343..b98a1087e 100644 --- a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html +++ b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html @@ -1,5 +1,5 @@ diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html index 2eb7dd56e..ad64f28fe 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html @@ -4,10 +4,8 @@ Video quota: {{ userVideoQuotaUsed | bytes: 0 }} / {{ userVideoQuota }}
- - - - + + -- cgit v1.2.3 From b4593cd7ff34b94b60f6bfa0b57e371d74d63aa2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 14 Jan 2019 10:24:49 +0100 Subject: Warn user when they want to delete a channel Because they will not be able to create another channel with the same actor name --- .../my-account-video-channels.component.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'client/src/app/+my-account') diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts index 0ab3e2067..da2c5bcd3 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts @@ -35,10 +35,14 @@ export class MyAccountVideoChannelsComponent implements OnInit { async deleteVideoChannel (videoChannel: VideoChannel) { const res = await this.confirmService.confirmWithInput( this.i18n( - 'Do you really want to delete {{videoChannelName}}? It will delete all videos uploaded in this channel too.', - { videoChannelName: videoChannel.displayName } + 'Do you really want to delete {{channelDisplayName}}? It will delete all videos uploaded in this channel, ' + + 'and you will not be able to create another channel with the same name ({{channelName}})!', + { channelDisplayName: videoChannel.displayName, channelName: videoChannel.name } + ), + this.i18n( + 'Please type the display name of the video channel ({{displayName}}) to confirm', + { displayName: videoChannel.displayName } ), - this.i18n('Please type the name of the video channel to confirm'), videoChannel.displayName, this.i18n('Delete') ) -- cgit v1.2.3 From 457bb213b273a9b206cc5654eb085cede4e916ad Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 16 Jan 2019 16:05:40 +0100 Subject: Refactor how we use icons Inject them in an angular component so we can easily change their color --- .../my-account-history/my-account-history.component.scss | 4 ++-- .../my-account-notifications.component.html | 10 ++++++++-- .../my-account-notifications.component.scss | 4 +++- .../my-account-accept-ownership.component.html | 3 ++- .../my-account-video-channels.component.html | 2 +- .../my-account-video-channels.component.scss | 2 +- .../my-account-videos/my-account-videos.component.html | 6 +++--- .../my-account-videos/my-account-videos.component.scss | 11 ++++------- .../video-change-ownership.component.html | 3 ++- 9 files changed, 26 insertions(+), 19 deletions(-) (limited to 'client/src/app/+my-account') diff --git a/client/src/app/+my-account/my-account-history/my-account-history.component.scss b/client/src/app/+my-account/my-account-history/my-account-history.component.scss index 82150cbe3..e7c6863f1 100644 --- a/client/src/app/+my-account/my-account-history/my-account-history.component.scss +++ b/client/src/app/+my-account/my-account-history/my-account-history.component.scss @@ -65,10 +65,10 @@ text-overflow: ellipsis; white-space: nowrap; font-size: 14px; - color: #585858; + color: $grey-foreground-color; &:hover { - color: #303030; + color: $grey-foreground-hover-color; } } } diff --git a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html index b98a1087e..d518b22ec 100644 --- a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html +++ b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html @@ -1,7 +1,13 @@
- Notification preferences + + + Notification preferences + - +
diff --git a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.scss b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.scss index 86ac094c5..43d1f82ab 100644 --- a/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.scss +++ b/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.scss @@ -5,16 +5,18 @@ display: flex; justify-content: space-between; font-size: 15px; - margin-bottom: 10px; + margin-bottom: 20px; a { @include peertube-button-link; @include grey-button; + @include button-with-icon(18px, 3px, -1px); } button { @include peertube-button; @include grey-button; + @include button-with-icon(20px, 3px, -1px); } } diff --git a/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.html b/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.html index fd7d7d23b..674a4e8a2 100644 --- a/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.html +++ b/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.html @@ -1,7 +1,8 @@ @@ -45,7 +45,7 @@
@@ -53,4 +53,4 @@
- \ No newline at end of file + diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss index a735562f8..39d0cf2f7 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss @@ -23,14 +23,11 @@ .action-button-delete-selection { @include peertube-button; @include orange-button; - } - - .icon.icon-delete-white { - @include icon(21px); + @include button-with-icon(21px); - position: relative; - top: -2px; - background-image: url('../../../assets/images/global/delete-white.svg'); + my-global-icon { + @include apply-svg-color(#fff); + } } } } diff --git a/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.html b/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.html index 7c0df850d..22f127904 100644 --- a/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.html +++ b/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.html @@ -1,7 +1,8 @@