0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

feat(cloud): add social callback page (#3440)

This commit is contained in:
wangsijie 2023-03-16 18:50:39 +08:00 committed by GitHub
parent 28098cda1f
commit 72c7cba40e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 122 additions and 0 deletions

View file

@ -4,6 +4,7 @@ import Callback from '@cloud/pages/Callback';
import * as styles from './App.module.scss'; import * as styles from './App.module.scss';
import Main from './pages/Main'; import Main from './pages/Main';
import SocialDemoCallback from './pages/SocialDemoCallback';
import { CloudRoute } from './types'; import { CloudRoute } from './types';
const App = () => { const App = () => {
@ -12,6 +13,7 @@ const App = () => {
<div className={styles.app}> <div className={styles.app}>
<Routes> <Routes>
<Route path={`/${CloudRoute.Callback}`} element={<Callback />} /> <Route path={`/${CloudRoute.Callback}`} element={<Callback />} />
<Route path={`/${CloudRoute.SocialDemoCallback}`} element={<SocialDemoCallback />} />
<Route path={`/:tenantId/${CloudRoute.Callback}`} element={<Callback />} /> <Route path={`/:tenantId/${CloudRoute.Callback}`} element={<Callback />} />
<Route path="/*" element={<Main />} /> <Route path="/*" element={<Main />} />
</Routes> </Routes>

View file

@ -0,0 +1,53 @@
@use '@/scss/underscore' as _;
@use '@logto/core-kit/scss/fonts';
@use '@logto/core-kit/scss/console-themes' as themes;
.container {
.card {
background: var(--color-layer-1);
border-radius: 16px;
position: absolute;
left: 50%;
top: 50%;
width: 640px;
height: 640px;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
font-size: 14px;
line-height: 20px;
img {
margin-top: _.unit(25);
width: 160px;
height: 160px;
}
.title {
margin-top: _.unit(16);
color: var(--color-neutral-10);
font: var(--font-title-2);
}
.message {
margin-top: _.unit(3);
font: var(--font-body-2);
color: var(--color-text-secondary);
padding: 0 _.unit(8);
}
}
}
@media (prefers-color-scheme: light) {
body {
@include themes.light;
}
}
@media (prefers-color-scheme: dark) {
body {
@include themes.dark;
}
}

View file

@ -0,0 +1,26 @@
import { Theme } from '@logto/schemas';
import { useTranslation } from 'react-i18next';
import CongratsDark from '@/assets/images/congrats-dark.svg';
import Congrats from '@/assets/images/congrats.svg';
import Card from '@/components/Card';
import useTheme from '@/hooks/use-theme';
import * as styles from './index.module.scss';
const SocialDemoCallback = () => {
const theme = useTheme();
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
return (
<div className={styles.container}>
<Card className={styles.card}>
{theme === Theme.Light ? <Congrats /> : <CongratsDark />}
<div className={styles.title}>{t('cloud.socialCallback.title')}</div>
<div className={styles.message}>{t('cloud.socialCallback.description')}</div>
</Card>
</div>
);
};
export default SocialDemoCallback;

View file

@ -1,3 +1,4 @@
export enum CloudRoute { export enum CloudRoute {
Callback = 'callback', Callback = 'callback',
SocialDemoCallback = 'social-demo-callback',
} }

View file

@ -96,6 +96,11 @@ const cloud = {
}, },
}, },
broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED
socialCallback: {
title: "You've successfully signed in!", // UNTRANSLATED
description:
'You have successfully signed in using your social account. To ensure seamless integration and access to all the features of Logto, we recommend that you proceed to configure your own social connector.', // UNTRANSLATED
},
}; };
export default cloud; export default cloud;

View file

@ -96,6 +96,11 @@ const cloud = {
}, },
}, },
broadcast: '📣 You are participating in Logto Cloud Preview', broadcast: '📣 You are participating in Logto Cloud Preview',
socialCallback: {
title: "You've successfully signed in!",
description:
'You have successfully signed in using your social account. To ensure seamless integration and access to all the features of Logto, we recommend that you proceed to configure your own social connector.',
},
}; };
export default cloud; export default cloud;

View file

@ -96,6 +96,11 @@ const cloud = {
}, },
}, },
broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED
socialCallback: {
title: "You've successfully signed in!", // UNTRANSLATED
description:
'You have successfully signed in using your social account. To ensure seamless integration and access to all the features of Logto, we recommend that you proceed to configure your own social connector.', // UNTRANSLATED
},
}; };
export default cloud; export default cloud;

View file

@ -96,6 +96,11 @@ const cloud = {
}, },
}, },
broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED
socialCallback: {
title: "You've successfully signed in!", // UNTRANSLATED
description:
'You have successfully signed in using your social account. To ensure seamless integration and access to all the features of Logto, we recommend that you proceed to configure your own social connector.', // UNTRANSLATED
},
}; };
export default cloud; export default cloud;

View file

@ -96,6 +96,11 @@ const cloud = {
}, },
}, },
broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED
socialCallback: {
title: "You've successfully signed in!", // UNTRANSLATED
description:
'You have successfully signed in using your social account. To ensure seamless integration and access to all the features of Logto, we recommend that you proceed to configure your own social connector.', // UNTRANSLATED
},
}; };
export default cloud; export default cloud;

View file

@ -96,6 +96,11 @@ const cloud = {
}, },
}, },
broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED
socialCallback: {
title: "You've successfully signed in!", // UNTRANSLATED
description:
'You have successfully signed in using your social account. To ensure seamless integration and access to all the features of Logto, we recommend that you proceed to configure your own social connector.', // UNTRANSLATED
},
}; };
export default cloud; export default cloud;

View file

@ -96,6 +96,11 @@ const cloud = {
}, },
}, },
broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED
socialCallback: {
title: "You've successfully signed in!", // UNTRANSLATED
description:
'You have successfully signed in using your social account. To ensure seamless integration and access to all the features of Logto, we recommend that you proceed to configure your own social connector.', // UNTRANSLATED
},
}; };
export default cloud; export default cloud;

View file

@ -96,6 +96,11 @@ const cloud = {
}, },
}, },
broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED broadcast: '📣 You are participating in Logto Cloud Preview', // UNTRANSLATED
socialCallback: {
title: "You've successfully signed in!", // UNTRANSLATED
description:
'You have successfully signed in using your social account. To ensure seamless integration and access to all the features of Logto, we recommend that you proceed to configure your own social connector.', // UNTRANSLATED
},
}; };
export default cloud; export default cloud;