|
113 | 113 | scopes: ['read:user', 'user:email'] |
114 | 114 | }); |
115 | 115 | } |
116 | | -
|
117 | | - const Unauthenticated = resolvedProfile.component.unauthenticated; |
118 | 116 | </script> |
119 | 117 |
|
120 | 118 | <svelte:head> |
121 | 119 | <title>Sign up - {resolvedProfile.platform}</title> |
122 | 120 | </svelte:head> |
123 | 121 |
|
124 | | -<Unauthenticated coupon={data?.couponData} campaign={data?.campaign || testimonialCampaign}> |
125 | | - <svelte:fragment slot="title">Sign up</svelte:fragment> |
126 | | - <svelte:fragment> |
127 | | - <Form onSubmit={register}> |
128 | | - <Layout.Stack> |
129 | | - <InputText |
130 | | - id="name" |
131 | | - label="Name" |
132 | | - placeholder="Your name" |
133 | | - autofocus |
134 | | - required |
135 | | - autocomplete |
136 | | - bind:value={name} /> |
137 | | - <InputEmail |
138 | | - id="email" |
139 | | - label="Email" |
140 | | - placeholder="Your email" |
141 | | - required |
142 | | - bind:value={mail} /> |
143 | | - <InputPassword |
144 | | - id="password" |
145 | | - label="Password" |
146 | | - placeholder="Your password" |
147 | | - helper="Password must be at least 8 characters long" |
148 | | - required |
149 | | - bind:value={pass} /> |
150 | | - <InputChoice required bind:value={terms} id="terms" label="terms" showLabel={false}> |
151 | | - By registering, you agree that you have read, understand, and acknowledge our <Link.Anchor |
152 | | - href={resolvedProfile.links.privacy} |
153 | | - target="_blank" |
154 | | - rel="noopener noreferrer"> |
155 | | - Privacy Policy</Link.Anchor> |
156 | | - and accept our |
157 | | - <Link.Anchor |
158 | | - href={resolvedProfile.links.privacy} |
159 | | - target="_blank" |
160 | | - rel="noopener noreferrer">General Terms of Use</Link.Anchor |
161 | | - >.</InputChoice> |
| 122 | +{#await resolvedProfile.component.getUnauthenticated() then Unauthenticated} |
| 123 | + <Unauthenticated coupon={data?.couponData} campaign={data?.campaign || testimonialCampaign}> |
| 124 | + <svelte:fragment slot="title">Sign up</svelte:fragment> |
| 125 | + <svelte:fragment> |
| 126 | + <Form onSubmit={register}> |
| 127 | + <Layout.Stack> |
| 128 | + <InputText |
| 129 | + id="name" |
| 130 | + label="Name" |
| 131 | + placeholder="Your name" |
| 132 | + autofocus |
| 133 | + required |
| 134 | + autocomplete |
| 135 | + bind:value={name} /> |
| 136 | + <InputEmail |
| 137 | + id="email" |
| 138 | + label="Email" |
| 139 | + placeholder="Your email" |
| 140 | + required |
| 141 | + bind:value={mail} /> |
| 142 | + <InputPassword |
| 143 | + id="password" |
| 144 | + label="Password" |
| 145 | + placeholder="Your password" |
| 146 | + helper="Password must be at least 8 characters long" |
| 147 | + required |
| 148 | + bind:value={pass} /> |
| 149 | + <InputChoice |
| 150 | + required |
| 151 | + bind:value={terms} |
| 152 | + id="terms" |
| 153 | + label="terms" |
| 154 | + showLabel={false}> |
| 155 | + By registering, you agree that you have read, understand, and acknowledge |
| 156 | + our <Link.Anchor |
| 157 | + href={resolvedProfile.links.privacy} |
| 158 | + target="_blank" |
| 159 | + rel="noopener noreferrer"> |
| 160 | + Privacy Policy</Link.Anchor> |
| 161 | + and accept our |
| 162 | + <Link.Anchor |
| 163 | + href={resolvedProfile.links.privacy} |
| 164 | + target="_blank" |
| 165 | + rel="noopener noreferrer">General Terms of Use</Link.Anchor |
| 166 | + >.</InputChoice> |
162 | 167 |
|
163 | | - <Button fullWidth submit disabled={disabled || !terms}>Sign up</Button> |
| 168 | + <Button fullWidth submit disabled={disabled || !terms}>Sign up</Button> |
164 | 169 |
|
165 | | - {#if isCloud} |
166 | | - <span class="with-separators eyebrow-heading-3">or</span> |
167 | | - <Button |
168 | | - secondary |
169 | | - fullWidth |
170 | | - on:click={onGithubLogin} |
171 | | - disabled={disabled || !terms}> |
172 | | - <span class="icon-github" aria-hidden="true"></span> |
173 | | - <span class="text">Sign up with GitHub</span> |
174 | | - </Button> |
175 | | - {/if} |
176 | | - </Layout.Stack> |
177 | | - </Form> |
178 | | - </svelte:fragment> |
179 | | - <svelte:fragment slot="links"> |
180 | | - <Typography.Text variant="m-400"> |
181 | | - Already got an account? <Link.Anchor href={`${base}/login${page?.url?.search ?? ''}`} |
182 | | - >Sign in</Link.Anchor> |
183 | | - </Typography.Text> |
184 | | - </svelte:fragment> |
185 | | -</Unauthenticated> |
| 170 | + {#if isCloud} |
| 171 | + <span class="with-separators eyebrow-heading-3">or</span> |
| 172 | + <Button |
| 173 | + secondary |
| 174 | + fullWidth |
| 175 | + on:click={onGithubLogin} |
| 176 | + disabled={disabled || !terms}> |
| 177 | + <span class="icon-github" aria-hidden="true"></span> |
| 178 | + <span class="text">Sign up with GitHub</span> |
| 179 | + </Button> |
| 180 | + {/if} |
| 181 | + </Layout.Stack> |
| 182 | + </Form> |
| 183 | + </svelte:fragment> |
| 184 | + <svelte:fragment slot="links"> |
| 185 | + <Typography.Text variant="m-400"> |
| 186 | + Already got an account? <Link.Anchor |
| 187 | + href={`${base}/login${page?.url?.search ?? ''}`}>Sign in</Link.Anchor> |
| 188 | + </Typography.Text> |
| 189 | + </svelte:fragment> |
| 190 | + </Unauthenticated> |
| 191 | +{/await} |
0 commit comments