mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
style: space auth ux copy.
This commit is contained in:
parent
ce4cc7f2cf
commit
9261da8e86
@ -26,43 +26,28 @@ type TTitle = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
type THeaderSubheader = {
|
type THeaderSubheader = {
|
||||||
[mode in EAuthModes]: {
|
[mode in EAuthModes]: TTitle;
|
||||||
[step in Exclude<EAuthSteps, EAuthSteps.EMAIL>]: TTitle;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const Titles: THeaderSubheader = {
|
const titles: THeaderSubheader = {
|
||||||
[EAuthModes.SIGN_IN]: {
|
[EAuthModes.SIGN_IN]: {
|
||||||
[EAuthSteps.PASSWORD]: {
|
header: "Sign in to upvote or comment",
|
||||||
header: "Sign in to Plane",
|
subHeader: "Contribute in nudging the features you want to get built.",
|
||||||
subHeader: "Get back to your projects and make progress",
|
|
||||||
},
|
|
||||||
[EAuthSteps.UNIQUE_CODE]: {
|
|
||||||
header: "Sign in to Plane",
|
|
||||||
subHeader: "Get back to your projects and make progress",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
[EAuthModes.SIGN_UP]: {
|
[EAuthModes.SIGN_UP]: {
|
||||||
[EAuthSteps.PASSWORD]: {
|
header: "Comment or react to issues",
|
||||||
header: "Create your account",
|
subHeader: "Use plane to add your valuable inputs to features.",
|
||||||
subHeader: "Progress, visualize, and measure work how it works best for you.",
|
|
||||||
},
|
|
||||||
[EAuthSteps.UNIQUE_CODE]: {
|
|
||||||
header: "Create your account",
|
|
||||||
subHeader: "Progress, visualize, and measure work how it works best for you.",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: Better approach for this.
|
const getHeaderSubHeader = (mode: EAuthModes | null): TTitle => {
|
||||||
const getHeaderSubHeader = (mode: EAuthModes | null, step: EAuthSteps): TTitle => {
|
|
||||||
if (mode) {
|
if (mode) {
|
||||||
return (Titles[mode] as any)[step];
|
return titles[mode];
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
header: "Get started with Plane",
|
header: "Comment or react to issues",
|
||||||
subHeader: "Progress, visualize, and measure work how it works best for you.",
|
subHeader: "Use plane to add your valuable inputs to features.",
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -81,7 +66,7 @@ export const AuthRoot = observer(() => {
|
|||||||
// derived values
|
// derived values
|
||||||
const isSmtpConfigured = instance?.config?.is_smtp_configured;
|
const isSmtpConfigured = instance?.config?.is_smtp_configured;
|
||||||
|
|
||||||
const { header, subHeader } = getHeaderSubHeader(authMode, authStep);
|
const { header, subHeader } = getHeaderSubHeader(authMode);
|
||||||
|
|
||||||
const handelEmailVerification = async (data: IEmailCheckData) => {
|
const handelEmailVerification = async (data: IEmailCheckData) => {
|
||||||
// update the global email state
|
// update the global email state
|
||||||
|
Loading…
Reference in New Issue
Block a user