mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 16:26:16 +00:00
finalized login and signup ui
This commit is contained in:
@@ -8,5 +8,6 @@
|
|||||||
"forgot-password": "Forgot your password?",
|
"forgot-password": "Forgot your password?",
|
||||||
"error-login": "Wrong credentials.",
|
"error-login": "Wrong credentials.",
|
||||||
"continue-with-google": "Continue with Google",
|
"continue-with-google": "Continue with Google",
|
||||||
"continue-with-email": "Continue with Email"
|
"continue-with-email": "Continue with Email",
|
||||||
|
"other-option": "Log in with other option"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ export default function InitialLoginStep({
|
|||||||
|
|
||||||
return <div className='flex flex-col mx-auto w-full justify-center items-center'>
|
return <div className='flex flex-col mx-auto w-full justify-center items-center'>
|
||||||
<h1 className=' text-white text-center mb-5' >Login to Infisical</h1>
|
<h1 className=' text-white text-center mb-5' >Login to Infisical</h1>
|
||||||
<div className='w-1/5 bg-green text-center p-3 rounded-md'>
|
<div className='lg:w-1/5 w-1/3 bg-primary text-center p-3 rounded-md'>
|
||||||
<button type='button' className='text-black' onClick={() => {
|
<button type='button' className='text-black' onClick={() => {
|
||||||
window.open('/api/v1/oauth/redirect/google')
|
window.open('/api/v1/oauth/redirect/google')
|
||||||
}}>
|
}}>
|
||||||
{t('login:continue-with-google')}
|
{t('login:continue-with-google')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className='w-1/5 bg-black text-center p-3 rounded-md mt-4'>
|
<div className='lg:w-1/5 w-1/3 bg-chicago-900 text-center p-3 rounded-md mt-4'>
|
||||||
<button type='button' className='text-white' onClick={() => {
|
<button type='button' className='text-white' onClick={() => {
|
||||||
setIsLoginWithEmail(true);
|
setIsLoginWithEmail(true);
|
||||||
}}>
|
}}>
|
||||||
@@ -28,7 +28,9 @@ export default function InitialLoginStep({
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<Link href="/signup">
|
<Link href="/signup">
|
||||||
<h2 className='text-white mt-8 underline'>{t('login:create-account')}</h2>
|
<button type="button" className='text-white mt-8 underline'>
|
||||||
|
{t('login:create-account')}
|
||||||
|
</button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export default function PasswordInputStep({
|
|||||||
type="button"
|
type="button"
|
||||||
className="ml-1.5 text-sm font-normal text-primary-700 underline-offset-4 duration-200 hover:text-primary"
|
className="ml-1.5 text-sm font-normal text-primary-700 underline-offset-4 duration-200 hover:text-primary"
|
||||||
>
|
>
|
||||||
Login with other option
|
{t('login:other-option')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -12,23 +12,25 @@ export default function InitialSignupStep({
|
|||||||
|
|
||||||
return <div className='flex flex-col mx-auto w-full justify-center items-center '>
|
return <div className='flex flex-col mx-auto w-full justify-center items-center '>
|
||||||
<h1 className=' text-white text-center mb-5' >{t('signup:initial-title')}</h1>
|
<h1 className=' text-white text-center mb-5' >{t('signup:initial-title')}</h1>
|
||||||
<div className=' w-1/5 bg-green text-center p-3 rounded-md'>
|
<div className='lg:w-1/5 w-1/3 bg-primary text-center p-3 rounded-md'>
|
||||||
<button type='button' className='text-black' onClick={() => {
|
<button type='button' className='text-black' onClick={() => {
|
||||||
window.open('/api/v1/oauth/redirect/google')
|
window.open('/api/v1/oauth/redirect/google')
|
||||||
}}>
|
}}>
|
||||||
{t('signup:continue-with-google')}
|
{t('signup:continue-with-google')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className='w-1/5 bg-black text-center p-3 rounded-md mt-4'>
|
<div className='lg:w-1/5 w-1/3 bg-chicago-900 text-center p-3 rounded-md mt-4'>
|
||||||
<button type='button' className='text-white' onClick={() => {
|
<button type='button' className='text-white' onClick={() => {
|
||||||
setIsSignupWithEmail(true);
|
setIsSignupWithEmail(true);
|
||||||
}}>
|
}}>
|
||||||
{t('signup:continue-with-email')}
|
{t('signup:continue-with-email')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<span className='text-white w-1/6 text-xs mt-4 text-center'>{t('signup:create-policy')}</span>
|
<span className='text-white lg:w-1/6 w-1/3 text-xs mt-4 text-center'>{t('signup:create-policy')}</span>
|
||||||
<Link href="/login">
|
<Link href="/login">
|
||||||
<h2 className='text-white mt-8 underline'>{t('signup:already-have-account')}</h2>
|
<button type="button" className='text-white mt-8 underline'>
|
||||||
|
{t('signup:already-have-account')}
|
||||||
|
</button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export const PROVIDER_AUTH_TOKEN_KEY = 'infisical__provider-auth-token';
|
|||||||
export default class SecurityClient {
|
export default class SecurityClient {
|
||||||
|
|
||||||
static setProviderAuthToken(tokenStr: string) {
|
static setProviderAuthToken(tokenStr: string) {
|
||||||
localStorage.setItem(PROVIDER_AUTH_TOKEN_KEY, tokenStr)
|
localStorage.setItem(PROVIDER_AUTH_TOKEN_KEY, tokenStr || '')
|
||||||
}
|
}
|
||||||
|
|
||||||
static getProviderAuthToken() {
|
static getProviderAuthToken() {
|
||||||
|
|||||||
Reference in New Issue
Block a user