mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
pushed out soem changes
This commit is contained in:
@@ -3,6 +3,7 @@ import Link from "next/link";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { faGithub,faGoogle } from "@fortawesome/free-brands-svg-icons";
|
import { faGithub,faGoogle } from "@fortawesome/free-brands-svg-icons";
|
||||||
import { faEnvelope } from "@fortawesome/free-regular-svg-icons";
|
import { faEnvelope } from "@fortawesome/free-regular-svg-icons";
|
||||||
|
import { faLock } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import { Button } from "../v2";
|
import { Button } from "../v2";
|
||||||
@@ -26,7 +27,7 @@ export default function InitialSignupStep({
|
|||||||
window.close();
|
window.close();
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faGoogle} className="mr-2" />}
|
leftIcon={<FontAwesomeIcon icon={faGoogle} className="mr-2" />}
|
||||||
className="h-14 w-full mx-0"
|
className="h-12 w-full mx-0"
|
||||||
>
|
>
|
||||||
{t("signup.continue-with-google")}
|
{t("signup.continue-with-google")}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -40,7 +41,7 @@ export default function InitialSignupStep({
|
|||||||
window.close();
|
window.close();
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faGithub} className="mr-2" />}
|
leftIcon={<FontAwesomeIcon icon={faGithub} className="mr-2" />}
|
||||||
className="h-14 w-full mx-0"
|
className="h-12 w-full mx-0"
|
||||||
>
|
>
|
||||||
Continue with GitHub
|
Continue with GitHub
|
||||||
</Button>
|
</Button>
|
||||||
@@ -53,7 +54,7 @@ export default function InitialSignupStep({
|
|||||||
setIsSignupWithEmail(true);
|
setIsSignupWithEmail(true);
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faEnvelope} className="mr-2" />}
|
leftIcon={<FontAwesomeIcon icon={faEnvelope} className="mr-2" />}
|
||||||
className="h-14 w-full mx-0"
|
className="h-12 w-full mx-0"
|
||||||
>
|
>
|
||||||
Continue with Email
|
Continue with Email
|
||||||
</Button>
|
</Button>
|
||||||
@@ -63,10 +64,10 @@ export default function InitialSignupStep({
|
|||||||
colorSchema="primary"
|
colorSchema="primary"
|
||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
onClick={() => router.push("/saml-sso")}
|
onClick={() => router.push("/saml-sso")}
|
||||||
isFullWidth
|
leftIcon={<FontAwesomeIcon icon={faLock} className="mr-2" />}
|
||||||
className="h-14 w-full mx-0"
|
className="h-12 w-full mx-0"
|
||||||
>
|
>
|
||||||
Continue with SAML SSO
|
Continue with SSO
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className='lg:w-1/6 w-1/4 min-w-[20rem] px-8 text-center mt-6 text-xs text-bunker-400'>
|
<div className='lg:w-1/6 w-1/4 min-w-[20rem] px-8 text-center mt-6 text-xs text-bunker-400'>
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
|
|||||||
ref
|
ref
|
||||||
): JSX.Element => {
|
): JSX.Element => {
|
||||||
const handleInput = (event: ChangeEvent<HTMLInputElement>) => {
|
const handleInput = (event: ChangeEvent<HTMLInputElement>) => {
|
||||||
console.log(123, props, autoCapitalization)
|
|
||||||
if (autoCapitalization) {
|
if (autoCapitalization) {
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
event.target.value = event.target.value.toUpperCase();
|
event.target.value = event.target.value.toUpperCase();
|
||||||
|
|||||||
@@ -281,7 +281,6 @@ export const SecretInputRow = memo(
|
|||||||
value={editorRef}
|
value={editorRef}
|
||||||
isVisible={!isSecretValueHidden}
|
isVisible={!isSecretValueHidden}
|
||||||
onChange={(val, html) => {
|
onChange={(val, html) => {
|
||||||
console.log(val);
|
|
||||||
onChange(val);
|
onChange(val);
|
||||||
setEditorRef(html);
|
setEditorRef(html);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { faGithub,faGoogle } from "@fortawesome/free-brands-svg-icons";
|
import { faGithub,faGoogle } from "@fortawesome/free-brands-svg-icons";
|
||||||
|
import { faLock } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import axios from "axios"
|
import axios from "axios"
|
||||||
|
|
||||||
@@ -116,47 +117,6 @@ export const InitialStep = ({
|
|||||||
return (
|
return (
|
||||||
<form onSubmit={handleLogin} className='flex flex-col mx-auto w-full justify-center items-center'>
|
<form onSubmit={handleLogin} className='flex flex-col mx-auto w-full justify-center items-center'>
|
||||||
<h1 className='text-xl font-medium text-transparent bg-clip-text bg-gradient-to-b from-white to-bunker-200 text-center mb-8' >Login to Infisical</h1>
|
<h1 className='text-xl font-medium text-transparent bg-clip-text bg-gradient-to-b from-white to-bunker-200 text-center mb-8' >Login to Infisical</h1>
|
||||||
<div className='lg:w-1/6 w-1/4 min-w-[20rem] flex flex-row items-center my-4 py-2'>
|
|
||||||
<div className='w-full border-t border-mineshaft-500' />
|
|
||||||
</div>
|
|
||||||
<div className='lg:w-1/6 w-1/4 min-w-[21.2rem] md:min-w-[20.1rem] text-center rounded-md'>
|
|
||||||
<Input
|
|
||||||
value={email}
|
|
||||||
onChange={(e) => setEmail(e.target.value)}
|
|
||||||
type="email"
|
|
||||||
placeholder="Enter your email..."
|
|
||||||
isRequired
|
|
||||||
autoComplete="username"
|
|
||||||
className="h-12"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className='lg:w-1/6 w-1/4 min-w-[21.2rem] md:min-w-[20.1rem] text-center rounded-md mt-4'>
|
|
||||||
<Input
|
|
||||||
value={password}
|
|
||||||
onChange={(e) => setPassword(e.target.value)}
|
|
||||||
type="password"
|
|
||||||
placeholder="Enter your password..."
|
|
||||||
isRequired
|
|
||||||
autoComplete="current-password"
|
|
||||||
id="current-password"
|
|
||||||
className="h-12 select:-webkit-autofill:focus"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className='lg:w-1/6 w-1/4 min-w-[21.2rem] md:min-w-[20.1rem] text-center rounded-md mt-4'>
|
|
||||||
<Button
|
|
||||||
type="submit"
|
|
||||||
size="sm"
|
|
||||||
isFullWidth
|
|
||||||
className='h-12'
|
|
||||||
colorSchema="primary"
|
|
||||||
variant="solid"
|
|
||||||
isLoading={isLoading}
|
|
||||||
> Continue with Email </Button>
|
|
||||||
</div>
|
|
||||||
{!isLoading && loginError && <Error text={t("login.error-login") ?? ""} />}
|
|
||||||
<div className='lg:w-1/6 w-1/4 min-w-[20rem] flex flex-row items-center mt-4 py-2'>
|
|
||||||
<div className='w-full border-t border-mineshaft-500' />
|
|
||||||
</div>
|
|
||||||
<div className='lg:w-1/6 w-1/4 min-w-[21.2rem] md:min-w-[20.1rem] text-center rounded-md mt-4'>
|
<div className='lg:w-1/6 w-1/4 min-w-[21.2rem] md:min-w-[20.1rem] text-center rounded-md mt-4'>
|
||||||
<Button
|
<Button
|
||||||
colorSchema="primary"
|
colorSchema="primary"
|
||||||
@@ -168,7 +128,7 @@ export const InitialStep = ({
|
|||||||
window.close();
|
window.close();
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faGoogle} className="mr-2" />}
|
leftIcon={<FontAwesomeIcon icon={faGoogle} className="mr-2" />}
|
||||||
className="h-12 w-full mx-0"
|
className="h-11 w-full mx-0"
|
||||||
>
|
>
|
||||||
{t("login.continue-with-google")}
|
{t("login.continue-with-google")}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -185,7 +145,7 @@ export const InitialStep = ({
|
|||||||
window.close();
|
window.close();
|
||||||
}}
|
}}
|
||||||
leftIcon={<FontAwesomeIcon icon={faGithub} className="mr-2" />}
|
leftIcon={<FontAwesomeIcon icon={faGithub} className="mr-2" />}
|
||||||
className="h-12 w-full mx-0"
|
className="h-11 w-full mx-0"
|
||||||
>
|
>
|
||||||
Continue with GitHub
|
Continue with GitHub
|
||||||
</Button>
|
</Button>
|
||||||
@@ -197,12 +157,52 @@ export const InitialStep = ({
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
setStep(2);
|
setStep(2);
|
||||||
}}
|
}}
|
||||||
isFullWidth
|
leftIcon={<FontAwesomeIcon icon={faLock} className="mr-2" />}
|
||||||
className="h-12 w-full mx-0"
|
className="h-11 w-full mx-0"
|
||||||
>
|
>
|
||||||
Continue with SAML SSO
|
Continue with SSO
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
<div className='lg:w-1/6 w-1/4 min-w-[20rem] flex flex-row items-center my-4 py-2'>
|
||||||
|
<div className='w-full border-t border-mineshaft-400/60' />
|
||||||
|
<span className="mx-2 text-mineshaft-200 text-xs">or</span>
|
||||||
|
<div className='w-full border-t border-mineshaft-400/60' />
|
||||||
|
</div>
|
||||||
|
<div className='lg:w-1/6 w-1/4 min-w-[21.2rem] md:min-w-[20.1rem] text-center rounded-md'>
|
||||||
|
<Input
|
||||||
|
value={email}
|
||||||
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
|
type="email"
|
||||||
|
placeholder="Enter your email..."
|
||||||
|
isRequired
|
||||||
|
autoComplete="username"
|
||||||
|
className="h-11"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className='lg:w-1/6 w-1/4 min-w-[21.2rem] md:min-w-[20.1rem] text-center rounded-md mt-4'>
|
||||||
|
<Input
|
||||||
|
value={password}
|
||||||
|
onChange={(e) => setPassword(e.target.value)}
|
||||||
|
type="password"
|
||||||
|
placeholder="Enter your password..."
|
||||||
|
isRequired
|
||||||
|
autoComplete="current-password"
|
||||||
|
id="current-password"
|
||||||
|
className="h-11 select:-webkit-autofill:focus"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className='lg:w-1/6 w-1/4 min-w-[21.2rem] md:min-w-[20.1rem] text-center rounded-md mt-5'>
|
||||||
|
<Button
|
||||||
|
type="submit"
|
||||||
|
size="sm"
|
||||||
|
isFullWidth
|
||||||
|
className='h-11'
|
||||||
|
colorSchema="primary"
|
||||||
|
variant="solid"
|
||||||
|
isLoading={isLoading}
|
||||||
|
> Continue with Email </Button>
|
||||||
|
</div>
|
||||||
|
{!isLoading && loginError && <Error text={t("login.error-login") ?? ""} />}
|
||||||
{
|
{
|
||||||
!serverDetails?.inviteOnlySignup ?
|
!serverDetails?.inviteOnlySignup ?
|
||||||
<div className="mt-6 text-bunker-400 text-sm flex flex-row">
|
<div className="mt-6 text-bunker-400 text-sm flex flex-row">
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import crypto from "crypto";
|
|||||||
|
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { faXmark } from "@fortawesome/free-solid-svg-icons";
|
import { faInfoCircle, faXmark } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import jsrp from "jsrp";
|
import jsrp from "jsrp";
|
||||||
import nacl from "tweetnacl";
|
import nacl from "tweetnacl";
|
||||||
@@ -198,7 +198,7 @@ export const UserInfoSSOStep = ({
|
|||||||
localStorage.setItem("orgData.id", orgId);
|
localStorage.setItem("orgData.id", orgId);
|
||||||
localStorage.setItem("projectData.id", project._id);
|
localStorage.setItem("projectData.id", project._id);
|
||||||
|
|
||||||
setStep(1);
|
setStep(1);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@@ -256,7 +256,7 @@ export const UserInfoSSOStep = ({
|
|||||||
)}
|
)}
|
||||||
<div className="mt-2 flex lg:w-1/6 w-1/4 min-w-[20rem] max-h-60 w-full flex-col items-center justify-center rounded-lg py-2">
|
<div className="mt-2 flex lg:w-1/6 w-1/4 min-w-[20rem] max-h-60 w-full flex-col items-center justify-center rounded-lg py-2">
|
||||||
<InputField
|
<InputField
|
||||||
label={t("section.password.password")}
|
label="Infisical Password"
|
||||||
onChangeHandler={(pass: string) => {
|
onChangeHandler={(pass: string) => {
|
||||||
setPassword(pass);
|
setPassword(pass);
|
||||||
checkPassword({
|
checkPassword({
|
||||||
@@ -272,6 +272,7 @@ export const UserInfoSSOStep = ({
|
|||||||
autoComplete="new-password"
|
autoComplete="new-password"
|
||||||
id="new-password"
|
id="new-password"
|
||||||
/>
|
/>
|
||||||
|
<div className="mt-2 w-min min-w-[20rem] max-h-60 flex-col items-center justify-center rounded-md px-1.5 bg-mineshaft-500 text-mineshaft-300 text-xs p-1.5"><FontAwesomeIcon icon={faInfoCircle} className="mr-1.5" />Infisical Password is used as part of the encryption mechanism so that even the authentication provider is not able to access your secrets.</div>
|
||||||
{Object.keys(errors).length > 0 && (
|
{Object.keys(errors).length > 0 && (
|
||||||
<div className="mt-4 flex w-full flex-col items-start rounded-md bg-white/5 px-2 py-2">
|
<div className="mt-4 flex w-full flex-col items-start rounded-md bg-white/5 px-2 py-2">
|
||||||
<div className="mb-2 text-sm text-gray-400">{t("section.password.validate-base")}</div>
|
<div className="mb-2 text-sm text-gray-400">{t("section.password.validate-base")}</div>
|
||||||
@@ -307,7 +308,7 @@ export const UserInfoSSOStep = ({
|
|||||||
onClick={signupErrorCheck}
|
onClick={signupErrorCheck}
|
||||||
size="sm"
|
size="sm"
|
||||||
isFullWidth
|
isFullWidth
|
||||||
className='h-14'
|
className='h-12'
|
||||||
colorSchema="primary"
|
colorSchema="primary"
|
||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
|
|||||||
Reference in New Issue
Block a user