-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: God Mode UI Updates and More Config Settings (#2877)
* feat: Images in Plane config screen. * feat: Enable/ Disable Magic Login config toggle. * style: UX copy and design updates across all screens. * style: SSO and OAuth Screen revamp. * style: Enter God Mode button for Profile Settings sidebar. * fix: update input type to password for password fields.
- Loading branch information
1 parent
5c6a59b
commit 2980c7b
Showing
19 changed files
with
656 additions
and
344 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 |
---|---|---|
|
@@ -31,6 +31,7 @@ export const InstanceEmailForm: FC<IInstanceEmailForm> = (props) => { | |
// form data | ||
const { | ||
handleSubmit, | ||
watch, | ||
control, | ||
formState: { errors, isSubmitting }, | ||
} = useForm<EmailFormValues>({ | ||
|
@@ -60,11 +61,7 @@ export const InstanceEmailForm: FC<IInstanceEmailForm> = (props) => { | |
}; | ||
|
||
return ( | ||
<div className="flex flex-col gap-8 m-8 w-4/5"> | ||
<div className="pb-2 mb-2 border-b border-custom-border-100"> | ||
<div className="text-custom-text-100 font-medium text-lg">Email</div> | ||
<div className="text-custom-text-300 font-normal text-sm">Email related settings.</div> | ||
</div> | ||
<> | ||
<div className="grid grid-col grid-cols-1 lg:grid-cols-2 items-center justify-between gap-x-16 gap-y-8 w-full"> | ||
<div className="flex flex-col gap-1"> | ||
<h4 className="text-sm">Host</h4> | ||
|
@@ -80,7 +77,7 @@ export const InstanceEmailForm: FC<IInstanceEmailForm> = (props) => { | |
onChange={onChange} | ||
ref={ref} | ||
hasError={Boolean(errors.EMAIL_HOST)} | ||
placeholder="Email Host" | ||
placeholder="email.google.com" | ||
className="rounded-md font-medium w-full" | ||
/> | ||
)} | ||
|
@@ -101,7 +98,7 @@ export const InstanceEmailForm: FC<IInstanceEmailForm> = (props) => { | |
onChange={onChange} | ||
ref={ref} | ||
hasError={Boolean(errors.EMAIL_PORT)} | ||
placeholder="Email Port" | ||
placeholder="8080" | ||
className="rounded-md font-medium w-full" | ||
/> | ||
)} | ||
|
@@ -123,7 +120,7 @@ export const InstanceEmailForm: FC<IInstanceEmailForm> = (props) => { | |
onChange={onChange} | ||
ref={ref} | ||
hasError={Boolean(errors.EMAIL_HOST_USER)} | ||
placeholder="Username" | ||
placeholder="[email protected]" | ||
className="rounded-md font-medium w-full" | ||
/> | ||
)} | ||
|
@@ -139,7 +136,7 @@ export const InstanceEmailForm: FC<IInstanceEmailForm> = (props) => { | |
<Input | ||
id="EMAIL_HOST_PASSWORD" | ||
name="EMAIL_HOST_PASSWORD" | ||
type="text" | ||
type="password" | ||
value={value} | ||
onChange={onChange} | ||
ref={ref} | ||
|
@@ -152,45 +149,55 @@ export const InstanceEmailForm: FC<IInstanceEmailForm> = (props) => { | |
</div> | ||
</div> | ||
|
||
<div className="flex items-center gap-8 pt-4"> | ||
<div> | ||
<div className="text-custom-text-100 font-medium text-sm">Enable TLS</div> | ||
</div> | ||
<div> | ||
<Controller | ||
control={control} | ||
name="EMAIL_USE_TLS" | ||
render={({ field: { value, onChange } }) => ( | ||
<ToggleSwitch | ||
value={Boolean(parseInt(value))} | ||
onChange={() => { | ||
Boolean(parseInt(value)) === true ? onChange("0") : onChange("1"); | ||
}} | ||
size="sm" | ||
/> | ||
)} | ||
/> | ||
<div className="w-full lg:w-1/2 flex flex-col px-1 gap-y-8"> | ||
<div className="flex items-center gap-8 pt-4 mr-8"> | ||
<div className="grow"> | ||
<div className="text-custom-text-100 font-medium text-sm"> | ||
Turn TLS {Boolean(parseInt(watch("EMAIL_USE_TLS"))) ? "off" : "on"} | ||
</div> | ||
<div className="text-custom-text-300 font-normal text-xs">Use this if your email domain supports TLS.</div> | ||
</div> | ||
<div className="shrink-0"> | ||
<Controller | ||
control={control} | ||
name="EMAIL_USE_TLS" | ||
render={({ field: { value, onChange } }) => ( | ||
<ToggleSwitch | ||
value={Boolean(parseInt(value))} | ||
onChange={() => { | ||
Boolean(parseInt(value)) === true ? onChange("0") : onChange("1"); | ||
}} | ||
size="sm" | ||
/> | ||
)} | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div className="flex items-center gap-8 pt-4"> | ||
<div> | ||
<div className="text-custom-text-100 font-medium text-sm">Enable SSL</div> | ||
</div> | ||
<div> | ||
<Controller | ||
control={control} | ||
name="EMAIL_USE_SSL" | ||
render={({ field: { value, onChange } }) => ( | ||
<ToggleSwitch | ||
value={Boolean(parseInt(value))} | ||
onChange={() => { | ||
Boolean(parseInt(value)) === true ? onChange("0") : onChange("1"); | ||
}} | ||
size="sm" | ||
/> | ||
)} | ||
/> | ||
<div className="flex items-center gap-8 pt-4 mr-8"> | ||
<div className="grow"> | ||
<div className="text-custom-text-100 font-medium text-sm"> | ||
Turn SSL {Boolean(parseInt(watch("EMAIL_USE_SSL"))) ? "off" : "on"} | ||
</div> | ||
<div className="text-custom-text-300 font-normal text-xs"> | ||
Most email domains support SSL. Use this to secure comms between this instance and your users. | ||
</div> | ||
</div> | ||
<div className="shrink-0"> | ||
<Controller | ||
control={control} | ||
name="EMAIL_USE_SSL" | ||
render={({ field: { value, onChange } }) => ( | ||
<ToggleSwitch | ||
value={Boolean(parseInt(value))} | ||
onChange={() => { | ||
Boolean(parseInt(value)) === true ? onChange("0") : onChange("1"); | ||
}} | ||
size="sm" | ||
/> | ||
)} | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
@@ -199,6 +206,6 @@ export const InstanceEmailForm: FC<IInstanceEmailForm> = (props) => { | |
{isSubmitting ? "Saving..." : "Save Changes"} | ||
</Button> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}; |
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
Oops, something went wrong.