-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactors IslandMenu and SignIn components; introduces SignUser compo…
…nent for streamlined sign-in and sign-up functionality; enhances tab switching and layout for improved user experience
- Loading branch information
1 parent
2a185d3
commit d1e9639
Showing
3 changed files
with
125 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<script setup lang="ts"> | ||
import { ButtonGroup, Button } from '@nobel/core' | ||
const signMode = ref<'signin' | 'signup'>('signin') | ||
</script> | ||
|
||
<template> | ||
<div class="signin"> | ||
<div class="toggle-wrapper border"> | ||
<ButtonGroup> | ||
<Button | ||
:variant="signMode === 'signin' ? 'primary' : 'base'" | ||
size="small" | ||
@click="signMode = 'signin'" | ||
> | ||
Sign in | ||
</Button> | ||
<Button | ||
:variant="signMode === 'signup' ? 'primary' : 'base'" | ||
size="small" | ||
@click="signMode = 'signup'" | ||
> | ||
Sign up | ||
</Button> | ||
</ButtonGroup> | ||
</div> | ||
<SignUp v-if="signMode === 'signup'" /> | ||
<SignIn v-else /> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss"> | ||
form { | ||
display: grid; | ||
gap: var(--space-1); | ||
} | ||
.signin { | ||
display: grid; | ||
gap: var(--space-2); | ||
width: 30em; | ||
} | ||
.toggle-wrapper { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: var(--block-big); | ||
padding: var(--space-quark); | ||
border-radius: var(--outer-radius); | ||
background-color: var(--base); | ||
.button-group { | ||
width: 100%; | ||
} | ||
button { | ||
width: 100%; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,12 @@ | ||
<script setup lang="ts"> | ||
import { ButtonGroup, Button } from '@nobel/core' | ||
definePageMeta({ | ||
auth: { | ||
only: 'guest', | ||
redirectUserTo: '/user', | ||
}, | ||
}) | ||
const signMode = ref<'signin' | 'signup'>('signin') | ||
</script> | ||
|
||
<template> | ||
<div class="signin"> | ||
<div class="toggle-wrapper border"> | ||
<ButtonGroup> | ||
<Button | ||
:variant="signMode === 'signin' ? 'primary' : 'base'" | ||
size="small" | ||
@click="signMode = 'signin'" | ||
> | ||
Sign in | ||
</Button> | ||
<Button | ||
:variant="signMode === 'signup' ? 'primary' : 'base'" | ||
size="small" | ||
@click="signMode = 'signup'" | ||
> | ||
Sign up | ||
</Button> | ||
</ButtonGroup> | ||
</div> | ||
<SignUp v-if="signMode === 'signup'" /> | ||
<SignIn v-else /> | ||
</div> | ||
<SignUser /> | ||
</template> | ||
|
||
<style lang="scss"> | ||
form { | ||
display: grid; | ||
gap: var(--space-1); | ||
} | ||
.signin { | ||
display: grid; | ||
gap: var(--space-2); | ||
width: 30em; | ||
} | ||
.toggle-wrapper { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: var(--block-big); | ||
padding: var(--space-quark); | ||
border-radius: var(--outer-radius); | ||
background-color: var(--base); | ||
.button-group { | ||
width: 100%; | ||
} | ||
button { | ||
width: 100%; | ||
} | ||
} | ||
</style> |