mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: minor ui updates and validation fix.
This commit is contained in:
parent
a72e4bb2c9
commit
57da79392a
@ -113,6 +113,7 @@ export const InstanceSignInForm: FC = (props) => {
|
||||
placeholder="name@company.com"
|
||||
value={formData.email}
|
||||
onChange={(e) => handleFormChange("email", e.target.value)}
|
||||
autoFocus
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -291,7 +291,7 @@ export const InstanceSignUpForm: FC = (props) => {
|
||||
<label className="text-sm text-custom-text-300 font-medium cursor-pointer" htmlFor="is_telemetry_enabled">
|
||||
Allow Plane to anonymously collect usage events.
|
||||
</label>
|
||||
<a href="#" className="text-sm font-medium text-blue-500 hover:text-blue-600">
|
||||
<a href="https://docs.plane.so/telemetry" className="text-sm font-medium text-blue-500 hover:text-blue-600">
|
||||
See More
|
||||
</a>
|
||||
</div>
|
||||
|
@ -1,7 +1,10 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
// hooks
|
||||
// types
|
||||
import useTimer from "hooks/use-timer";
|
||||
import useToast from "hooks/use-toast";
|
||||
import { useRouter } from "next/router";
|
||||
// types
|
||||
import { IEmailCheckData } from "types/auth";
|
||||
// icons
|
||||
import { CircleCheck, XCircle } from "lucide-react";
|
||||
// ui
|
||||
@ -10,9 +13,6 @@ import { Button, Input } from "@plane/ui";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { AuthService } from "@/services/authentication.service";
|
||||
import useTimer from "hooks/use-timer";
|
||||
import useToast from "hooks/use-toast";
|
||||
import { IEmailCheckData } from "types/auth";
|
||||
import { EAuthModes } from "./root";
|
||||
|
||||
type Props = {
|
||||
@ -175,8 +175,8 @@ export const UniqueCodeForm: React.FC<Props> = (props) => {
|
||||
variant="primary"
|
||||
className="w-full"
|
||||
size="lg"
|
||||
// disabled={!isValid || hasEmailChanged}
|
||||
loading={isRequestingNewCode}
|
||||
disabled={isRequestingNewCode || !uniqueCodeFormData.code}
|
||||
>
|
||||
{isRequestingNewCode ? "Sending code" : submitButtonText}
|
||||
</Button>
|
||||
|
@ -91,7 +91,7 @@ export const SignUpAuthRoot: FC = observer(() => {
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="relative max-w-lg px-5 border border-red-500 mx-auto flex flex-col space-y-6">
|
||||
<div className="relative max-w-lg px-5 mx-auto flex flex-col space-y-6">
|
||||
<AuthHeader
|
||||
workspaceSlug={workspaceSlug?.toString() || undefined}
|
||||
invitationId={invitation_id?.toString() || undefined}
|
||||
|
@ -36,7 +36,7 @@ export const CreateWorkspace: React.FC<Props> = (props) => {
|
||||
handleSubmit,
|
||||
control,
|
||||
setValue,
|
||||
formState: { errors, isSubmitting },
|
||||
formState: { errors, isSubmitting, isValid },
|
||||
} = useForm<IWorkspace>({
|
||||
defaultValues: {
|
||||
name: "",
|
||||
@ -177,6 +177,7 @@ export const CreateWorkspace: React.FC<Props> = (props) => {
|
||||
ref={ref}
|
||||
hasError={Boolean(errors.name)}
|
||||
className="w-full border-onboarding-border-100 placeholder:text-custom-text-400"
|
||||
autoFocus
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
@ -255,7 +256,7 @@ export const CreateWorkspace: React.FC<Props> = (props) => {
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<Button variant="primary" type="submit" size="lg" className="w-full">
|
||||
<Button variant="primary" type="submit" size="lg" className="w-full" disabled={!isValid || invalidSlug}>
|
||||
{isSubmitting ? "Creating..." : "Continue"}
|
||||
</Button>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user