diff --git a/.gitignore b/.gitignore index 0e787cb..d03ea27 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ .swc .turbopack /dist -.DS_Store \ No newline at end of file +.DS_Store +/wdoc \ No newline at end of file diff --git a/.umirc.gms.ts b/.umirc.gms.ts index a226861..0f80da5 100644 --- a/.umirc.gms.ts +++ b/.umirc.gms.ts @@ -22,7 +22,7 @@ export default defineConfig({ name: 'gms.monitor', icon: 'icon-monitor', path: '/monitor', - component: './Slave/GMS/Monitor', + component: './Slave/Spole/Monitor', }, { ...managerRouteBase, diff --git a/config/request_dev.ts b/config/request_dev.ts index 42ab858..235b118 100644 --- a/config/request_dev.ts +++ b/config/request_dev.ts @@ -102,7 +102,9 @@ export const handleRequestConfig: RequestConfig = { ...options, headers: { ...options.headers, - ...(token ? { Authorization: `${token}` } : {}), + ...(token && !options.headers.Authorization + ? { Authorization: `${token}` } + : {}), }, }, }; diff --git a/config/request_prod.ts b/config/request_prod.ts index 33f4b21..96485c6 100644 --- a/config/request_prod.ts +++ b/config/request_prod.ts @@ -86,7 +86,9 @@ export const handleRequestConfig: RequestConfig = { ...options, headers: { ...options.headers, - ...(token ? { Authorization: `${token}` } : {}), + ...(token && !options.headers.Authorization + ? { Authorization: `${token}` } + : {}), }, }, }; diff --git a/config/routes.ts b/config/routes.ts index 5a7c959..819f57e 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -39,6 +39,10 @@ export const commonManagerRoutes = [ path: '/manager/devices', component: './Manager/Device', }, + { + path: '/manager/devices/:thingId', + component: './Manager/Device/Detail', + }, ], }, { diff --git a/src/app.tsx b/src/app.tsx index d19d95f..756869b 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -86,7 +86,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => { contentWidth: 'Fluid', navTheme: isDark ? 'realDark' : 'light', splitMenus: true, - iconfontUrl: '//at.alicdn.com/t/c/font_5096559_pwy498d2aw.js', + iconfontUrl: '//at.alicdn.com/t/c/font_5096559_gjd5149497o.js', contentStyle: { padding: 0, margin: 0, diff --git a/src/components/IconFont/index.tsx b/src/components/IconFont/index.tsx index 6ec92c8..5b854c0 100644 --- a/src/components/IconFont/index.tsx +++ b/src/components/IconFont/index.tsx @@ -1,7 +1,7 @@ import { createFromIconfontCN } from '@ant-design/icons'; const IconFont = createFromIconfontCN({ - scriptUrl: '//at.alicdn.com/t/c/font_5096559_pwy498d2aw.js', + scriptUrl: '//at.alicdn.com/t/c/font_5096559_gjd5149497o.js', }); export default IconFont; diff --git a/src/components/shared/TooltipIconFontButton.tsx b/src/components/shared/TooltipIconFontButton.tsx new file mode 100644 index 0000000..2acb57e --- /dev/null +++ b/src/components/shared/TooltipIconFontButton.tsx @@ -0,0 +1,69 @@ +import type { ButtonProps } from 'antd'; +import { Button, Tooltip } from 'antd'; +import React from 'react'; +import IconFont from '../IconFont'; + +type TooltipIconFontButtonProps = { + tooltip?: string; + iconFontName: string; + color?: string; + onClick?: () => void; +} & Omit; + +const TooltipIconFontButton: React.FC = ({ + tooltip, + iconFontName, + color, + onClick, + ...buttonProps +}) => { + const wrapperClassName = `tooltip-iconfont-wrapper-${color?.replace( + /[^a-zA-Z0-9]/g, + '-', + )}`; + const icon = ( + + ); + + if (tooltip) { + return ( + +