mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-03 19:36:20 +00:00 
			
		
		
		
	fix: several UI issues a typos
This commit is contained in:
		
							parent
							
								
									105cdbf182
								
							
						
					
					
						commit
						6529e2bd50
					
				@ -286,13 +286,15 @@ const EventsRow = ({
 | 
			
		||||
      {events.map((event) => {
 | 
			
		||||
        return (
 | 
			
		||||
          <Td key={event} textAlign="center">
 | 
			
		||||
            <Checkbox
 | 
			
		||||
              disabled={disabledEvents.includes(event)}
 | 
			
		||||
              aria-label={event}
 | 
			
		||||
              name={event}
 | 
			
		||||
              checked={inputValue.includes(event)}
 | 
			
		||||
              onCheckedChange={(value) => handleSelect(event, !!value)}
 | 
			
		||||
            />
 | 
			
		||||
            <Flex width="100%" justifyContent="center">
 | 
			
		||||
              <Checkbox
 | 
			
		||||
                disabled={disabledEvents.includes(event)}
 | 
			
		||||
                aria-label={event}
 | 
			
		||||
                name={event}
 | 
			
		||||
                checked={inputValue.includes(event)}
 | 
			
		||||
                onCheckedChange={(value) => handleSelect(event, !!value)}
 | 
			
		||||
              />
 | 
			
		||||
            </Flex>
 | 
			
		||||
          </Td>
 | 
			
		||||
        );
 | 
			
		||||
      })}
 | 
			
		||||
 | 
			
		||||
@ -13,10 +13,15 @@ import {
 | 
			
		||||
} from '@strapi/design-system';
 | 
			
		||||
import { Minus, Plus } from '@strapi/icons';
 | 
			
		||||
import { useIntl } from 'react-intl';
 | 
			
		||||
import { styled } from 'styled-components';
 | 
			
		||||
 | 
			
		||||
import { useField, useForm } from '../../../../../components/Form';
 | 
			
		||||
import { StringInput } from '../../../../../components/FormInputs/String';
 | 
			
		||||
 | 
			
		||||
const AddHeaderButton = styled(TextButton)`
 | 
			
		||||
  cursor: pointer;
 | 
			
		||||
`;
 | 
			
		||||
 | 
			
		||||
/* -------------------------------------------------------------------------------------------------
 | 
			
		||||
 * HeadersInput
 | 
			
		||||
 * -----------------------------------------------------------------------------------------------*/
 | 
			
		||||
@ -44,7 +49,7 @@ const HeadersInput = () => {
 | 
			
		||||
      <Box padding={8} background="neutral100" hasRadius>
 | 
			
		||||
        {value.map((_, index) => {
 | 
			
		||||
          return (
 | 
			
		||||
            <Grid.Root key={index} gap={4}>
 | 
			
		||||
            <Grid.Root key={index} gap={4} padding={2}>
 | 
			
		||||
              <Grid.Item col={6}>
 | 
			
		||||
                <HeaderCombobox
 | 
			
		||||
                  name={`headers.${index}.key`}
 | 
			
		||||
@ -92,23 +97,23 @@ const HeadersInput = () => {
 | 
			
		||||
                  </Flex>
 | 
			
		||||
                </Flex>
 | 
			
		||||
              </Grid.Item>
 | 
			
		||||
              <Grid.Item col={12}>
 | 
			
		||||
                <TextButton
 | 
			
		||||
                  type="button"
 | 
			
		||||
                  onClick={() => {
 | 
			
		||||
                    addFieldRow('headers', { key: '', value: '' });
 | 
			
		||||
                  }}
 | 
			
		||||
                  startIcon={<Plus />}
 | 
			
		||||
                >
 | 
			
		||||
                  {formatMessage({
 | 
			
		||||
                    id: 'Settings.webhooks.create.header',
 | 
			
		||||
                    defaultMessage: 'Create new header',
 | 
			
		||||
                  })}
 | 
			
		||||
                </TextButton>
 | 
			
		||||
              </Grid.Item>
 | 
			
		||||
            </Grid.Root>
 | 
			
		||||
          );
 | 
			
		||||
        })}
 | 
			
		||||
        <Box paddingTop={4}>
 | 
			
		||||
          <AddHeaderButton
 | 
			
		||||
            type="button"
 | 
			
		||||
            onClick={() => {
 | 
			
		||||
              addFieldRow('headers', { key: '', value: '' });
 | 
			
		||||
            }}
 | 
			
		||||
            startIcon={<Plus />}
 | 
			
		||||
          >
 | 
			
		||||
            {formatMessage({
 | 
			
		||||
              id: 'Settings.webhooks.create.header',
 | 
			
		||||
              defaultMessage: 'Create new header',
 | 
			
		||||
            })}
 | 
			
		||||
          </AddHeaderButton>
 | 
			
		||||
        </Box>
 | 
			
		||||
      </Box>
 | 
			
		||||
    </Flex>
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
@ -72,14 +72,6 @@ const ListPage = () => {
 | 
			
		||||
      // In this case, the passed parameter cannot and shouldn't be something else than User
 | 
			
		||||
      cellFormatter: ({ user }) => (user ? user.displayName : ''),
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      name: 'actions',
 | 
			
		||||
      label: formatMessage({
 | 
			
		||||
        id: 'Settings.permissions.auditLogs.actions',
 | 
			
		||||
        defaultMessage: 'Actions',
 | 
			
		||||
      }),
 | 
			
		||||
      sortable: false,
 | 
			
		||||
    },
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  if (hasError) {
 | 
			
		||||
@ -170,8 +162,6 @@ const ListPage = () => {
 | 
			
		||||
                            </Typography>
 | 
			
		||||
                          </Table.Cell>
 | 
			
		||||
                        );
 | 
			
		||||
                      case 'actions':
 | 
			
		||||
                        return null;
 | 
			
		||||
                      default:
 | 
			
		||||
                        return (
 | 
			
		||||
                          <Table.Cell key={name}>
 | 
			
		||||
@ -202,8 +192,9 @@ const ListPage = () => {
 | 
			
		||||
            </Table.Body>
 | 
			
		||||
          </Table.Content>
 | 
			
		||||
        </Table.Root>
 | 
			
		||||
        <Pagination.Root {...auditLogs?.pagination} defaultPageSize={24}>
 | 
			
		||||
          <Pagination.PageSize options={['12', '24', '50', '100']} />
 | 
			
		||||
 | 
			
		||||
        <Pagination.Root {...auditLogs?.pagination}>
 | 
			
		||||
          <Pagination.PageSize />
 | 
			
		||||
          <Pagination.Links />
 | 
			
		||||
        </Pagination.Root>
 | 
			
		||||
      </Layouts.Content>
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import React, { useCallback, useMemo } from 'react';
 | 
			
		||||
 | 
			
		||||
import { Box, Checkbox, Flex, Typography, Grid, VisuallyHidden } from '@strapi/design-system';
 | 
			
		||||
import { Cog as CogIcon } from '@strapi/icons';
 | 
			
		||||
import { Cog } from '@strapi/icons';
 | 
			
		||||
import get from 'lodash/get';
 | 
			
		||||
import PropTypes from 'prop-types';
 | 
			
		||||
import { useIntl } from 'react-intl';
 | 
			
		||||
@ -103,7 +103,7 @@ const SubCategory = ({ subCategory }) => {
 | 
			
		||||
                        }
 | 
			
		||||
                      )}
 | 
			
		||||
                    </VisuallyHidden>
 | 
			
		||||
                    <CogIcon id="cog" />
 | 
			
		||||
                    <Cog id="cog" />
 | 
			
		||||
                  </button>
 | 
			
		||||
                </CheckboxWrapper>
 | 
			
		||||
              </Grid.Item>
 | 
			
		||||
 | 
			
		||||
@ -63,7 +63,7 @@ export const ProvidersPage = () => {
 | 
			
		||||
 | 
			
		||||
  const submitMutation = useMutation((body) => put('/users-permissions/providers', body), {
 | 
			
		||||
    async onSuccess() {
 | 
			
		||||
      await queryClient.invalidateQueries(['users-permissions', 'providers']);
 | 
			
		||||
      await queryClient.invalidateQueries(['users-permissions', 'get-providers']);
 | 
			
		||||
 | 
			
		||||
      toggleNotification({
 | 
			
		||||
        type: 'success',
 | 
			
		||||
 | 
			
		||||
@ -13,7 +13,7 @@ const EditLink = styled(Link)`
 | 
			
		||||
  width: 3.2rem;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  justify-content: center;
 | 
			
		||||
  padding: ${({ theme }) => `${theme.spaces[2]}}`};
 | 
			
		||||
  padding: ${({ theme }) => `${theme.spaces[2]}`};
 | 
			
		||||
 | 
			
		||||
  svg {
 | 
			
		||||
    height: 1.6rem;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user