mirror of
https://github.com/strapi/strapi.git
synced 2025-09-17 12:27:33 +00:00
Merge pull request #15895 from strapi/data-transfer/limit-token-name-length
No length limit on the name for the API token or transfer token
This commit is contained in:
commit
19711041d8
@ -69,6 +69,7 @@ const FormHead = ({
|
|||||||
})}
|
})}
|
||||||
</Link>
|
</Link>
|
||||||
}
|
}
|
||||||
|
ellipsis
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -63,8 +63,8 @@ const Table = ({
|
|||||||
condition: canUpdate,
|
condition: canUpdate,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Td>
|
<Td maxWidth={pxToRem(250)}>
|
||||||
<Typography textColor="neutral800" fontWeight="bold">
|
<Typography textColor="neutral800" fontWeight="bold" ellipsis>
|
||||||
{token.name}
|
{token.name}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Td>
|
</Td>
|
||||||
|
@ -275,6 +275,10 @@ exports[`ADMIN | Pages | API TOKENS | EditView renders and matches the snapshot
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
|
display: block;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
color: #32324d;
|
color: #32324d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1824,6 +1828,10 @@ exports[`ADMIN | Pages | API TOKENS | EditView renders and matches the snapshot
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
|
display: block;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
color: #32324d;
|
color: #32324d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import * as yup from 'yup';
|
|||||||
import { translatedErrors } from '@strapi/helper-plugin';
|
import { translatedErrors } from '@strapi/helper-plugin';
|
||||||
|
|
||||||
const schema = yup.object().shape({
|
const schema = yup.object().shape({
|
||||||
name: yup.string(translatedErrors.string).required(translatedErrors.required),
|
name: yup.string(translatedErrors.string).max(100).required(translatedErrors.required),
|
||||||
type: yup
|
type: yup
|
||||||
.string(translatedErrors.string)
|
.string(translatedErrors.string)
|
||||||
.oneOf(['read-only', 'full-access', 'custom'])
|
.oneOf(['read-only', 'full-access', 'custom'])
|
||||||
|
@ -158,7 +158,7 @@ describe('ADMIN | Pages | API TOKENS | ListPage', () => {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.c36 {
|
.c35 {
|
||||||
max-width: 15.625rem;
|
max-width: 15.625rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,9 +255,13 @@ describe('ADMIN | Pages | API TOKENS | ListPage', () => {
|
|||||||
color: #666687;
|
color: #666687;
|
||||||
}
|
}
|
||||||
|
|
||||||
.c35 {
|
.c36 {
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
line-height: 1.43;
|
line-height: 1.43;
|
||||||
|
display: block;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #32324d;
|
color: #32324d;
|
||||||
}
|
}
|
||||||
@ -919,19 +923,19 @@ describe('ADMIN | Pages | API TOKENS | ListPage', () => {
|
|||||||
>
|
>
|
||||||
<td
|
<td
|
||||||
aria-colindex="1"
|
aria-colindex="1"
|
||||||
class="c25"
|
class="c35 c25"
|
||||||
role="gridcell"
|
role="gridcell"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="c5 c35"
|
class="c5 c36"
|
||||||
>
|
>
|
||||||
My super token
|
My super token
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td
|
||||||
aria-colindex="2"
|
aria-colindex="2"
|
||||||
class="c36 c25"
|
class="c35 c25"
|
||||||
role="gridcell"
|
role="gridcell"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
>
|
>
|
||||||
|
@ -148,6 +148,10 @@ exports[`ADMIN | Pages | TRANSFER TOKENS | EditView renders and matches the snap
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
|
display: block;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
color: #32324d;
|
color: #32324d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1121,6 +1125,10 @@ exports[`ADMIN | Pages | TRANSFER TOKENS | EditView renders and matches the snap
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
|
display: block;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
color: #32324d;
|
color: #32324d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import * as yup from 'yup';
|
|||||||
import { translatedErrors } from '@strapi/helper-plugin';
|
import { translatedErrors } from '@strapi/helper-plugin';
|
||||||
|
|
||||||
const schema = yup.object().shape({
|
const schema = yup.object().shape({
|
||||||
name: yup.string(translatedErrors.string).required(translatedErrors.required),
|
name: yup.string(translatedErrors.string).max(100).required(translatedErrors.required),
|
||||||
description: yup.string().nullable(),
|
description: yup.string().nullable(),
|
||||||
lifespan: yup.number().integer().min(0).nullable().defined(translatedErrors.required),
|
lifespan: yup.number().integer().min(0).nullable().defined(translatedErrors.required),
|
||||||
});
|
});
|
||||||
|
@ -158,7 +158,7 @@ describe('ADMIN | Pages | TRANSFER TOKENS | ListPage', () => {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.c36 {
|
.c35 {
|
||||||
max-width: 15.625rem;
|
max-width: 15.625rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,9 +255,13 @@ describe('ADMIN | Pages | TRANSFER TOKENS | ListPage', () => {
|
|||||||
color: #666687;
|
color: #666687;
|
||||||
}
|
}
|
||||||
|
|
||||||
.c35 {
|
.c36 {
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
line-height: 1.43;
|
line-height: 1.43;
|
||||||
|
display: block;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #32324d;
|
color: #32324d;
|
||||||
}
|
}
|
||||||
@ -919,19 +923,19 @@ describe('ADMIN | Pages | TRANSFER TOKENS | ListPage', () => {
|
|||||||
>
|
>
|
||||||
<td
|
<td
|
||||||
aria-colindex="1"
|
aria-colindex="1"
|
||||||
class="c25"
|
class="c35 c25"
|
||||||
role="gridcell"
|
role="gridcell"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="c5 c35"
|
class="c5 c36"
|
||||||
>
|
>
|
||||||
My super token
|
My super token
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td
|
||||||
aria-colindex="2"
|
aria-colindex="2"
|
||||||
class="c36 c25"
|
class="c35 c25"
|
||||||
role="gridcell"
|
role="gridcell"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
>
|
>
|
||||||
|
@ -10,14 +10,14 @@ import DateTimePicker from './index';
|
|||||||
argTypes={{
|
argTypes={{
|
||||||
label: {
|
label: {
|
||||||
control: {
|
control: {
|
||||||
type: 'text'
|
type: 'text',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
control: {
|
control: {
|
||||||
type: 'date'
|
type: 'date',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ Description...
|
|||||||
<DateTimePicker
|
<DateTimePicker
|
||||||
onClear={() => setValue(undefined)}
|
onClear={() => setValue(undefined)}
|
||||||
value={value}
|
value={value}
|
||||||
onChange={e => setValue(e)}
|
onChange={(e) => setValue(e)}
|
||||||
label="Date time picker"
|
label="Date time picker"
|
||||||
hint="This is a super description"
|
hint="This is a super description"
|
||||||
/>
|
/>
|
||||||
@ -53,6 +53,7 @@ Description...
|
|||||||
<Canvas>
|
<Canvas>
|
||||||
<Story name="error">
|
<Story name="error">
|
||||||
<DateTimePicker
|
<DateTimePicker
|
||||||
|
label="Date time picker"
|
||||||
hint="This is a super description"
|
hint="This is a super description"
|
||||||
error="Very very very very very very very long error"
|
error="Very very very very very very very long error"
|
||||||
/>
|
/>
|
||||||
|
@ -4,6 +4,7 @@ import { useEffect, useState, useRef } from 'react';
|
|||||||
import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs';
|
import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs';
|
||||||
import { Button, Box, Main, Flex } from '@strapi/design-system';
|
import { Button, Box, Main, Flex } from '@strapi/design-system';
|
||||||
import useQueryParams from '../../hooks/useQueryParams';
|
import useQueryParams from '../../hooks/useQueryParams';
|
||||||
|
import useTracking from '../../hooks/useTracking';
|
||||||
import FilterListURLQuery from '../FilterListURLQuery';
|
import FilterListURLQuery from '../FilterListURLQuery';
|
||||||
import FilterPopoverURLQuery from './index';
|
import FilterPopoverURLQuery from './index';
|
||||||
|
|
||||||
@ -51,6 +52,7 @@ import { FilterListURLQuery } from '@strapi/helper-plugin';
|
|||||||
metadatas: { label: 'city' },
|
metadatas: { label: 'city' },
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
const { trackUsage } = useTracking();
|
||||||
return (
|
return (
|
||||||
<Main>
|
<Main>
|
||||||
<Flex direction="column" alignItems="stretch" gap={6}>
|
<Flex direction="column" alignItems="stretch" gap={6}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user