-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Strapi v5 compatibility (#59) * strapi v5 compatibility * refactor: changed from commonjs to module * V5/compatible (#61) * Fix admin panel path * Translation bug fixes * Fix webhook in create.entry * Pre-release adjustments (#62) * Allow nodejs 22 (#69) Strapi 5 supports nodejs 20 and 22. * NodeJS support version upgrade (#70) * Feature/whitelist (#71) * whitelist implementation * update README * v1.0.1 to the latest version * fixing DOM errors --------- Co-authored-by: Marco Fincato <[email protected]> Co-authored-by: Jorrit Schippers <[email protected]>
- Loading branch information
1 parent
63e293c
commit 54b16c5
Showing
46 changed files
with
16,766 additions
and
10,776 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.DS_Store | ||
node_modules | ||
.idea | ||
dist |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import {Alert} from "@strapi/design-system"; | ||
import getTrad from "../../utils/getTrad"; | ||
import React from "react"; | ||
import {useIntl} from "react-intl"; | ||
import styled from "styled-components"; | ||
|
||
const AlertMessage = styled.div` | ||
margin-left: -250px; | ||
position: fixed; | ||
left: 50%; | ||
top: 2.875rem; | ||
z-index: 10; | ||
width: 31.25rem; | ||
` | ||
|
||
export function SuccessAlertMessage({onClose}) { | ||
const {formatMessage} = useIntl(); | ||
return ( | ||
<AlertMessage> | ||
<Alert | ||
title="Success" | ||
variant={'success'} | ||
closeLabel={''} | ||
onClose={onClose} | ||
> | ||
{formatMessage({ | ||
id: getTrad('page.save.success'), | ||
defaultMessage: 'Updated settings' | ||
})} | ||
</Alert> | ||
</AlertMessage> | ||
) | ||
} | ||
|
||
export function ErrorAlertMessage() { | ||
const {formatMessage} = useIntl(); | ||
return ( | ||
<AlertMessage> | ||
<Alert | ||
title="Error" | ||
variant={'danger'} | ||
closeLabel={''} | ||
onClose={onClose} | ||
> | ||
{formatMessage({ | ||
id: getTrad('page.save.error'), | ||
defaultMessage: 'Update failed.' | ||
})} | ||
</Alert> | ||
</AlertMessage> | ||
) | ||
} |
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { | ||
Button, | ||
Checkbox, | ||
Table, | ||
Thead, | ||
Tbody, | ||
Tr, | ||
Td, | ||
Th, | ||
} from '@strapi/design-system'; | ||
import getTrad from "../../utils/getTrad"; | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
import {useIntl} from "react-intl"; | ||
|
||
const ButtonWrapper = styled.div` | ||
margin: 10px 0 0 0; | ||
& button { | ||
margin: 0 0 0 auto; | ||
} | ||
` | ||
const Description = styled.p` | ||
font-size: 16px; | ||
margin: 20px 0; | ||
` | ||
|
||
export default function Role({ssoRoles, roles, onSaveRole, onChangeRoleCheck}) { | ||
const {formatMessage} = useIntl(); | ||
return ( | ||
<> | ||
<Table colCount={roles.length + 1} rowCount={ssoRoles.length}> | ||
<Thead> | ||
<Tr> | ||
<Th> | ||
{/* Not required, but if it doesn't exist, it's an error. */} | ||
<Checkbox style={{display: 'none'}}/> | ||
</Th> | ||
{ | ||
roles.map(role => ( | ||
<Th key={role['id']}> | ||
{role['name']} | ||
</Th> | ||
)) | ||
} | ||
</Tr> | ||
</Thead> | ||
<Tbody> | ||
{ | ||
ssoRoles.map((ssoRole) => ( | ||
<Tr key={ssoRole['oauth_type']}> | ||
<Td>{ssoRole['name']}</Td> | ||
{ | ||
roles.map((role) => ( | ||
<Th key={role['id']}> | ||
<Checkbox | ||
checked={ssoRole['role'] && ssoRole['role'].includes(role['id'])} | ||
onCheckedChange={(value) => onChangeRoleCheck(value, ssoRole['oauth_type'], role['id'])} | ||
>{''}</Checkbox> | ||
</Th> | ||
)) | ||
} | ||
</Tr> | ||
)) | ||
} | ||
</Tbody> | ||
</Table> | ||
<Description>{formatMessage({ | ||
id: getTrad('page.notes'), | ||
defaultMessage: 'This will not be reflected for already registered users.' | ||
})}</Description> | ||
<ButtonWrapper> | ||
<Button variant='default' onClick={onSaveRole}>{formatMessage({ | ||
id: getTrad('page.save'), | ||
defaultMessage: 'Save' | ||
})}</Button> | ||
</ButtonWrapper> | ||
</> | ||
) | ||
} |
Oops, something went wrong.