Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions src/routes/(public)/(guest)/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,18 @@
<svelte:fragment>
<Form onSubmit={login}>
<Layout.Stack>
{#if isCloud}
<Button
class="auth-provider-button"
secondary
fullWidth
on:click={onGithubLogin}
{disabled}>
<span class="icon-github" aria-hidden="true"></span>
<span class="text">Sign in with GitHub</span>
</Button>
<span class="with-separators eyebrow-heading-3">or</span>
{/if}
<InputEmail
id="email"
label="Email"
Expand All @@ -108,13 +120,6 @@
required={true}
bind:value={pass} />
<Button fullWidth submit {disabled}>Sign in</Button>
{#if isCloud}
<span class="with-separators eyebrow-heading-3">or</span>
<Button secondary fullWidth on:click={onGithubLogin} {disabled}>
<span class="icon-github" aria-hidden="true"></span>
<span class="text">Sign in with GitHub</span>
</Button>
{/if}
</Layout.Stack>
</Form>
</svelte:fragment>
Expand All @@ -129,3 +134,9 @@
</li>
</svelte:fragment>
</Unauthenticated>

<style>
:global(.auth-provider-button) {
margin-bottom: var(--gap-s, 8px);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe lets just wrap the button for now in a div with this style. don't wanna add more globals. we anyway plan to remove class support from Pink because it makes us use :global. Same for the other one.

</style>
31 changes: 19 additions & 12 deletions src/routes/(public)/(guest)/register/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@
<svelte:fragment>
<Form onSubmit={register}>
<Layout.Stack>
{#if isCloud}
<Button
class="auth-provider-button"
secondary
fullWidth
on:click={onGithubLogin}
{disabled}>
<span class="icon-github" aria-hidden="true"></span>
<span class="text">Sign up with GitHub</span>
</Button>
<span class="with-separators eyebrow-heading-3">or</span>
{/if}

<InputText
id="name"
label="Name"
Expand Down Expand Up @@ -159,18 +172,6 @@
>.</InputChoice>

<Button fullWidth submit disabled={disabled || !terms}>Sign up</Button>

{#if isCloud}
<span class="with-separators eyebrow-heading-3">or</span>
<Button
secondary
fullWidth
on:click={onGithubLogin}
disabled={disabled || !terms}>
<span class="icon-github" aria-hidden="true"></span>
<span class="text">Sign up with GitHub</span>
</Button>
{/if}
</Layout.Stack>
</Form>
</svelte:fragment>
Expand All @@ -181,3 +182,9 @@
</Typography.Text>
</svelte:fragment>
</Unauthenticated>

<style>
:global(.auth-provider-button) {
margin-bottom: var(--gap-s, 8px);
}
</style>