mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 08:27:36 +00:00
Final style changes to login/signup
This commit is contained in:
@@ -51,6 +51,7 @@ interface CodeInputStepProps {
|
|||||||
incrementStep: () => void;
|
incrementStep: () => void;
|
||||||
setCode: (value: string) => void;
|
setCode: (value: string) => void;
|
||||||
codeError: boolean;
|
codeError: boolean;
|
||||||
|
isCodeInputCheckLoading: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,7 +67,8 @@ export default function CodeInputStep({
|
|||||||
email,
|
email,
|
||||||
incrementStep,
|
incrementStep,
|
||||||
setCode,
|
setCode,
|
||||||
codeError
|
codeError,
|
||||||
|
isCodeInputCheckLoading
|
||||||
}: CodeInputStepProps): JSX.Element {
|
}: CodeInputStepProps): JSX.Element {
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const [isResendingVerificationEmail, setIsResendingVerificationEmail] = useState(false);
|
const [isResendingVerificationEmail, setIsResendingVerificationEmail] = useState(false);
|
||||||
@@ -118,6 +120,7 @@ export default function CodeInputStep({
|
|||||||
className='h-14'
|
className='h-14'
|
||||||
colorSchema="primary"
|
colorSchema="primary"
|
||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
|
isLoading={isCodeInputCheckLoading}
|
||||||
> {String(t('signup.verify'))} </Button>
|
> {String(t('signup.verify'))} </Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -177,10 +177,10 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
|||||||
>
|
>
|
||||||
{isLoading && (
|
{isLoading && (
|
||||||
<img
|
<img
|
||||||
src="/images/loading/loadingblack.gif"
|
src="/images/loading/loading.gif"
|
||||||
width={36}
|
width={36}
|
||||||
alt="loading animation"
|
alt="loading animation"
|
||||||
className="absolute rounded-xl"
|
className="absolute rounded-xl opacity-80"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -56,10 +56,10 @@ export default function Login() {
|
|||||||
value={password}
|
value={password}
|
||||||
onChange={(e) => setPassword(e.target.value)}
|
onChange={(e) => setPassword(e.target.value)}
|
||||||
type="password"
|
type="password"
|
||||||
placeholder="Enter your password..."
|
placeholder="Enter your email..."
|
||||||
isRequired
|
isRequired
|
||||||
autoComplete="current-password"
|
autoComplete="email"
|
||||||
id="current-password"
|
id="email"
|
||||||
className="h-12"
|
className="h-12"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export default function SignUp() {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { data: serverDetails } = useFetchServerStatus();
|
const { data: serverDetails } = useFetchServerStatus();
|
||||||
const [isSignupWithEmail, setIsSignupWithEmail] = useState(false);
|
const [isSignupWithEmail, setIsSignupWithEmail] = useState(false);
|
||||||
|
const [isCodeInputCheckLoading, setIsCodeInputCheckLoading] = useState(false);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { email: providerEmail, providerAuthToken, isProviderUserCompleted } = useProviderAuth();
|
const { email: providerEmail, providerAuthToken, isProviderUserCompleted } = useProviderAuth();
|
||||||
|
|
||||||
@@ -68,6 +69,7 @@ export default function SignUp() {
|
|||||||
if (step === 1 || step === 3 || step === 4) {
|
if (step === 1 || step === 3 || step === 4) {
|
||||||
setStep(step + 1);
|
setStep(step + 1);
|
||||||
} else if (step === 2) {
|
} else if (step === 2) {
|
||||||
|
setIsCodeInputCheckLoading(true);
|
||||||
// Checking if the code matches the email.
|
// Checking if the code matches the email.
|
||||||
const response = await checkEmailVerificationCode({ email, code });
|
const response = await checkEmailVerificationCode({ email, code });
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
@@ -77,6 +79,7 @@ export default function SignUp() {
|
|||||||
} else {
|
} else {
|
||||||
setCodeError(true);
|
setCodeError(true);
|
||||||
}
|
}
|
||||||
|
setIsCodeInputCheckLoading(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -109,6 +112,7 @@ export default function SignUp() {
|
|||||||
incrementStep={incrementStep}
|
incrementStep={incrementStep}
|
||||||
setCode={setCode}
|
setCode={setCode}
|
||||||
codeError={codeError}
|
codeError={codeError}
|
||||||
|
isCodeInputCheckLoading={isCodeInputCheckLoading}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -57,7 +57,8 @@ export const ProjectNameChangeSection = ({
|
|||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
isLoading={isSubmitting}
|
isLoading={isSubmitting}
|
||||||
color="mineshaft"
|
color="primary"
|
||||||
|
variant="outline_bg"
|
||||||
size="sm"
|
size="sm"
|
||||||
type="submit"
|
type="submit"
|
||||||
isDisabled={!isDirty || isSubmitting}
|
isDisabled={!isDirty || isSubmitting}
|
||||||
|
|||||||
Reference in New Issue
Block a user