= (props) => {
yAxis,
legend: {
...legend,
- data: legendData
+ data: legendData.map((item: any) => {
+ return {
+ name: item,
+ icon: 'circle'
+ };
+ })
},
series: []
diff --git a/src/components/highlight-code/index.tsx b/src/components/highlight-code/index.tsx
index a8a23d70..15c41a8f 100644
--- a/src/components/highlight-code/index.tsx
+++ b/src/components/highlight-code/index.tsx
@@ -1,3 +1,4 @@
+import useUserSettings from '@/hooks/use-user-settings';
import React from 'react';
import CodeViewerDark from './code-viewer-dark';
import CodeViewerLight from './code-viewer-light';
@@ -22,9 +23,15 @@ const HighlightCode: React.FC<{
height = 'auto'
} = props;
+ const { userSettings } = useUserSettings();
+
+ const currentTheme = React.useMemo(() => {
+ return theme || userSettings.theme === 'realDark' ? 'dark' : 'light';
+ }, [theme, userSettings.theme]);
+
return (
- {theme === 'dark' ? (
+ {currentTheme === 'dark' ? (
= (props) => {
})}
>
>
diff --git a/src/components/markdown-viewer/index.tsx b/src/components/markdown-viewer/index.tsx
index 9de57be2..0dbfdd41 100644
--- a/src/components/markdown-viewer/index.tsx
+++ b/src/components/markdown-viewer/index.tsx
@@ -152,9 +152,7 @@ const MarkdownViewer: React.FC = ({
}
if (token.type === 'code') {
- htmlstr = (
-
- );
+ htmlstr = ;
}
if (token.type === 'link') {
diff --git a/src/components/seal-form/wrapper/index.tsx b/src/components/seal-form/wrapper/index.tsx
index 4ff946e7..be2a2b9d 100644
--- a/src/components/seal-form/wrapper/index.tsx
+++ b/src/components/seal-form/wrapper/index.tsx
@@ -34,7 +34,7 @@ const WrapperBox = styled.div`
border-style: var(--ant-line-type);
border-color: var(--ant-color-border);
border-radius: var(--border-radius-base);
- // background-color: var(--color-white-1);
+ background-color: var(--ant-color-bg-container);
&.borderless {
border: none;
box-shadow: none;
@@ -167,7 +167,7 @@ const Extra = styled.div`
const AddAfter = styled.div`
position: relative;
color: var(--ant-color-text-quaternary);
- font-size: 14px;
+ font-size: var(--font-size-base);
padding-right: calc(var(--ant-padding-sm) - 1px);
`;
diff --git a/src/components/seal-table/index.tsx b/src/components/seal-table/index.tsx
index ccc27435..a170dafb 100644
--- a/src/components/seal-table/index.tsx
+++ b/src/components/seal-table/index.tsx
@@ -15,8 +15,10 @@ const Wrapper = styled.div<{ $token: any }>`
--ant-table-header-border-radius: ${(props) =>
props.$token.headerBorderRadius}px;
--ant-table-header-split-color: ${(props) => props.$token.headerSplitColor};
- --ant-table-row-selected-bg: var(--ant-table-row-selected-bg);
- --ant-table-row-selected-hover-bg: var(--ant-table-row-selected-hover-bg);
+ --ant-table-row-selected-bg: ${(props) => props.$token.rowSelectedBg};
+ --ant-table-row-selected-hover-bg: ${(props) =>
+ props.$token.rowSelectedHoverBg};
+ --ant-table-row-hover-bg: ${(props) => props.$token.rowHoverBg};
`;
const SealTable: React.FC = (
@@ -45,6 +47,7 @@ const SealTable: React.FC = (
loadChildrenAPI
} = props;
const { token } = theme.useToken();
+ console.log('seal-table-props', token.Table);
const parsedColumns = useMemo(() => {
if (columns) return columns;
diff --git a/src/components/seal-table/styles/skeleton.less b/src/components/seal-table/styles/skeleton.less
index ae8c0a58..0c0cdea6 100644
--- a/src/components/seal-table/styles/skeleton.less
+++ b/src/components/seal-table/styles/skeleton.less
@@ -1,7 +1,7 @@
.row-skeleton {
display: flex;
justify-content: flex-start;
- background-color: var(--color-fill-sider);
+ background-color: var(--ant-color-fill-tertiary);
padding: 16px;
height: 68px;
border-radius: var(--border-radius-base);
diff --git a/src/components/segment-line/index.tsx b/src/components/segment-line/index.tsx
index f8c0638d..870f6039 100644
--- a/src/components/segment-line/index.tsx
+++ b/src/components/segment-line/index.tsx
@@ -28,6 +28,7 @@ const SegmentedQwrapper = styled.div<{ $height: number }>`
padding: 0px;
bottom: 0px;
top: unset;
+ background-color: var(--color-white-primary) !important;
}
.ant-segmented-item-label {
display: flex;
diff --git a/src/components/short-cuts/index.less b/src/components/short-cuts/index.less
index 78f569e2..c409b0a2 100644
--- a/src/components/short-cuts/index.less
+++ b/src/components/short-cuts/index.less
@@ -23,7 +23,7 @@
}
.ant-table-thead > tr > th {
- background-color: var(--color-fill-sider);
+ background-color: var(--ant-color-fill-tertiary);
height: 36px;
padding-block: 0;
}
@@ -34,7 +34,7 @@
// overflow-y: auto !important;
// }
.ant-table-thead > tr > th {
- background-color: var(--color-fill-sider);
+ background-color: var(--ant-color-fill-tertiary);
height: 36px;
padding-block: 0;
}
diff --git a/src/components/simple-overlay/index.tsx b/src/components/simple-overlay/index.tsx
new file mode 100644
index 00000000..72579df1
--- /dev/null
+++ b/src/components/simple-overlay/index.tsx
@@ -0,0 +1,46 @@
+import useUserSettings from '@/hooks/use-user-settings';
+import React from 'react';
+import SimpleBar from 'simplebar-react';
+import 'simplebar-react/dist/simplebar.min.css';
+import styled from 'styled-components';
+
+const Wrapper = styled.div`
+ .simplebar-scrollbar::before {
+ width: var(--scrollbar-size);
+ background: var(--scrollbar-handle-bg);
+ }
+ &.dark {
+ .simplebar-scrollbar::before {
+ width: var(--scrollbar-size);
+ background: var(--scrollbar-handle-light-bg);
+ }
+ }
+`;
+
+interface SimpleOverlayProps {
+ height?: string | number;
+ children?: React.ReactNode;
+ style?: React.CSSProperties;
+}
+
+const SimpleOverlay: React.FC = ({
+ height,
+ children,
+ style
+}) => {
+ const { isDarkTheme } = useUserSettings();
+ return (
+
+
+ {children}
+
+
+ );
+};
+
+export default SimpleOverlay;
diff --git a/src/components/status-tag/index.tsx b/src/components/status-tag/index.tsx
index 8d8d7f65..30f23b36 100644
--- a/src/components/status-tag/index.tsx
+++ b/src/components/status-tag/index.tsx
@@ -4,9 +4,9 @@ import { InfoCircleOutlined } from '@ant-design/icons';
import { Button, Divider, Tooltip } from 'antd';
import classNames from 'classnames';
import React, { useEffect, useMemo, useState } from 'react';
-import SimpleBar from 'simplebar-react';
import 'simplebar-react/dist/simplebar.min.css';
import CopyButton from '../copy-button';
+import SimpleOverlay from '../simple-overlay';
import CopyStyle from './copy-btn.less';
import './index.less';
@@ -118,11 +118,7 @@ const StatusTag: React.FC = ({
})}
-
+
= ({
)}
-
+
);
}, [statusValue]);
@@ -155,6 +151,7 @@ const StatusTag: React.FC