diff --git a/CHANGELOG.md b/CHANGELOG.md index cce9f93..95e0802 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.13.3 +- Добавлено отображение id приложения на экранах страниц 'Приложения' и 'Доступы приложений' +- Добавлено фиксирование в localStorage открытое или закрытое меню +- Исправлена очистка localStorage после протухания или удаления токена +- Исправлены стили для субменю, которые влияли на отображение разрешенных и неразрешенных пунктов меню ## 0.13.2 - Обновление пермишенов ## 0.13.1 diff --git a/package.json b/package.json index 6b8feef..da1cdab 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "isp-admin-ui", "private": true, - "version": "0.13.2", + "version": "0.13.3", "type": "module", "scripts": { "start": "vite", diff --git a/src/components/ApplicationsContent/index.tsx b/src/components/ApplicationsContent/index.tsx index c061d49..a83c462 100644 --- a/src/components/ApplicationsContent/index.tsx +++ b/src/components/ApplicationsContent/index.tsx @@ -142,7 +142,7 @@ const ApplicationsContent: FC = ({ return ( - + id: {item.id}}/>
{ diff --git a/src/components/Layout/index.tsx b/src/components/Layout/index.tsx index f5ccc8c..4b4e0c7 100644 --- a/src/components/Layout/index.tsx +++ b/src/components/Layout/index.tsx @@ -40,7 +40,7 @@ import './layout.scss'; const { Content, Sider } = Layout const LayoutComponent = () => { - const [collapsed, setCollapsed] = useState(true) + const [collapsed, setCollapsed] = useState(LocalStorage.get('menu') === null ? true : LocalStorage.get('menu')) const [selectedMenuKeys, setSelectedMenuKeys] = useState( [] ) @@ -204,7 +204,10 @@ const LayoutComponent = () => { theme="light" collapsible collapsed={collapsed} - onCollapse={(value) => setCollapsed(value)} + onCollapse={(value) => { + LocalStorage.set('menu', value) + setCollapsed(value) + }} >
{ return } - const renderColumnItems = (item: ColumnItem) => { - return ( - - - {item.description}} - /> - - - ) - } - const addApplicationModal = () => { setShowApplicationsModal({ ...showApplicationsModal, @@ -183,7 +171,7 @@ const ApplicationsPage = () => { applicationsGroup as unknown as ColumnItem[], searchValue )} - renderItems={renderColumnItems} + renderItems={(item) => } searchValue={searchValue} selectedItemId={selectedItemId} setSelectedItemId={(itemId) => { diff --git a/src/services/apiService.ts b/src/services/apiService.ts index 9124a01..e1b8b80 100644 --- a/src/services/apiService.ts +++ b/src/services/apiService.ts @@ -30,12 +30,17 @@ apiService.interceptors.request.use( (error: AxiosError) => Promise.reject(error) ) +const localClear = () => { + LocalStorage.remove(localStorageKeys.USER_TOKEN) + LocalStorage.remove(localStorageKeys.HEADER_NAME) +} + apiService.interceptors.response.use( async (response: any) => response, (error: AxiosError) => { console.error(error) if (error.response && error.response.status === 401) { - LocalStorage.clear() + localClear() message.error('Ваша сессия истекла"').then() LocalStorage.set('redirectUrl', location.pathname) window.location.href = routePaths.login diff --git a/src/widgets/ListItem/index.tsx b/src/widgets/ListItem/index.tsx index 3fb828f..3dc0863 100644 --- a/src/widgets/ListItem/index.tsx +++ b/src/widgets/ListItem/index.tsx @@ -8,7 +8,7 @@ const ListItem: FC = ({ item }) => { return ( - + id: {item.id}} /> )