mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
init D&P status
Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
parent
d91193b022
commit
03a6f854c3
@ -3,7 +3,7 @@ import { useIntl } from 'react-intl';
|
||||
import { useContentManagerEditViewDataManager } from '@strapi/helper-plugin';
|
||||
import { Box } from '@strapi/parts/Box';
|
||||
import { Divider } from '@strapi/parts/Divider';
|
||||
import { Text } from '@strapi/parts/Text';
|
||||
import { TableLabel, Text } from '@strapi/parts/Text';
|
||||
import { Row } from '@strapi/parts/Row';
|
||||
import { Stack } from '@strapi/parts/Stack';
|
||||
import { getTrad } from '../../../utils';
|
||||
@ -29,12 +29,12 @@ const Informations = () => {
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Text textColor="neutral600" bold small style={{ textTransform: 'uppercase' }}>
|
||||
<TableLabel textColor="neutral600">
|
||||
{formatMessage({
|
||||
id: getTrad('containers.Edit.information'),
|
||||
defaultMessage: 'Information',
|
||||
})}
|
||||
</Text>
|
||||
</TableLabel>
|
||||
<Box paddingTop={2} paddingBottom={6}>
|
||||
<Divider />
|
||||
</Box>
|
||||
|
||||
@ -577,14 +577,14 @@ describe('ADMIN | PAGES | AUTH | BaseLogin', () => {
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c13"
|
||||
class="c1 c13"
|
||||
>
|
||||
<div
|
||||
class="c14"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="c15"
|
||||
class="c1 c15"
|
||||
>
|
||||
<div
|
||||
class="c1 c4"
|
||||
@ -618,7 +618,7 @@ describe('ADMIN | PAGES | AUTH | BaseLogin', () => {
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="c15"
|
||||
class="c1 c15"
|
||||
>
|
||||
<div
|
||||
class="c1 c4"
|
||||
@ -671,7 +671,7 @@ describe('ADMIN | PAGES | AUTH | BaseLogin', () => {
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
class="c15"
|
||||
class="c1 c15"
|
||||
>
|
||||
<label
|
||||
class="c10 c24 c25"
|
||||
|
||||
@ -658,7 +658,7 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c21"
|
||||
class="c0 c21"
|
||||
>
|
||||
<div
|
||||
class="c0 c22"
|
||||
@ -674,7 +674,7 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="c25"
|
||||
class="c0 c25"
|
||||
>
|
||||
<div
|
||||
class="c0 c12"
|
||||
@ -715,7 +715,7 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="c25"
|
||||
class="c0 c25"
|
||||
>
|
||||
<div
|
||||
class="c0 c12"
|
||||
@ -751,7 +751,7 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="c25"
|
||||
class="c0 c25"
|
||||
>
|
||||
<div
|
||||
class="c0 c12"
|
||||
@ -785,7 +785,7 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="c25"
|
||||
class="c0 c25"
|
||||
>
|
||||
<div
|
||||
class="c0 c12"
|
||||
@ -848,7 +848,7 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="c25"
|
||||
class="c0 c25"
|
||||
>
|
||||
<div
|
||||
class="c0 c12"
|
||||
@ -901,7 +901,7 @@ describe('ADMIN | PAGES | AUTH | Register', () => {
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
class="c25"
|
||||
class="c0 c25"
|
||||
>
|
||||
<label
|
||||
class="c5 c6 c35"
|
||||
|
||||
@ -530,14 +530,14 @@ describe('ADMIN | PAGES | AUTH | ResetPassword', () => {
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c17"
|
||||
class="c0 c17"
|
||||
>
|
||||
<div
|
||||
class="c18"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="c19"
|
||||
class="c0 c19"
|
||||
>
|
||||
<div
|
||||
class="c0 c12"
|
||||
@ -600,7 +600,7 @@ describe('ADMIN | PAGES | AUTH | ResetPassword', () => {
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="c19"
|
||||
class="c0 c19"
|
||||
>
|
||||
<div
|
||||
class="c0 c12"
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -40,8 +40,8 @@
|
||||
"@fortawesome/react-fontawesome": "^0.1.14",
|
||||
"@strapi/babel-plugin-switch-ee-ce": "1.0.0",
|
||||
"@strapi/helper-plugin": "3.6.8",
|
||||
"@strapi/icons": "0.0.1-alpha.32",
|
||||
"@strapi/parts": "0.0.1-alpha.32",
|
||||
"@strapi/icons": "0.0.1-alpha.33",
|
||||
"@strapi/parts": "0.0.1-alpha.33",
|
||||
"@strapi/utils": "3.6.8",
|
||||
"axios": "^0.21.1",
|
||||
"babel-loader": "8.2.2",
|
||||
|
||||
@ -224,6 +224,7 @@ describe('<PageSizeURLQuery />', () => {
|
||||
aria-hidden="true"
|
||||
class="c9 c10 c11"
|
||||
tabindex="-1"
|
||||
type="button"
|
||||
>
|
||||
<svg
|
||||
fill="none"
|
||||
|
||||
@ -57,8 +57,8 @@
|
||||
"@storybook/builder-webpack5": "^6.3.7",
|
||||
"@storybook/manager-webpack5": "^6.3.7",
|
||||
"@storybook/react": "^6.3.7",
|
||||
"@strapi/icons": "0.0.1-alpha.32",
|
||||
"@strapi/parts": "0.0.1-alpha.32",
|
||||
"@strapi/icons": "0.0.1-alpha.33",
|
||||
"@strapi/parts": "0.0.1-alpha.33",
|
||||
"babel-loader": "^8.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"enzyme": "^3.8.0",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,23 +1,32 @@
|
||||
import React, { useState } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Duplicate } from '@buffetjs/icons';
|
||||
import { Label, Padded, Text } from '@buffetjs/core';
|
||||
import Select from 'react-select';
|
||||
import styled from 'styled-components';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { useTheme } from 'styled-components';
|
||||
import { useIntl } from 'react-intl';
|
||||
import {
|
||||
BaselineAlignment,
|
||||
DropdownIndicator,
|
||||
ModalConfirm,
|
||||
selectStyles,
|
||||
useContentManagerEditViewDataManager,
|
||||
useNotification,
|
||||
request,
|
||||
} from '@strapi/helper-plugin';
|
||||
import { getTrad } from '../../../utils';
|
||||
import { Dialog, DialogBody, DialogFooter } from '@strapi/parts/Dialog';
|
||||
import { Select, Option } from '@strapi/parts/Select';
|
||||
import { Button } from '@strapi/parts/Button';
|
||||
import { Box } from '@strapi/parts/Box';
|
||||
import { Typography, Text } from '@strapi/parts/Text';
|
||||
import { Row } from '@strapi/parts/Row';
|
||||
import { Stack } from '@strapi/parts/Stack';
|
||||
import AlertWarningIcon from '@strapi/icons/AlertWarningIcon';
|
||||
import Duplicate from '@strapi/icons/Duplicate';
|
||||
import { useContentManagerEditViewDataManager, useNotification } from '@strapi/helper-plugin';
|
||||
import { axiosInstance, getTrad } from '../../../utils';
|
||||
import { cleanData, generateOptions } from './utils';
|
||||
|
||||
const StyledTypography = styled(Typography)`
|
||||
svg {
|
||||
margin-right: ${({ theme }) => theme.spaces[2]};
|
||||
fill: none;
|
||||
> g,
|
||||
path {
|
||||
fill: ${({ theme }) => theme.colors.primary600};
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const CMEditViewCopyLocale = props => {
|
||||
if (!props.localizations.length) {
|
||||
return null;
|
||||
@ -35,8 +44,7 @@ const Content = ({ appLocales, currentLocale, localizations, readPermissions })
|
||||
const { allLayoutData, slug } = useContentManagerEditViewDataManager();
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [value, setValue] = useState(options[0]);
|
||||
const theme = useTheme();
|
||||
const [value, setValue] = useState(options[0]?.value || '');
|
||||
|
||||
const handleConfirmCopyLocale = async () => {
|
||||
if (!value) {
|
||||
@ -45,11 +53,13 @@ const Content = ({ appLocales, currentLocale, localizations, readPermissions })
|
||||
return;
|
||||
}
|
||||
|
||||
const requestURL = `/content-manager/collection-types/${slug}/${value.value}`;
|
||||
const requestURL = `/content-manager/collection-types/${slug}/${value}`;
|
||||
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const response = await request(requestURL, { method: 'GET' });
|
||||
|
||||
const { data: response } = await axiosInstance.get(requestURL);
|
||||
|
||||
const cleanedData = cleanData(response, allLayoutData, localizations);
|
||||
|
||||
dispatch({ type: 'ContentManager/CrudReducer/GET_DATA_SUCCEEDED', data: cleanedData });
|
||||
@ -85,83 +95,75 @@ const Content = ({ appLocales, currentLocale, localizations, readPermissions })
|
||||
setIsOpen(prev => !prev);
|
||||
};
|
||||
|
||||
const styles = selectStyles(theme);
|
||||
|
||||
return (
|
||||
<>
|
||||
<BaselineAlignment top size="12px" />
|
||||
<Text
|
||||
color="mediumBlue"
|
||||
fontWeight="semiBold"
|
||||
style={{ cursor: 'pointer' }}
|
||||
<StyledTypography
|
||||
fontSize={2}
|
||||
textColor="primary600"
|
||||
as="button"
|
||||
type="button"
|
||||
onClick={handleToggle}
|
||||
>
|
||||
<span style={{ marginRight: 10 }}>
|
||||
<Duplicate fill="#007EFF" />
|
||||
</span>
|
||||
{formatMessage({
|
||||
id: getTrad('CMEditViewCopyLocale.copy-text'),
|
||||
defaultMessage: 'Fill in from another locale',
|
||||
})}
|
||||
</Text>
|
||||
<ModalConfirm
|
||||
showButtonLoader={isLoading}
|
||||
confirmButtonLabel={{
|
||||
id: getTrad('CMEditViewCopyLocale.submit-text'),
|
||||
defaultMessage: 'Yes, fill in',
|
||||
}}
|
||||
content={{
|
||||
id: getTrad('CMEditViewCopyLocale.ModalConfirm.content'),
|
||||
defaultMessage:
|
||||
'Your current content will be erased and filled by the content of the selected locale:',
|
||||
}}
|
||||
isOpen={isOpen}
|
||||
onConfirm={handleConfirmCopyLocale}
|
||||
title={{
|
||||
id: getTrad('CMEditViewCopyLocale.ModalConfirm.title'),
|
||||
defaultMessage: 'Select Locale',
|
||||
}}
|
||||
toggle={handleToggle}
|
||||
type="success"
|
||||
>
|
||||
<Padded style={{ marginTop: -3 }} bottom size="sm">
|
||||
<span id="select-locale" style={{ textAlign: 'left' }}>
|
||||
<Label htmlFor="">
|
||||
{formatMessage({
|
||||
id: getTrad('Settings.locales.modal.locales.label'),
|
||||
})}
|
||||
</Label>
|
||||
<BaselineAlignment top size="3px" />
|
||||
<Select
|
||||
aria-labelledby="select-locale"
|
||||
components={{ DropdownIndicator }}
|
||||
isSearchable={false}
|
||||
defaultValue={options[0]}
|
||||
onChange={handleChange}
|
||||
options={options}
|
||||
styles={{
|
||||
...styles,
|
||||
control: (base, state) => ({
|
||||
...base,
|
||||
...styles.control(base, state),
|
||||
height: '34px',
|
||||
}),
|
||||
indicatorsContainer: (base, state) => ({
|
||||
...base,
|
||||
...styles.indicatorsContainer(base, state),
|
||||
height: '32px',
|
||||
}),
|
||||
valueContainer: base => ({
|
||||
...base,
|
||||
padding: '2px 0px 4px 10px',
|
||||
lineHeight: '18px',
|
||||
}),
|
||||
}}
|
||||
value={value}
|
||||
/>
|
||||
</span>
|
||||
</Padded>
|
||||
</ModalConfirm>
|
||||
<Row>
|
||||
<Duplicate width="12px" height="12px" />
|
||||
{formatMessage({
|
||||
id: getTrad('CMEditViewCopyLocale.copy-text'),
|
||||
defaultMessage: 'Fill in from another locale',
|
||||
})}
|
||||
</Row>
|
||||
</StyledTypography>
|
||||
{isOpen && (
|
||||
<Dialog onClose={handleToggle} title="Confirmation" isOpen={isOpen}>
|
||||
<DialogBody icon={<AlertWarningIcon />}>
|
||||
<Stack size={2}>
|
||||
<Row justifyContent="center">
|
||||
<Text id="confirm-description" style={{ textAlign: 'center' }}>
|
||||
{formatMessage({
|
||||
id: getTrad('CMEditViewCopyLocale.ModalConfirm.content'),
|
||||
defaultMessage:
|
||||
'Your current content will be erased and filled by the content of the selected locale:',
|
||||
})}
|
||||
</Text>
|
||||
</Row>
|
||||
<Box>
|
||||
<Select
|
||||
label={formatMessage({
|
||||
id: getTrad('Settings.locales.modal.locales.label'),
|
||||
})}
|
||||
onChange={handleChange}
|
||||
value={value}
|
||||
>
|
||||
{options.map(({ label, value }) => {
|
||||
return (
|
||||
<Option key={value} value={value}>
|
||||
{label}
|
||||
</Option>
|
||||
);
|
||||
})}
|
||||
</Select>
|
||||
</Box>
|
||||
</Stack>
|
||||
</DialogBody>
|
||||
<DialogFooter
|
||||
startAction={
|
||||
<Button onClick={handleToggle} variant="tertiary">
|
||||
{formatMessage({
|
||||
id: 'popUpWarning.button.cancel',
|
||||
defaultMessage: 'No, cancel',
|
||||
})}
|
||||
</Button>
|
||||
}
|
||||
endAction={
|
||||
<Button variant="success" onClick={handleConfirmCopyLocale} loading={isLoading}>
|
||||
{formatMessage({
|
||||
id: getTrad('CMEditViewCopyLocale.submit-text'),
|
||||
defaultMessage: 'Yes, fill in',
|
||||
})}
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
</Dialog>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { pxToRem } from '@strapi/helper-plugin';
|
||||
|
||||
// TODO
|
||||
// const CustomBullet = styled(Bullet)`
|
||||
// width: ${pxToRem(6)};
|
||||
// height: ${pxToRem(6)};
|
||||
// * {
|
||||
// fill: ${({ theme, $bulletColor }) => theme.colors[$bulletColor]};
|
||||
// }
|
||||
// `;
|
||||
|
||||
const Bullet = styled.div`
|
||||
width: ${pxToRem(6)};
|
||||
height: ${pxToRem(6)};
|
||||
border: ${({ theme, borderColor }) => `1px solid ${theme.colors[borderColor]}`};
|
||||
background: ${({ theme, $bulletColor }) => theme.colors[$bulletColor]};
|
||||
border-radius: 50%;
|
||||
`;
|
||||
|
||||
export default Bullet;
|
||||
@ -1,29 +1,27 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
// import { Label, Text, Padded } from '@buffetjs/core';
|
||||
import get from 'lodash/get';
|
||||
// import Select, { components } from 'react-select';
|
||||
import { Box } from '@strapi/parts/Box';
|
||||
import { Divider } from '@strapi/parts/Divider';
|
||||
import { Select, Option } from '@strapi/parts/Select';
|
||||
import { Text } from '@strapi/parts/Text';
|
||||
// import { Row } from '@strapi/parts/Row';
|
||||
import { TableLabel } from '@strapi/parts/Text';
|
||||
import { Stack } from '@strapi/parts/Stack';
|
||||
import { Row } from '@strapi/parts/Row';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { useTheme } from 'styled-components';
|
||||
// import { DropdownIndicator, BaselineAlignment, selectStyles } from '@strapi/helper-plugin';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { stringify } from 'qs';
|
||||
import { getTrad } from '../../../utils';
|
||||
import { addStatusColorToLocale, createLocalesOption } from './utils';
|
||||
// import CMEditViewCopyLocale from '../CMEditViewCopyLocale';
|
||||
// import OptionComponent from './Option';
|
||||
// import Wrapper from './Wrapper';
|
||||
import { statusMap } from './utils/addStatusColorToLocale';
|
||||
import CMEditViewCopyLocale from '../CMEditViewCopyLocale';
|
||||
import Bullet from './Bullet';
|
||||
|
||||
const CMEditViewLocalePicker = ({
|
||||
appLocales,
|
||||
createPermissions,
|
||||
currentEntityId,
|
||||
currentLocaleStatus,
|
||||
hasDraftAndPublishEnabled,
|
||||
isSingleType,
|
||||
localizations,
|
||||
@ -32,7 +30,6 @@ const CMEditViewLocalePicker = ({
|
||||
setQuery,
|
||||
slug,
|
||||
}) => {
|
||||
console.log(hasDraftAndPublishEnabled);
|
||||
const { formatMessage } = useIntl();
|
||||
const theme = useTheme();
|
||||
const currentLocale = get(query, 'plugins.i18n.locale', false);
|
||||
@ -100,92 +97,70 @@ const CMEditViewLocalePicker = ({
|
||||
|
||||
return (
|
||||
<Box paddingTop={6}>
|
||||
<Text textColor="neutral600" bold style={{ textTransform: 'uppercase' }} small>
|
||||
<TableLabel textColor="neutral600">
|
||||
{formatMessage({ id: getTrad('plugin.name'), defaultMessage: 'Internationalization' })}
|
||||
</Text>
|
||||
</TableLabel>
|
||||
<Box paddingTop={2} paddingBottom={6}>
|
||||
<Divider />
|
||||
</Box>
|
||||
<Stack size={2}>
|
||||
<Select
|
||||
label={formatMessage({
|
||||
id: getTrad('Settings.locales.modal.locales.label'),
|
||||
})}
|
||||
onChange={handleChange}
|
||||
value={value.value}
|
||||
>
|
||||
<Option value={value.value} disabled>
|
||||
{value.label}
|
||||
</Option>
|
||||
{filteredOptions.map(option => {
|
||||
return (
|
||||
<Option key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
</Option>
|
||||
);
|
||||
})}
|
||||
</Select>
|
||||
<Box>
|
||||
<Select
|
||||
label={formatMessage({
|
||||
id: getTrad('Settings.locales.modal.locales.label'),
|
||||
})}
|
||||
onChange={handleChange}
|
||||
value={value?.value}
|
||||
>
|
||||
<Option
|
||||
value={value.value}
|
||||
disabled
|
||||
startIcon={hasDraftAndPublishEnabled ? 'todo' : null}
|
||||
>
|
||||
<Row>
|
||||
{hasDraftAndPublishEnabled && (
|
||||
<Bullet
|
||||
$bulletColor={statusMap[currentLocaleStatus].backgroundColor}
|
||||
borderColor={statusMap[currentLocaleStatus].borderColor}
|
||||
/>
|
||||
)}
|
||||
{value.label}
|
||||
</Row>
|
||||
</Option>
|
||||
{filteredOptions.map(option => {
|
||||
return (
|
||||
<Option key={option.value} value={option.value}>
|
||||
<Row>
|
||||
{hasDraftAndPublishEnabled && (
|
||||
<Bullet
|
||||
$bulletColor={option.backgroundColor}
|
||||
borderColor={option.borderColor}
|
||||
/>
|
||||
)}
|
||||
{option.label}
|
||||
</Row>
|
||||
</Option>
|
||||
);
|
||||
})}
|
||||
</Select>
|
||||
</Box>
|
||||
<Box>
|
||||
<CMEditViewCopyLocale
|
||||
appLocales={appLocales}
|
||||
currentLocale={currentLocale}
|
||||
localizations={localizations}
|
||||
readPermissions={readPermissions}
|
||||
/>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Box>
|
||||
);
|
||||
// return 'todo';
|
||||
|
||||
// const styles = selectStyles(theme);
|
||||
// const Option = hasDraftAndPublishEnabled ? OptionComponent : components.Option;
|
||||
// const paddingBottom = localizations.length ? '19px' : '29px';
|
||||
|
||||
// return (
|
||||
// <Wrapper paddingBottom={paddingBottom}>
|
||||
// <BaselineAlignment top size="18px" />
|
||||
// <Padded left right size="smd">
|
||||
// <Text fontWeight="bold">
|
||||
// {formatMessage({ id: getTrad('plugin.name'), defaultMessage: 'Internationalization' })}
|
||||
// </Text>
|
||||
// <BaselineAlignment top size="18px" />
|
||||
// <span id="select-locale">
|
||||
// <Label htmlFor="">
|
||||
// {formatMessage({
|
||||
// id: getTrad('Settings.locales.modal.locales.label'),
|
||||
// })}
|
||||
// </Label>
|
||||
// </span>
|
||||
// <BaselineAlignment top size="3px" />
|
||||
// <Select
|
||||
// aria-labelledby="select-locale"
|
||||
// components={{ DropdownIndicator, Option }}
|
||||
// isSearchable={false}
|
||||
// onChange={handleChange}
|
||||
// options={filteredOptions}
|
||||
// styles={{
|
||||
// ...styles,
|
||||
// control: (base, state) => ({ ...base, ...styles.control(base, state), height: '34px' }),
|
||||
// indicatorsContainer: (base, state) => ({
|
||||
// ...base,
|
||||
// ...styles.indicatorsContainer(base, state),
|
||||
// height: '32px',
|
||||
// }),
|
||||
// valueContainer: base => ({
|
||||
// ...base,
|
||||
// padding: '2px 0px 4px 10px',
|
||||
// lineHeight: '18px',
|
||||
// }),
|
||||
// }}
|
||||
// value={value}
|
||||
// />
|
||||
// <CMEditViewCopyLocale
|
||||
// appLocales={appLocales}
|
||||
// currentLocale={currentLocale}
|
||||
// localizations={localizations}
|
||||
// readPermissions={readPermissions}
|
||||
// />
|
||||
// </Padded>
|
||||
// </Wrapper>
|
||||
// );
|
||||
};
|
||||
|
||||
CMEditViewLocalePicker.defaultProps = {
|
||||
createPermissions: [],
|
||||
currentEntityId: null,
|
||||
currentLocaleStatus: 'did-not-create-locale',
|
||||
isSingleType: false,
|
||||
localizations: [],
|
||||
query: {},
|
||||
@ -196,6 +171,7 @@ CMEditViewLocalePicker.propTypes = {
|
||||
appLocales: PropTypes.array.isRequired,
|
||||
createPermissions: PropTypes.array,
|
||||
currentEntityId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
currentLocaleStatus: PropTypes.string,
|
||||
hasDraftAndPublishEnabled: PropTypes.bool.isRequired,
|
||||
isSingleType: PropTypes.bool,
|
||||
localizations: PropTypes.array,
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
const addStatusColorToLocale = (locales, theme) =>
|
||||
const statusMap = {
|
||||
'did-not-create-locale': {
|
||||
backgroundColor: 'neutral0',
|
||||
borderColor: 'neutral500',
|
||||
},
|
||||
draft: {
|
||||
backgroundColor: 'secondary700',
|
||||
},
|
||||
published: {
|
||||
backgroundColor: 'success700',
|
||||
},
|
||||
};
|
||||
|
||||
const addStatusColorToLocale = locales =>
|
||||
locales.map(({ status, ...rest }) => {
|
||||
const statusMap = {
|
||||
'did-not-create-locale': {
|
||||
backgroundColor: theme.colors.neutral0,
|
||||
border: `1px solid ${theme.colors.neutral300}`,
|
||||
},
|
||||
draft: {
|
||||
backgroundColor: theme.colors.secondary700,
|
||||
},
|
||||
published: {
|
||||
backgroundColor: theme.colors.success700,
|
||||
},
|
||||
};
|
||||
const props = statusMap[status];
|
||||
|
||||
return {
|
||||
@ -22,3 +23,4 @@ const addStatusColorToLocale = (locales, theme) =>
|
||||
});
|
||||
|
||||
export default addStatusColorToLocale;
|
||||
export { statusMap };
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import get from 'lodash/get';
|
||||
import has from 'lodash/has';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { useContentManagerEditViewDataManager, useQueryParams } from '@strapi/helper-plugin';
|
||||
@ -8,7 +9,13 @@ import useContentTypePermissions from '../../hooks/useContentTypePermissions';
|
||||
import CMEditViewLocalePicker from './CMEditViewLocalePicker';
|
||||
|
||||
const CMEditViewInjectedComponents = () => {
|
||||
const { layout, modifiedData, slug, isSingleType } = useContentManagerEditViewDataManager();
|
||||
const {
|
||||
layout,
|
||||
modifiedData,
|
||||
initialData,
|
||||
slug,
|
||||
isSingleType,
|
||||
} = useContentManagerEditViewDataManager();
|
||||
const { createPermissions, readPermissions } = useContentTypePermissions(slug);
|
||||
const locales = useSelector(selectI18NLocales);
|
||||
const params = useParams();
|
||||
@ -38,12 +45,18 @@ const CMEditViewInjectedComponents = () => {
|
||||
}
|
||||
|
||||
const localizations = get(modifiedData, 'localizations', []);
|
||||
let currentLocaleStatus = 'did-not-create-locale';
|
||||
|
||||
if (has(initialData, 'published_at')) {
|
||||
currentLocaleStatus = initialData.published_at ? 'published' : 'draft';
|
||||
}
|
||||
|
||||
return (
|
||||
<CMEditViewLocalePicker
|
||||
appLocales={locales}
|
||||
currentEntityId={currentEntityId}
|
||||
createPermissions={createPermissions}
|
||||
currentLocaleStatus={currentLocaleStatus}
|
||||
hasDraftAndPublishEnabled={hasDraftAndPublishEnabled}
|
||||
localizations={localizations}
|
||||
isSingleType={isSingleType}
|
||||
|
||||
@ -281,6 +281,7 @@ describe('LocaleSelect', () => {
|
||||
aria-hidden="true"
|
||||
class="c7 c13 c14"
|
||||
tabindex="-1"
|
||||
type="button"
|
||||
>
|
||||
<svg
|
||||
fill="none"
|
||||
|
||||
23
packages/plugins/i18n/admin/src/utils/axiosInstance.js
Normal file
23
packages/plugins/i18n/admin/src/utils/axiosInstance.js
Normal file
@ -0,0 +1,23 @@
|
||||
import axios from 'axios';
|
||||
import { auth } from '@strapi/helper-plugin';
|
||||
|
||||
const instance = axios.create({
|
||||
baseURL: process.env.STRAPI_ADMIN_BACKEND_URL,
|
||||
});
|
||||
|
||||
instance.interceptors.request.use(
|
||||
async config => {
|
||||
config.headers = {
|
||||
Authorization: `Bearer ${auth.getToken()}`,
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
|
||||
return config;
|
||||
},
|
||||
error => {
|
||||
Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
export default instance;
|
||||
@ -1,2 +1,2 @@
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export { default as axiosInstance } from './axiosInstance';
|
||||
export { default as getTrad } from './getTrad';
|
||||
|
||||
@ -57,28 +57,28 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
await waitFor(() => expect(getByRole('heading', { name: /permissions/i })).toBeInTheDocument());
|
||||
|
||||
expect(container.firstChild).toMatchInlineSnapshot(`
|
||||
.c34 {
|
||||
.c35 {
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
line-height: 1.25;
|
||||
color: #32324d;
|
||||
}
|
||||
|
||||
.c41 {
|
||||
.c42 {
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
line-height: 1.25;
|
||||
color: #4a4a6a;
|
||||
}
|
||||
|
||||
.c10 {
|
||||
.c11 {
|
||||
font-weight: 500;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.33;
|
||||
color: #32324d;
|
||||
}
|
||||
|
||||
.c35 {
|
||||
.c36 {
|
||||
font-weight: 400;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.43;
|
||||
@ -89,7 +89,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.c15 {
|
||||
.c16 {
|
||||
background: #ffffff;
|
||||
padding-top: 24px;
|
||||
padding-right: 32px;
|
||||
@ -99,38 +99,38 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
box-shadow: 0px 1px 4px rgba(33,33,52,0.1);
|
||||
}
|
||||
|
||||
.c28 {
|
||||
.c29 {
|
||||
background: #ffffff;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0px 1px 4px rgba(33,33,52,0.1);
|
||||
}
|
||||
|
||||
.c31 {
|
||||
.c32 {
|
||||
padding-top: 24px;
|
||||
padding-right: 32px;
|
||||
padding-bottom: 24px;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
.c36 {
|
||||
.c37 {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.c38 {
|
||||
.c39 {
|
||||
background: #f6f6f9;
|
||||
padding: 24px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.c40 {
|
||||
.c41 {
|
||||
padding-right: 24px;
|
||||
}
|
||||
|
||||
.c43 {
|
||||
.c44 {
|
||||
background: #dcdce4;
|
||||
}
|
||||
|
||||
.c46 {
|
||||
.c47 {
|
||||
background: #eaeaef;
|
||||
padding-top: 24px;
|
||||
padding-right: 32px;
|
||||
@ -138,7 +138,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
.c44 {
|
||||
.c45 {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
border-radius: 50%;
|
||||
@ -156,45 +156,45 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.c44 svg {
|
||||
.c45 svg {
|
||||
height: 0.375rem;
|
||||
width: 0.6875rem;
|
||||
}
|
||||
|
||||
.c44 svg path {
|
||||
.c45 svg path {
|
||||
fill: #666687;
|
||||
}
|
||||
|
||||
.c37 {
|
||||
.c38 {
|
||||
border: 1px solid transparent;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.c37:hover {
|
||||
.c38:hover {
|
||||
border: 1px solid #4945ff;
|
||||
}
|
||||
|
||||
.c37:hover .c33 {
|
||||
.c38:hover .c34 {
|
||||
color: #271fe0;
|
||||
}
|
||||
|
||||
.c37:hover .c9 {
|
||||
.c38:hover .c10 {
|
||||
color: #4945ff;
|
||||
}
|
||||
|
||||
.c37:hover > .c7 {
|
||||
.c38:hover > .c7 {
|
||||
background: #f0f0ff;
|
||||
}
|
||||
|
||||
.c37:hover .c42 {
|
||||
.c38:hover .c43 {
|
||||
background: #d9d8ff;
|
||||
}
|
||||
|
||||
.c37:hover .c42 svg path {
|
||||
.c38:hover .c43 svg path {
|
||||
fill: #4945ff;
|
||||
}
|
||||
|
||||
.c22 {
|
||||
.c23 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
@ -208,7 +208,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.c23 {
|
||||
.c24 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
@ -226,7 +226,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.c39 {
|
||||
.c40 {
|
||||
border: none;
|
||||
background: transparent;
|
||||
display: block;
|
||||
@ -261,6 +261,10 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.c9 {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.c6 {
|
||||
padding: 8px 16px;
|
||||
background: #4945ff;
|
||||
@ -280,7 +284,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.c6 .c9 {
|
||||
.c6 .c10 {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
@ -289,7 +293,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
background: #eaeaef;
|
||||
}
|
||||
|
||||
.c6[aria-disabled='true'] .c9 {
|
||||
.c6[aria-disabled='true'] .c10 {
|
||||
color: #666687;
|
||||
}
|
||||
|
||||
@ -303,7 +307,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
background: #eaeaef;
|
||||
}
|
||||
|
||||
.c6[aria-disabled='true']:active .c9 {
|
||||
.c6[aria-disabled='true']:active .c10 {
|
||||
color: #666687;
|
||||
}
|
||||
|
||||
@ -322,7 +326,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
background: #4945ff;
|
||||
}
|
||||
|
||||
.c14 {
|
||||
.c15 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
@ -332,16 +336,16 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.c14 > * {
|
||||
.c15 > * {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.c14 > * + * {
|
||||
.c15 > * + * {
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
.c16 {
|
||||
.c17 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
@ -351,16 +355,16 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.c16 > * {
|
||||
.c17 > * {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.c16 > * + * {
|
||||
.c17 > * + * {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.c21 {
|
||||
.c22 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
@ -370,16 +374,16 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.c21 > * {
|
||||
.c22 > * {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.c21 > * + * {
|
||||
.c22 > * + * {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.c32 {
|
||||
.c33 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
@ -389,16 +393,16 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.c32 > * {
|
||||
.c33 > * {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.c32 > * + * {
|
||||
.c33 > * + * {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.c25 {
|
||||
.c26 {
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
padding-left: 16px;
|
||||
@ -411,64 +415,64 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
height: 2.5rem;
|
||||
}
|
||||
|
||||
.c25::-webkit-input-placeholder {
|
||||
.c26::-webkit-input-placeholder {
|
||||
color: #8e8ea9;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.c25::-moz-placeholder {
|
||||
.c26::-moz-placeholder {
|
||||
color: #8e8ea9;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.c25:-ms-input-placeholder {
|
||||
.c26:-ms-input-placeholder {
|
||||
color: #8e8ea9;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.c25::placeholder {
|
||||
.c26::placeholder {
|
||||
color: #8e8ea9;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.c25[aria-disabled='true'] {
|
||||
.c26[aria-disabled='true'] {
|
||||
background: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.c24 {
|
||||
.c25 {
|
||||
border: 1px solid #dcdce4;
|
||||
border-radius: 4px;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.c20 textarea {
|
||||
.c21 textarea {
|
||||
height: 5rem;
|
||||
}
|
||||
|
||||
.c18 {
|
||||
.c19 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(12,1fr);
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.c29 {
|
||||
.c30 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(12,1fr);
|
||||
gap: 0px;
|
||||
}
|
||||
|
||||
.c19 {
|
||||
.c20 {
|
||||
grid-column: span 6;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.c30 {
|
||||
.c31 {
|
||||
grid-column: span 7;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.c45 {
|
||||
.c46 {
|
||||
grid-column: span 5;
|
||||
word-break: break-all;
|
||||
}
|
||||
@ -477,7 +481,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.c27 {
|
||||
.c28 {
|
||||
display: block;
|
||||
width: 100%;
|
||||
border: 1px solid #dcdce4;
|
||||
@ -492,33 +496,33 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.c27::-webkit-input-placeholder {
|
||||
.c28::-webkit-input-placeholder {
|
||||
color: #8e8ea9;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.c27::-moz-placeholder {
|
||||
.c28::-moz-placeholder {
|
||||
color: #8e8ea9;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.c27:-ms-input-placeholder {
|
||||
.c28:-ms-input-placeholder {
|
||||
color: #8e8ea9;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.c27::placeholder {
|
||||
.c28::placeholder {
|
||||
color: #8e8ea9;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.c26 textarea {
|
||||
.c27 textarea {
|
||||
height: 5rem;
|
||||
line-height: 1.25rem;
|
||||
font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans', 'Helvetica Neue',sans-serif;
|
||||
}
|
||||
|
||||
.c26 textarea::-webkit-input-placeholder {
|
||||
.c27 textarea::-webkit-input-placeholder {
|
||||
font-weight: 400;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.43;
|
||||
@ -526,7 +530,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.c26 textarea::-moz-placeholder {
|
||||
.c27 textarea::-moz-placeholder {
|
||||
font-weight: 400;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.43;
|
||||
@ -534,7 +538,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.c26 textarea:-ms-input-placeholder {
|
||||
.c27 textarea:-ms-input-placeholder {
|
||||
font-weight: 400;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.43;
|
||||
@ -542,7 +546,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.c26 textarea::placeholder {
|
||||
.c27 textarea::placeholder {
|
||||
font-weight: 400;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.43;
|
||||
@ -558,7 +562,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
padding-left: 56px;
|
||||
}
|
||||
|
||||
.c13 {
|
||||
.c14 {
|
||||
padding-right: 56px;
|
||||
padding-left: 56px;
|
||||
}
|
||||
@ -602,19 +606,19 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
color: #32324d;
|
||||
}
|
||||
|
||||
.c11 {
|
||||
.c12 {
|
||||
font-weight: 400;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.43;
|
||||
color: #666687;
|
||||
}
|
||||
|
||||
.c12 {
|
||||
.c13 {
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.c17 {
|
||||
.c18 {
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
line-height: 1.25;
|
||||
@ -622,37 +626,37 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
}
|
||||
|
||||
@media (max-width:68.75rem) {
|
||||
.c19 {
|
||||
.c20 {
|
||||
grid-column: span;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:34.375rem) {
|
||||
.c19 {
|
||||
.c20 {
|
||||
grid-column: span;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:68.75rem) {
|
||||
.c30 {
|
||||
.c31 {
|
||||
grid-column: span;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:34.375rem) {
|
||||
.c30 {
|
||||
.c31 {
|
||||
grid-column: span;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:68.75rem) {
|
||||
.c45 {
|
||||
.c46 {
|
||||
grid-column: span;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:34.375rem) {
|
||||
.c45 {
|
||||
.c46 {
|
||||
grid-column: span;
|
||||
}
|
||||
}
|
||||
@ -694,7 +698,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="c7 c8"
|
||||
class="c7 c8 c9"
|
||||
>
|
||||
<svg
|
||||
fill="none"
|
||||
@ -710,69 +714,69 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
</svg>
|
||||
</div>
|
||||
<span
|
||||
class="c9 c10"
|
||||
class="c10 c11"
|
||||
>
|
||||
Save
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<p
|
||||
class="c11 c12"
|
||||
class="c12 c13"
|
||||
>
|
||||
Default role given to authenticated user.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c13"
|
||||
class="c14"
|
||||
>
|
||||
<div
|
||||
class="c14"
|
||||
class="c7 c15"
|
||||
>
|
||||
<div
|
||||
class="c7 c15"
|
||||
class="c7 c16"
|
||||
>
|
||||
<div
|
||||
class="c16"
|
||||
class="c7 c17"
|
||||
>
|
||||
<h2
|
||||
class="c17"
|
||||
class="c18"
|
||||
>
|
||||
Role details
|
||||
</h2>
|
||||
<div
|
||||
class="c7 c18"
|
||||
class="c7 c19"
|
||||
>
|
||||
<div
|
||||
class="c19"
|
||||
class="c20"
|
||||
>
|
||||
<div
|
||||
class="c7 "
|
||||
>
|
||||
<div
|
||||
class="c20"
|
||||
class="c21"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="c21"
|
||||
class="c7 c22"
|
||||
>
|
||||
<div
|
||||
class="c7 c22"
|
||||
class="c7 c23"
|
||||
>
|
||||
<label
|
||||
class="c9 c10"
|
||||
class="c10 c11"
|
||||
for="textinput-1"
|
||||
>
|
||||
Name
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
class="c7 c23 c24"
|
||||
class="c7 c24 c25"
|
||||
>
|
||||
<input
|
||||
aria-disabled="false"
|
||||
aria-invalid="false"
|
||||
class="c25"
|
||||
class="c26"
|
||||
id="textinput-1"
|
||||
name="name"
|
||||
value="Authenticated"
|
||||
@ -784,23 +788,23 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c19"
|
||||
class="c20"
|
||||
>
|
||||
<div
|
||||
class="c7 "
|
||||
>
|
||||
<div
|
||||
class="c26"
|
||||
class="c27"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
class="c21"
|
||||
class="c7 c22"
|
||||
>
|
||||
<div
|
||||
class="c7 c22"
|
||||
class="c7 c23"
|
||||
>
|
||||
<label
|
||||
class="c9 c10"
|
||||
class="c10 c11"
|
||||
for="textarea-2"
|
||||
>
|
||||
Description
|
||||
@ -808,7 +812,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
</div>
|
||||
<textarea
|
||||
aria-invalid="false"
|
||||
class="c27"
|
||||
class="c28"
|
||||
id="textarea-2"
|
||||
name="description"
|
||||
>
|
||||
@ -823,59 +827,59 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c7 c28 c29"
|
||||
class="c7 c29 c30"
|
||||
>
|
||||
<div
|
||||
class="c30"
|
||||
class="c31"
|
||||
>
|
||||
<div
|
||||
class="c7 c31"
|
||||
class="c7 c32"
|
||||
>
|
||||
<div
|
||||
class="c16"
|
||||
class="c7 c17"
|
||||
>
|
||||
<div
|
||||
class="c32"
|
||||
class="c7 c33"
|
||||
>
|
||||
<h2
|
||||
class="c33 c34"
|
||||
class="c34 c35"
|
||||
>
|
||||
Permissions
|
||||
</h2>
|
||||
<p
|
||||
class="c9 c35"
|
||||
class="c10 c36"
|
||||
>
|
||||
Only actions bound by a route are listed below.
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
class="c7 c36 c37"
|
||||
class="c7 c37 c38"
|
||||
>
|
||||
<div
|
||||
class="c7 c38"
|
||||
class="c7 c39"
|
||||
>
|
||||
<button
|
||||
aria-controls="accordion-content-accordion-3"
|
||||
aria-expanded="false"
|
||||
aria-labelledby="accordion-label-accordion-3"
|
||||
class="c39"
|
||||
class="c40"
|
||||
data-strapi-accordion-toggle="true"
|
||||
type="button"
|
||||
>
|
||||
<div
|
||||
class="c7 c23"
|
||||
class="c7 c24"
|
||||
>
|
||||
<div
|
||||
class="c7 c40"
|
||||
class="c7 c41"
|
||||
>
|
||||
<span
|
||||
class="c33 c41"
|
||||
class="c34 c42"
|
||||
id="accordion-label-accordion-3"
|
||||
>
|
||||
Application
|
||||
</span>
|
||||
<p
|
||||
class="c9 c35"
|
||||
class="c10 c36"
|
||||
id="accordion-desc-accordion-3"
|
||||
>
|
||||
Define all allowed actions for the application plugin.
|
||||
@ -883,7 +887,7 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
</div>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
class="c7 c42 c43 c44"
|
||||
class="c7 c43 c44 c45"
|
||||
>
|
||||
<svg
|
||||
fill="none"
|
||||
@ -908,22 +912,22 @@ describe('Admin | containers | RoleEditPage', () => {
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c45"
|
||||
class="c46"
|
||||
>
|
||||
<div
|
||||
class="c7 c46"
|
||||
class="c7 c47"
|
||||
style="min-height: 100%;"
|
||||
>
|
||||
<div
|
||||
class="c32"
|
||||
class="c7 c33"
|
||||
>
|
||||
<h3
|
||||
class="c33 c34"
|
||||
class="c34 c35"
|
||||
>
|
||||
Advanced settings
|
||||
</h3>
|
||||
<p
|
||||
class="c9 c35"
|
||||
class="c10 c36"
|
||||
>
|
||||
Select the application's actions or the plugin's actions and click on the cog icon to display the bound route
|
||||
</p>
|
||||
|
||||
File diff suppressed because one or more lines are too long
16
yarn.lock
16
yarn.lock
@ -4921,15 +4921,15 @@
|
||||
resolve-from "^5.0.0"
|
||||
store2 "^2.12.0"
|
||||
|
||||
"@strapi/icons@0.0.1-alpha.32":
|
||||
version "0.0.1-alpha.32"
|
||||
resolved "https://registry.yarnpkg.com/@strapi/icons/-/icons-0.0.1-alpha.32.tgz#7df9b49ea853650eebb6767c989b9323d940233c"
|
||||
integrity sha512-MUT5Kfw4X8edkBG+Li0VnqsyT5LREb4BuowQg84CxABxd82DuLDxf/mnBEI2LVFidxwP8OCBiRF/t9Bzeu7vfw==
|
||||
"@strapi/icons@0.0.1-alpha.33":
|
||||
version "0.0.1-alpha.33"
|
||||
resolved "https://registry.yarnpkg.com/@strapi/icons/-/icons-0.0.1-alpha.33.tgz#42948b6c0f8b9e9053edb1258ee5d3b3b582e0be"
|
||||
integrity sha512-b7n9yU4PQE/q66eJ1Gg8z2t04Q8ZZmtFSlFD52B9UkAt9YM5CpVBigyOOWUD0v9h3NMkp/bS+rrcZFOxOOZqnA==
|
||||
|
||||
"@strapi/parts@0.0.1-alpha.32":
|
||||
version "0.0.1-alpha.32"
|
||||
resolved "https://registry.yarnpkg.com/@strapi/parts/-/parts-0.0.1-alpha.32.tgz#665c045b11175ce6362ae6f32896e987e6b46ffd"
|
||||
integrity sha512-Kujz1W0qAT3W3qFhqFdcS/FHTtXMNULOsftvQKSiuSndPcT36VKJXEN9aenes0d0GaipRoIbJXkrIm+I3rT8Ww==
|
||||
"@strapi/parts@0.0.1-alpha.33":
|
||||
version "0.0.1-alpha.33"
|
||||
resolved "https://registry.yarnpkg.com/@strapi/parts/-/parts-0.0.1-alpha.33.tgz#445d4ce2f27a39273e00bf1399deb522f4801d1c"
|
||||
integrity sha512-BdFrdjwhnLxZ1vPhmyuT5PUh9YM25mjiEh9QiQckX548yXV08ZnHOuIN5RkjfcYrDhBq0JKhgO4XnZFvx9KkXg==
|
||||
dependencies:
|
||||
"@internationalized/number" "^3.0.2"
|
||||
compute-scroll-into-view "^1.0.17"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user