Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10347e8e18 |
No files matched your search
@@ -1,3 +1,8 @@
|
|||||||
|
## 0.13.3
|
||||||
|
- Добавлено отображение id приложения на экранах страниц 'Приложения' и 'Доступы приложений'
|
||||||
|
- Добавлено фиксирование в localStorage открытое или закрытое меню
|
||||||
|
- Исправлена очистка localStorage после протухания или удаления токена
|
||||||
|
- Исправлены стили для субменю, которые влияли на отображение разрешенных и неразрешенных пунктов меню
|
||||||
## 0.13.2
|
## 0.13.2
|
||||||
- Обновление пермишенов
|
- Обновление пермишенов
|
||||||
## 0.13.1
|
## 0.13.1
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "isp-admin-ui",
|
"name": "isp-admin-ui",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.13.2",
|
"version": "0.13.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ const ApplicationsContent: FC<ApplicationsContentPropTypes> = ({
|
|||||||
return (
|
return (
|
||||||
<List.Item>
|
<List.Item>
|
||||||
<Tooltip mouseEnterDelay={1.3} title={item.name}>
|
<Tooltip mouseEnterDelay={1.3} title={item.name}>
|
||||||
<List.Item.Meta title={item.name} description={item.description} />
|
<List.Item.Meta title={item.name} description={<span>id: {item.id}</span>}/>
|
||||||
<div
|
<div
|
||||||
className="link-btn"
|
className="link-btn"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ import './layout.scss';
|
|||||||
const { Content, Sider } = Layout
|
const { Content, Sider } = Layout
|
||||||
|
|
||||||
const LayoutComponent = () => {
|
const LayoutComponent = () => {
|
||||||
const [collapsed, setCollapsed] = useState<boolean>(true)
|
const [collapsed, setCollapsed] = useState<boolean>(LocalStorage.get('menu') === null ? true : LocalStorage.get('menu'))
|
||||||
const [selectedMenuKeys, setSelectedMenuKeys] = useState<MenuItemKeysType[]>(
|
const [selectedMenuKeys, setSelectedMenuKeys] = useState<MenuItemKeysType[]>(
|
||||||
[]
|
[]
|
||||||
)
|
)
|
||||||
@@ -204,7 +204,10 @@ const LayoutComponent = () => {
|
|||||||
theme="light"
|
theme="light"
|
||||||
collapsible
|
collapsible
|
||||||
collapsed={collapsed}
|
collapsed={collapsed}
|
||||||
onCollapse={(value) => setCollapsed(value)}
|
onCollapse={(value) => {
|
||||||
|
LocalStorage.set('menu', value)
|
||||||
|
setCollapsed(value)
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Header collapsed={collapsed} />
|
<Header collapsed={collapsed} />
|
||||||
<Menu
|
<Menu
|
||||||
|
|||||||
@@ -44,3 +44,9 @@
|
|||||||
padding-top: 5px !important;
|
padding-top: 5px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ant-menu-submenu {
|
||||||
|
.hide-item {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { List, message, Spin, Tooltip } from 'antd'
|
import { message, Spin } from 'antd'
|
||||||
import { Layout } from 'isp-ui-kit'
|
import { Layout } from 'isp-ui-kit'
|
||||||
import { ColumnItem } from 'isp-ui-kit/dist/Layout/Column/column.type'
|
import { ColumnItem } from 'isp-ui-kit/dist/Layout/Column/column.type'
|
||||||
import { useEffect, useMemo, useState } from 'react'
|
import { useEffect, useMemo, useState } from 'react'
|
||||||
@@ -23,6 +23,7 @@ import applicationsGroupApi from '@services/applicationsGroupService.ts'
|
|||||||
import { routePaths } from '@routes/routePaths.ts'
|
import { routePaths } from '@routes/routePaths.ts'
|
||||||
|
|
||||||
import { PermissionKeysType } from '@type/roles.type.ts'
|
import { PermissionKeysType } from '@type/roles.type.ts'
|
||||||
|
import ListItem from '@widgets/ListItem'
|
||||||
|
|
||||||
import './applications-page.scss'
|
import './applications-page.scss'
|
||||||
|
|
||||||
@@ -79,19 +80,6 @@ const ApplicationsPage = () => {
|
|||||||
return <Spin className="spin" />
|
return <Spin className="spin" />
|
||||||
}
|
}
|
||||||
|
|
||||||
const renderColumnItems = (item: ColumnItem<any>) => {
|
|
||||||
return (
|
|
||||||
<List.Item>
|
|
||||||
<Tooltip mouseEnterDelay={1} title={item.name}>
|
|
||||||
<List.Item.Meta
|
|
||||||
title={item.name}
|
|
||||||
description={<span>{item.description}</span>}
|
|
||||||
/>
|
|
||||||
</Tooltip>
|
|
||||||
</List.Item>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const addApplicationModal = () => {
|
const addApplicationModal = () => {
|
||||||
setShowApplicationsModal({
|
setShowApplicationsModal({
|
||||||
...showApplicationsModal,
|
...showApplicationsModal,
|
||||||
@@ -183,7 +171,7 @@ const ApplicationsPage = () => {
|
|||||||
applicationsGroup as unknown as ColumnItem<ApplicationsGroupType>[],
|
applicationsGroup as unknown as ColumnItem<ApplicationsGroupType>[],
|
||||||
searchValue
|
searchValue
|
||||||
)}
|
)}
|
||||||
renderItems={renderColumnItems}
|
renderItems={(item) => <ListItem item={item} />}
|
||||||
searchValue={searchValue}
|
searchValue={searchValue}
|
||||||
selectedItemId={selectedItemId}
|
selectedItemId={selectedItemId}
|
||||||
setSelectedItemId={(itemId) => {
|
setSelectedItemId={(itemId) => {
|
||||||
|
|||||||
@@ -30,12 +30,17 @@ apiService.interceptors.request.use(
|
|||||||
(error: AxiosError<MSPError>) => Promise.reject(error)
|
(error: AxiosError<MSPError>) => Promise.reject(error)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const localClear = () => {
|
||||||
|
LocalStorage.remove(localStorageKeys.USER_TOKEN)
|
||||||
|
LocalStorage.remove(localStorageKeys.HEADER_NAME)
|
||||||
|
}
|
||||||
|
|
||||||
apiService.interceptors.response.use(
|
apiService.interceptors.response.use(
|
||||||
async (response: any) => response,
|
async (response: any) => response,
|
||||||
(error: AxiosError<MSPError>) => {
|
(error: AxiosError<MSPError>) => {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
if (error.response && error.response.status === 401) {
|
if (error.response && error.response.status === 401) {
|
||||||
LocalStorage.clear()
|
localClear()
|
||||||
message.error('Ваша сессия истекла"').then()
|
message.error('Ваша сессия истекла"').then()
|
||||||
LocalStorage.set('redirectUrl', location.pathname)
|
LocalStorage.set('redirectUrl', location.pathname)
|
||||||
window.location.href = routePaths.login
|
window.location.href = routePaths.login
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const ListItem: FC<ListItemProps> = ({ item }) => {
|
|||||||
return (
|
return (
|
||||||
<List.Item>
|
<List.Item>
|
||||||
<Tooltip mouseEnterDelay={1} title={item.name}>
|
<Tooltip mouseEnterDelay={1} title={item.name}>
|
||||||
<List.Item.Meta title={item.name} />
|
<List.Item.Meta title={item.name} description={<span>id: {item.id}</span>} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</List.Item>
|
</List.Item>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user