diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-12 10:22:43 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-12 10:22:43 +0200 |
commit | ed22eaabfac0d53550cd838c12b7d80e01bcc7b5 (patch) | |
tree | 8b817a5ca9d53951acda1661c215a90dced755f2 /client/src/app/+signup | |
parent | d98909f69070c81e87da723e414d91c6a2a6f343 (diff) | |
download | PeerTube-ed22eaabfac0d53550cd838c12b7d80e01bcc7b5.tar.gz PeerTube-ed22eaabfac0d53550cd838c12b7d80e01bcc7b5.tar.zst PeerTube-ed22eaabfac0d53550cd838c12b7d80e01bcc7b5.zip |
Fix terms/code of conduct link toggle
Diffstat (limited to 'client/src/app/+signup')
-rw-r--r-- | client/src/app/+signup/+register/register.component.html | 1 | ||||
-rw-r--r-- | client/src/app/+signup/+register/register.component.ts | 9 |
2 files changed, 4 insertions, 6 deletions
diff --git a/client/src/app/+signup/+register/register.component.html b/client/src/app/+signup/+register/register.component.html index 71bca63e3..23adee02d 100644 --- a/client/src/app/+signup/+register/register.component.html +++ b/client/src/app/+signup/+register/register.component.html | |||
@@ -43,6 +43,7 @@ | |||
43 | </my-signup-step-title> | 43 | </my-signup-step-title> |
44 | 44 | ||
45 | <my-instance-about-accordion | 45 | <my-instance-about-accordion |
46 | #instanceAboutAccordion | ||
46 | [displayInstanceName]="false" | 47 | [displayInstanceName]="false" |
47 | (init)="onInstanceAboutAccordionInit($event)" [panels]="instanceInformationPanels" | 48 | (init)="onInstanceAboutAccordionInit($event)" [panels]="instanceInformationPanels" |
48 | pluginScope="signup" pluginHook="filter:signup.instance-about-plugin-panels.create.result" | 49 | pluginScope="signup" pluginHook="filter:signup.instance-about-plugin-panels.create.result" |
diff --git a/client/src/app/+signup/+register/register.component.ts b/client/src/app/+signup/+register/register.component.ts index c17a3f380..be51c36d1 100644 --- a/client/src/app/+signup/+register/register.component.ts +++ b/client/src/app/+signup/+register/register.component.ts | |||
@@ -5,7 +5,6 @@ import { ActivatedRoute } from '@angular/router' | |||
5 | import { AuthService } from '@app/core' | 5 | import { AuthService } from '@app/core' |
6 | import { HooksService } from '@app/core/plugins/hooks.service' | 6 | import { HooksService } from '@app/core/plugins/hooks.service' |
7 | import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance' | 7 | import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance' |
8 | import { NgbAccordionDirective } from '@ng-bootstrap/ng-bootstrap' | ||
9 | import { UserRegister } from '@shared/models' | 8 | import { UserRegister } from '@shared/models' |
10 | import { ServerConfig } from '@shared/models/server' | 9 | import { ServerConfig } from '@shared/models/server' |
11 | import { SignupService } from '../shared/signup.service' | 10 | import { SignupService } from '../shared/signup.service' |
@@ -17,8 +16,7 @@ import { SignupService } from '../shared/signup.service' | |||
17 | }) | 16 | }) |
18 | export class RegisterComponent implements OnInit { | 17 | export class RegisterComponent implements OnInit { |
19 | @ViewChild('lastStep') lastStep: CdkStep | 18 | @ViewChild('lastStep') lastStep: CdkStep |
20 | 19 | @ViewChild('instanceAboutAccordion') instanceAboutAccordion: InstanceAboutAccordionComponent | |
21 | accordion: NgbAccordionDirective | ||
22 | 20 | ||
23 | signupError: string | 21 | signupError: string |
24 | signupSuccess = false | 22 | signupSuccess = false |
@@ -121,15 +119,14 @@ export class RegisterComponent implements OnInit { | |||
121 | } | 119 | } |
122 | 120 | ||
123 | onTermsClick () { | 121 | onTermsClick () { |
124 | if (this.accordion) this.accordion.toggle('terms') | 122 | this.instanceAboutAccordion.expandTerms() |
125 | } | 123 | } |
126 | 124 | ||
127 | onCodeOfConductClick () { | 125 | onCodeOfConductClick () { |
128 | if (this.accordion) this.accordion.toggle('code-of-conduct') | 126 | this.instanceAboutAccordion.expandCodeOfConduct() |
129 | } | 127 | } |
130 | 128 | ||
131 | onInstanceAboutAccordionInit (instanceAboutAccordion: InstanceAboutAccordionComponent) { | 129 | onInstanceAboutAccordionInit (instanceAboutAccordion: InstanceAboutAccordionComponent) { |
132 | this.accordion = instanceAboutAccordion.accordion | ||
133 | this.aboutHtml = instanceAboutAccordion.aboutHtml | 130 | this.aboutHtml = instanceAboutAccordion.aboutHtml |
134 | } | 131 | } |
135 | 132 | ||