aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-11-16 17:02:21 +0100
committerChocobozzz <me@florianbigard.com>2018-11-16 17:02:21 +0100
commitd8c9996ce2b4de3ef1f2d36f63e461006bab58ed (patch)
treea6ce2cc4f5954fd37dded642d5bab5ee0ce70f93 /client
parent58d515e32fe1d0133435b3a5e550c6ff24906fff (diff)
downloadPeerTube-d8c9996ce2b4de3ef1f2d36f63e461006bab58ed.tar.gz
PeerTube-d8c9996ce2b4de3ef1f2d36f63e461006bab58ed.tar.zst
PeerTube-d8c9996ce2b4de3ef1f2d36f63e461006bab58ed.zip
Improve message visibility on signup
Diffstat (limited to 'client')
-rw-r--r--client/src/app/signup/signup.component.html3
-rw-r--r--client/src/app/signup/signup.component.ts20
-rw-r--r--client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts1
3 files changed, 14 insertions, 10 deletions
diff --git a/client/src/app/signup/signup.component.html b/client/src/app/signup/signup.component.html
index 531a97814..0207a166e 100644
--- a/client/src/app/signup/signup.component.html
+++ b/client/src/app/signup/signup.component.html
@@ -4,6 +4,7 @@
4 Create an account 4 Create an account
5 </div> 5 </div>
6 6
7 <div *ngIf="info" class="alert alert-info">{{ info }}</div>
7 <div *ngIf="error" class="alert alert-danger">{{ error }}</div> 8 <div *ngIf="error" class="alert alert-danger">{{ error }}</div>
8 9
9 <div class="d-flex justify-content-left flex-wrap"> 10 <div class="d-flex justify-content-left flex-wrap">
@@ -59,7 +60,7 @@
59 </div> 60 </div>
60 </div> 61 </div>
61 62
62 <input type="submit" i18n-value value="Signup" [disabled]="!form.valid"> 63 <input type="submit" i18n-value value="Signup" [disabled]="!form.valid || signupDone">
63 </form> 64 </form>
64 65
65 <div> 66 <div>
diff --git a/client/src/app/signup/signup.component.ts b/client/src/app/signup/signup.component.ts
index cf2657b85..607d64893 100644
--- a/client/src/app/signup/signup.component.ts
+++ b/client/src/app/signup/signup.component.ts
@@ -12,7 +12,9 @@ import { FormValidatorService } from '@app/shared/forms/form-validators/form-val
12 styleUrls: [ './signup.component.scss' ] 12 styleUrls: [ './signup.component.scss' ]
13}) 13})
14export class SignupComponent extends FormReactive implements OnInit { 14export class SignupComponent extends FormReactive implements OnInit {
15 info: string = null
15 error: string = null 16 error: string = null
17 signupDone = false
16 18
17 constructor ( 19 constructor (
18 protected formValidatorService: FormValidatorService, 20 protected formValidatorService: FormValidatorService,
@@ -50,17 +52,17 @@ export class SignupComponent extends FormReactive implements OnInit {
50 52
51 this.userService.signup(userCreate).subscribe( 53 this.userService.signup(userCreate).subscribe(
52 () => { 54 () => {
55 this.signupDone = true
56
53 if (this.requiresEmailVerification) { 57 if (this.requiresEmailVerification) {
54 this.notificationsService.alert( 58 this.info = this.i18n('Welcome! Now please check your emails to verify your account and complete signup.')
55 this.i18n('Welcome'), 59 return
56 this.i18n('Please check your email to verify your account and complete signup.')
57 )
58 } else {
59 this.notificationsService.success(
60 this.i18n('Success'),
61 this.i18n('Registration for {{username}} complete.', { username: userCreate.username })
62 )
63 } 60 }
61
62 this.notificationsService.success(
63 this.i18n('Success'),
64 this.i18n('Registration for {{username}} complete.', { username: userCreate.username })
65 )
64 this.redirectService.redirectToHomepage() 66 this.redirectService.redirectToHomepage()
65 }, 67 },
66 68
diff --git a/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts b/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts
index 796fbe531..eaf819726 100644
--- a/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts
+++ b/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts
@@ -60,6 +60,7 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni
60 hide () { 60 hide () {
61 this.closingModal = true 61 this.closingModal = true
62 this.openedModal.close() 62 this.openedModal.close()
63 this.form.reset()
63 } 64 }
64 65
65 isReplacingExistingCaption () { 66 isReplacingExistingCaption () {