diff --git a/src/components/widgets/BaseWidget.tsx b/src/components/widgets/BaseWidget.tsx index e3463ec..d3fc149 100644 --- a/src/components/widgets/BaseWidget.tsx +++ b/src/components/widgets/BaseWidget.tsx @@ -28,9 +28,9 @@ export const defaultSettings: WidgetSettings = { label: 'Виджет', formatter: defaultFormatter, - labelColor: '#000000', - valueColor: '#000000', - backgroundColor: '#f6f6f6', + labelColor: '#FFFFFF', + valueColor: '#FFFFFF', + backgroundColor: '#2F2F2F', unitColor: '#a0a0a0', } diff --git a/src/pages/Well/Telemetry/DashboardNNB/index.jsx b/src/pages/Well/Telemetry/DashboardNNB/index.jsx index 22ff620..0622f37 100644 --- a/src/pages/Well/Telemetry/DashboardNNB/index.jsx +++ b/src/pages/Well/Telemetry/DashboardNNB/index.jsx @@ -118,15 +118,16 @@ const DashboardNNB = memo(({ enableEditing = false }) => { const navigate = useNavigate() const selectedGroup = getTabname() - if (!selectedGroup && groups?.length > 0) - navigate(`${rootPath}/${groups[0].id}`) - - const group = useMemo(() => ({ editable: true, ...groups.find(({ id }) => `${id}` === selectedGroup), }), [groups, selectedGroup]) + useEffect(() => { + if (!selectedGroup && groups?.length > 0) + navigate(`${rootPath}/${groups[0].id}`) + }, [selectedGroup, groups, rootPath, navigate]) + useEffect(() => { invokeWebApiWrapperAsync( async () => { @@ -249,7 +250,7 @@ const DashboardNNB = memo(({ enableEditing = false }) => { /> ))} setSelectedSettings(null)} settings={selectedSettings} onEdit={onEdit} diff --git a/src/styles/include/antd_theme.less b/src/styles/include/antd_theme.less index 1bfd7a0..6709e69 100644 --- a/src/styles/include/antd_theme.less +++ b/src/styles/include/antd_theme.less @@ -68,3 +68,11 @@ @alert-error-border-color: @error; @alert-error-bg-color: darken(@error, 20%); @alert-error-icon-color: @error; + +.ant-menu-item:active, .ant-menu-submenu-title:active { + background-color: darken(@primary, 10%); +} + +.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected { + background-color: @primary; +} diff --git a/src/styles/widgets/base.less b/src/styles/widgets/base.less index 5a1988d..8038e46 100644 --- a/src/styles/widgets/base.less +++ b/src/styles/widgets/base.less @@ -7,8 +7,8 @@ align-items: stretch; margin: 10px; padding: 5px 10px; - border-radius: 5px; - background: #00000009; + border-radius: 6px; + background: #2F2F2F; height: @size; min-width: @size * 1.75;