added Settings title + fixed tests

This commit is contained in:
ronronscelestes 2021-11-16 11:01:51 +01:00
parent 6114a4f0df
commit 8d63de8d42
4 changed files with 541 additions and 39 deletions

View File

@ -183,6 +183,7 @@
"Settings.sso.form.defaultRole.label": "Default role",
"Settings.sso.form.registration.description": "Create new user on SSO login if no account exists",
"Settings.sso.form.registration.label": "Auto-registration",
"Settings.sso.form.settings.title": "Settings",
"Settings.sso.title": "Single Sign-On",
"Settings.webhooks.create": "Create a webhook",
"Settings.webhooks.create.header": "Create a new header",

View File

@ -12,6 +12,7 @@ import { Box } from '@strapi/design-system/Box';
import { Button } from '@strapi/design-system/Button';
import { Main } from '@strapi/design-system/Main';
import { Stack } from '@strapi/design-system/Stack';
import { Typography } from '@strapi/design-system/Typography';
import { ToggleInput } from '@strapi/design-system/ToggleInput';
import { Select, Option } from '@strapi/design-system/Select';
import { Grid, GridItem } from '@strapi/design-system/Grid';
@ -100,8 +101,14 @@ export const SingleSignOn = () => {
<LoadingIndicatorPage />
) : (
<Layout>
<Stack size={12}>
<Box background="neutral0" padding={6} shadow="filterShadow" hasRadius>
<Box background="neutral0" padding={6} shadow="filterShadow" hasRadius>
<Stack size={4}>
<Typography variant="delta" as="h2">
{formatMessage({
id: 'Settings.sso.form.settings.title',
defaultMessage: 'Settings',
})}
</Typography>
<Grid gap={4}>
<GridItem col={6} m={6} s={12}>
<ToggleInput
@ -171,8 +178,8 @@ export const SingleSignOn = () => {
</Select>
</GridItem>
</Grid>
</Box>
</Stack>
</Stack>
</Box>
</Layout>
)}
</ContentLayout>

File diff suppressed because one or more lines are too long

View File

@ -4,6 +4,7 @@ import { rest } from 'msw';
const handlers = [
rest.get('*/providers/options', (req, res, ctx) => {
return res(
ctx.delay(200),
ctx.status(200),
ctx.json({
data: {
@ -15,6 +16,7 @@ const handlers = [
}),
rest.get('*/admin/roles', (req, res, ctx) => {
return res(
ctx.delay(200),
ctx.status(200),
ctx.json({
data: [