File tree Expand file tree Collapse file tree 5 files changed +60
-60
lines changed
apps/web/src/routes/(app) Expand file tree Collapse file tree 5 files changed +60
-60
lines changed Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import { AUTH_SERVICE } from ' $lib/auth/authService.svelte' ;
3
3
import { inject } from ' @gitbutler/core/context' ;
4
- // import { goto } from '$app/navigation';
5
4
import { env } from ' $env/dynamic/public' ;
6
5
7
6
const authService = inject (AUTH_SERVICE );
Original file line number Diff line number Diff line change 95
95
</div >
96
96
</div >
97
97
98
+ {#if confirmationSent }
99
+ <InfoMessage filled outlined ={false } style =" success" class =" m-bottom-16" >
100
+ {#snippet content ()}
101
+ <p >Confirmation email sent! Please check your inbox.</p >
102
+ {/ snippet }
103
+ </InfoMessage >
104
+ {:else if error }
105
+ <InfoMessage filled outlined ={false } style =" error" class =" m-bottom-16" >
106
+ {#snippet content ()}
107
+ {#if errorCode === ' email_not_verified' }
108
+ <p >
109
+ Verify your email before logging in. Check your inbox or <button
110
+ type =" button"
111
+ class =" resend-confirm-btn"
112
+ onclick ={resendConfirmationEmail }
113
+ disabled ={! email }
114
+ >
115
+ resend the confirmation email</button
116
+ >.
117
+ </p >
118
+ {:else }
119
+ <p >{error }</p >
120
+ {/if }
121
+ {/ snippet }
122
+ </InfoMessage >
123
+ {/if }
124
+
98
125
<Button type ="submit" style ="pop" disabled ={! isFormValid }>Log in</Button >
99
126
</form >
100
-
101
- {#if confirmationSent }
102
- <InfoMessage filled outlined ={false } style =" success" class =" m-top-16" >
103
- {#snippet content ()}
104
- <p >Confirmation email sent! Please check your inbox.</p >
105
- {/ snippet }
106
- </InfoMessage >
107
- {:else if error }
108
- <InfoMessage filled outlined ={false } style =" error" class =" m-top-16" >
109
- {#snippet content ()}
110
- {#if errorCode === ' email_not_verified' }
111
- <p >
112
- Verify your email before logging in. Check your inbox or <button
113
- type =" button"
114
- class =" resend-confirm-btn"
115
- onclick ={resendConfirmationEmail }
116
- disabled ={! email }
117
- >
118
- resend the confirmation email</button
119
- >.
120
- </p >
121
- {:else }
122
- <p >{error }</p >
123
- {/if }
124
- {/ snippet }
125
- </InfoMessage >
126
- {/if }
127
127
</AuthPageLayout >
128
128
129
129
<style lang =" postcss" >
Original file line number Diff line number Diff line change 46
46
{:else }
47
47
<div class =" service-form__inputs" >
48
48
<EmailTextbox bind:value ={email } label =" Email" />
49
+
50
+ {#if error }
51
+ <InfoMessage filled outlined ={false } style =" error" >
52
+ {#snippet content ()}
53
+ {error }
54
+ {/ snippet }
55
+ </InfoMessage >
56
+ {/if }
57
+
49
58
<Button style ="pop" type ="submit" onclick ={handleSubmit }>Send a reset link</Button >
50
59
</div >
51
-
52
- {#if error }
53
- <InfoMessage filled outlined ={false } style =" error" class =" m-top-16" >
54
- {#snippet content ()}
55
- {error }
56
- {/ snippet }
57
- </InfoMessage >
58
- {/if }
59
60
{/if }
60
61
</AuthUtilityLayout >
61
62
Original file line number Diff line number Diff line change 64
64
await userService .refreshUser ();
65
65
}
66
66
67
- $effect (() => {
68
- if (! isLoggedIn ) {
69
- goto (routesService .loginPath ());
70
- } else if (isFinalized ) {
71
- goto (routesService .homePath ());
72
- }
73
- });
67
+ // $effect(() => {
68
+ // if (!isLoggedIn) {
69
+ // goto(routesService.loginPath());
70
+ // } else if (isFinalized) {
71
+ // goto(routesService.homePath());
72
+ // }
73
+ // });
74
74
</script >
75
75
76
76
<svelte:head >
77
- <title >GitButler | Login </title >
77
+ <title >GitButler | Finalize Account </title >
78
78
</svelte:head >
79
79
80
80
<form onsubmit ={handleSubmit } class =" finalize-form" >
Original file line number Diff line number Diff line change 82
82
<PasswordConfirmation bind:this ={passwordComponent } bind:password bind:passwordConfirmation />
83
83
</div >
84
84
85
- <Button type ="submit" style ="pop" disabled ={! isFormValid }>Create account</Button >
86
- </form >
85
+ {#if error }
86
+ <InfoMessage filled outlined ={false } style =" error" class =" m-bottom-16" >
87
+ {#snippet content ()}
88
+ {error }
89
+ {/ snippet }
90
+ </InfoMessage >
91
+ {/if }
87
92
88
- {#if error }
89
- <InfoMessage filled outlined ={false } style =" error " class =" m-top -16" >
90
- {#snippet content ()}
91
- { error }
92
- {/ snippet }
93
- </InfoMessage >
94
- {/if }
93
+ {#if message }
94
+ <InfoMessage filled outlined ={false } style =" success " class =" m-bottom -16" >
95
+ {#snippet content ()}
96
+ { message }
97
+ {/ snippet }
98
+ </InfoMessage >
99
+ {/if }
95
100
96
- {#if message }
97
- <InfoMessage filled outlined ={false } style =" success" class =" m-top-16" >
98
- {#snippet content ()}
99
- {message }
100
- {/ snippet }
101
- </InfoMessage >
102
- {/if }
101
+ <Button type ="submit" style ="pop" disabled ={! isFormValid }>Create account</Button >
102
+ </form >
103
103
</AuthPageLayout >
104
104
105
105
<style lang =" postcss" >
You can’t perform that action at this time.
0 commit comments