Исправлена страница Дашборда ННБ

This commit is contained in:
goodmice 2022-12-28 12:19:46 +05:00
parent e9cc5f14e7
commit 0f2251b8d0
No known key found for this signature in database
GPG Key ID: EA4AA16454AC96C8
4 changed files with 19 additions and 10 deletions

View File

@ -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',
}

View File

@ -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 }) => {
/>
))}
<WidgetSettingsWindow
visible={!!selectedSettings}
open={!!selectedSettings}
onCancel={() => setSelectedSettings(null)}
settings={selectedSettings}
onEdit={onEdit}

View File

@ -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;
}

View File

@ -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;