From: Rigel Kent Date: Mon, 8 Oct 2018 19:05:57 +0000 (+0200) Subject: move user-password to Input decorator X-Git-Tag: v1.3.0-rc.1~205^2~2^2~5 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=2c2baef6f30625794cf1f4f72c184527a4d82562;p=github%2FChocobozzz%2FPeerTube.git move user-password to Input decorator --- diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.html b/client/src/app/+admin/users/user-edit/user-edit.component.html index b06c91ff3..6944ec435 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.component.html +++ b/client/src/app/+admin/users/user-edit/user-edit.component.html @@ -88,4 +88,4 @@

Manually set the user password

- + diff --git a/client/src/app/+admin/users/user-edit/user-password.component.ts b/client/src/app/+admin/users/user-edit/user-password.component.ts index 1f9ccb4e8..99c4c8a59 100644 --- a/client/src/app/+admin/users/user-edit/user-password.component.ts +++ b/client/src/app/+admin/users/user-edit/user-password.component.ts @@ -19,10 +19,11 @@ import { FormReactive } from '../../../shared' }) export class UserPasswordComponent extends FormReactive implements OnInit, OnDestroy { error: string - userId: number username: string showPassword = false + @Input() userId: number + private paramsSub: Subscription constructor ( @@ -43,15 +44,6 @@ export class UserPasswordComponent extends FormReactive implements OnInit, OnDes this.buildForm({ password: this.userValidatorsService.USER_PASSWORD }) - - this.paramsSub = this.route.params.subscribe(routeParams => { - const userId = routeParams['id'] - this.userService.getUser(userId).subscribe( - user => this.onUserFetched(user), - - err => this.error = err.message - ) - }) } ngOnDestroy () {