diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-17 14:42:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-18 08:35:06 +0200 |
commit | 9df52d660feb722404be00a50f3c8a612bec1c15 (patch) | |
tree | dde52880fa012874d24c60f64eb596b0a789cc8b /client/src/app/+my-account | |
parent | adb8809d43648ea0a64d6845bb39aa3bd0e005a6 (diff) | |
download | PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.tar.gz PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.tar.zst PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.zip |
Migrate client to eslint
Diffstat (limited to 'client/src/app/+my-account')
6 files changed, 17 insertions, 11 deletions
diff --git a/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts b/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts index 6873c7d40..e88cdd228 100644 --- a/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts +++ b/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts | |||
@@ -36,6 +36,7 @@ export class MyAccountApplicationsComponent implements OnInit { | |||
36 | 36 | ||
37 | async renewToken () { | 37 | async renewToken () { |
38 | const res = await this.confirmService.confirm( | 38 | const res = await this.confirmService.confirm( |
39 | // eslint-disable-next-line max-len | ||
39 | $localize`Renewing the token will disallow previously configured clients from retrieving the feed until they use the new token. Proceed?`, | 40 | $localize`Renewing the token will disallow previously configured clients from retrieving the feed until they use the new token. Proceed?`, |
40 | $localize`Renew token` | 41 | $localize`Renew token` |
41 | ) | 42 | ) |
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts index 08bc5b425..9b87daa40 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts | |||
@@ -28,7 +28,7 @@ export class MyAccountChangeEmailComponent extends FormReactive implements OnIni | |||
28 | ngOnInit () { | 28 | ngOnInit () { |
29 | this.buildForm({ | 29 | this.buildForm({ |
30 | 'new-email': USER_EMAIL_VALIDATOR, | 30 | 'new-email': USER_EMAIL_VALIDATOR, |
31 | 'password': USER_PASSWORD_VALIDATOR | 31 | password: USER_PASSWORD_VALIDATOR |
32 | }) | 32 | }) |
33 | 33 | ||
34 | this.user = this.authService.getUser() | 34 | this.user = this.authService.getUser() |
@@ -38,8 +38,8 @@ export class MyAccountChangeEmailComponent extends FormReactive implements OnIni | |||
38 | this.error = null | 38 | this.error = null |
39 | this.success = null | 39 | this.success = null |
40 | 40 | ||
41 | const password = this.form.value[ 'password' ] | 41 | const password = this.form.value['password'] |
42 | const email = this.form.value[ 'new-email' ] | 42 | const email = this.form.value['new-email'] |
43 | 43 | ||
44 | forkJoin([ | 44 | forkJoin([ |
45 | this.serverService.getConfig(), | 45 | this.serverService.getConfig(), |
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 f91b2f37b..47e54dc23 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,7 +1,11 @@ | |||
1 | import { filter } from 'rxjs/operators' | 1 | import { filter } from 'rxjs/operators' |
2 | import { Component, OnInit } from '@angular/core' | 2 | import { Component, OnInit } from '@angular/core' |
3 | import { AuthService, Notifier, UserService } from '@app/core' | 3 | import { AuthService, Notifier, UserService } from '@app/core' |
4 | import { USER_CONFIRM_PASSWORD_VALIDATOR, USER_PASSWORD_VALIDATOR, USER_EXISTING_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators' | 4 | import { |
5 | USER_CONFIRM_PASSWORD_VALIDATOR, | ||
6 | USER_EXISTING_PASSWORD_VALIDATOR, | ||
7 | USER_PASSWORD_VALIDATOR | ||
8 | } from '@app/shared/form-validators/user-validators' | ||
5 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 9 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' |
6 | import { User } from '@shared/models' | 10 | import { User } from '@shared/models' |
7 | 11 | ||
@@ -19,7 +23,7 @@ export class MyAccountChangePasswordComponent extends FormReactive implements On | |||
19 | private notifier: Notifier, | 23 | private notifier: Notifier, |
20 | private authService: AuthService, | 24 | private authService: AuthService, |
21 | private userService: UserService | 25 | private userService: UserService |
22 | ) { | 26 | ) { |
23 | super() | 27 | super() |
24 | } | 28 | } |
25 | 29 | ||
@@ -35,13 +39,13 @@ export class MyAccountChangePasswordComponent extends FormReactive implements On | |||
35 | const confirmPasswordControl = this.form.get('new-confirmed-password') | 39 | const confirmPasswordControl = this.form.get('new-confirmed-password') |
36 | 40 | ||
37 | confirmPasswordControl.valueChanges | 41 | confirmPasswordControl.valueChanges |
38 | .pipe(filter(v => v !== this.form.value[ 'new-password' ])) | 42 | .pipe(filter(v => v !== this.form.value['new-password'])) |
39 | .subscribe(() => confirmPasswordControl.setErrors({ matchPassword: true })) | 43 | .subscribe(() => confirmPasswordControl.setErrors({ matchPassword: true })) |
40 | } | 44 | } |
41 | 45 | ||
42 | changePassword () { | 46 | changePassword () { |
43 | const currentPassword = this.form.value[ 'current-password' ] | 47 | const currentPassword = this.form.value['current-password'] |
44 | const newPassword = this.form.value[ 'new-password' ] | 48 | const newPassword = this.form.value['new-password'] |
45 | 49 | ||
46 | this.userService.changePassword(currentPassword, newPassword) | 50 | this.userService.changePassword(currentPassword, newPassword) |
47 | .subscribe({ | 51 | .subscribe({ |
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 5005cb630..4a46f1ad9 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 | |||
@@ -15,10 +15,11 @@ export class MyAccountDangerZoneComponent { | |||
15 | private userService: UserService, | 15 | private userService: UserService, |
16 | private confirmService: ConfirmService, | 16 | private confirmService: ConfirmService, |
17 | private redirectService: RedirectService | 17 | private redirectService: RedirectService |
18 | ) { } | 18 | ) { } |
19 | 19 | ||
20 | async deleteMe () { | 20 | async deleteMe () { |
21 | const res = await this.confirmService.confirmWithInput( | 21 | const res = await this.confirmService.confirmWithInput( |
22 | // eslint-disable-next-line max-len | ||
22 | $localize`Are you sure you want to delete your account? This will delete all your data, including channels, videos and comments. Content cached by other servers and other third-parties might make longer to be deleted.`, | 23 | $localize`Are you sure you want to delete your account? This will delete all your data, including channels, videos and comments. Content cached by other servers and other third-parties might make longer to be deleted.`, |
23 | $localize`Type your username to confirm`, | 24 | $localize`Type your username to confirm`, |
24 | this.user.username, | 25 | this.user.username, |
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 fc7635f38..a5bcb6496 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 | |||
@@ -19,7 +19,7 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked { | |||
19 | private userService: UserService, | 19 | private userService: UserService, |
20 | private authService: AuthService, | 20 | private authService: AuthService, |
21 | private notifier: Notifier | 21 | private notifier: Notifier |
22 | ) {} | 22 | ) {} |
23 | 23 | ||
24 | get userInformationLoaded () { | 24 | get userInformationLoaded () { |
25 | return this.authService.userInformationLoaded | 25 | return this.authService.userInformationLoaded |
diff --git a/client/src/app/+my-account/my-account.component.ts b/client/src/app/+my-account/my-account.component.ts index eaf8a72e9..450454ca2 100644 --- a/client/src/app/+my-account/my-account.component.ts +++ b/client/src/app/+my-account/my-account.component.ts | |||
@@ -13,7 +13,7 @@ export class MyAccountComponent implements OnInit { | |||
13 | 13 | ||
14 | constructor ( | 14 | constructor ( |
15 | private screenService: ScreenService | 15 | private screenService: ScreenService |
16 | ) { } | 16 | ) { } |
17 | 17 | ||
18 | get isBroadcastMessageDisplayed () { | 18 | get isBroadcastMessageDisplayed () { |
19 | return this.screenService.isBroadcastMessageDisplayed | 19 | return this.screenService.isBroadcastMessageDisplayed |