@canmingir/link 1.2.24 → 1.2.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@ export default function AuthModernLayout({ image }) {
|
|
|
28
28
|
<Logo
|
|
29
29
|
maxSize={140}
|
|
30
30
|
sx={{
|
|
31
|
-
mb:
|
|
31
|
+
mb: 1,
|
|
32
32
|
width: 80,
|
|
33
33
|
height: 80,
|
|
34
34
|
}}
|
|
@@ -37,7 +37,7 @@ export default function AuthModernLayout({ image }) {
|
|
|
37
37
|
<Card
|
|
38
38
|
sx={{
|
|
39
39
|
width: 1,
|
|
40
|
-
py: { xs: 6, md:
|
|
40
|
+
py: { xs: 6, md: 4 },
|
|
41
41
|
px: { xs: 4, md: 6 },
|
|
42
42
|
boxShadow: {
|
|
43
43
|
xs: (theme) =>
|
package/src/pages/LoginPage.jsx
CHANGED
|
@@ -30,20 +30,11 @@ function LoginPage() {
|
|
|
30
30
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
31
|
}, [navigate]);
|
|
32
32
|
|
|
33
|
-
if (credentials?.provider === "COGNITO") {
|
|
34
|
-
return <CognitoLogin />;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (credentials?.provider === "DEMO") {
|
|
38
|
-
return (
|
|
39
|
-
<Page title={`Sign in to ${name}`}>
|
|
40
|
-
<DemoLogin />
|
|
41
|
-
</Page>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
33
|
return (
|
|
46
34
|
<Page title={`Sign in to ${name}`}>
|
|
35
|
+
{credentials?.provider === "COGNITO" && <CognitoLogin />}
|
|
36
|
+
{credentials?.provider === "DEMO" && <DemoLogin />}
|
|
37
|
+
|
|
47
38
|
<LoginForm icon={template.login.icon} name={name} formColor={formColor} />
|
|
48
39
|
</Page>
|
|
49
40
|
);
|
|
@@ -18,12 +18,17 @@ const handleOAuthLogin = (
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
function LoginForm() {
|
|
21
|
-
const { name, project } = config();
|
|
21
|
+
const { name, project, credentials } = config();
|
|
22
22
|
|
|
23
23
|
const [email, setEmail] = useState("");
|
|
24
24
|
const [password, setPassword] = useState("");
|
|
25
25
|
|
|
26
|
-
const
|
|
26
|
+
const providerCheck =
|
|
27
|
+
credentials?.provider === "COGNITO" || credentials?.provider === "DEMO";
|
|
28
|
+
|
|
29
|
+
const hasContent = !providerCheck || !!project.nucleoid;
|
|
30
|
+
|
|
31
|
+
const renderHead = hasContent ? (
|
|
27
32
|
<Stack spacing={2} sx={{ mb: 5 }}>
|
|
28
33
|
<Typography variant="h4">Sign in to {name}</Typography>
|
|
29
34
|
{project.nucleoid && (
|
|
@@ -34,7 +39,7 @@ function LoginForm() {
|
|
|
34
39
|
</Stack>
|
|
35
40
|
)}
|
|
36
41
|
</Stack>
|
|
37
|
-
);
|
|
42
|
+
) : null;
|
|
38
43
|
|
|
39
44
|
const renderForm = (
|
|
40
45
|
<>
|