VORKOUT-9 #6

Merged
vlad.dev merged 11 commits from VORKOUT-9 into master 2025-04-29 12:15:41 +05:00
2 changed files with 27 additions and 9 deletions
Showing only changes of commit 9cab3142c9 - Show all commits

View File

@ -1,4 +1,4 @@
import { Divider, Menu } from 'antd'; import { Divider, Menu, Tooltip } from 'antd';
import React from 'react'; import React from 'react';
interface SiderMenuProps { interface SiderMenuProps {
@ -12,6 +12,10 @@ export default function SiderMenu({
selectedKey, selectedKey,
hangleMenuClick, hangleMenuClick,
}: SiderMenuProps) { }: SiderMenuProps) {
const collapseStyle = collapsed
? { fontSize: '12px' }
: { fontSize: '12px', paddingLeft: '52px' };
const menuItems = [ const menuItems = [
{ {
key: 'toggle', key: 'toggle',
@ -33,7 +37,7 @@ export default function SiderMenu({
icon: ( icon: (
<img src="./icons/sider/process-diagram.svg" alt="process diagram" /> <img src="./icons/sider/process-diagram.svg" alt="process diagram" />
), ),
label: 'Схемы процессов', label: <Tooltip title="Схемы процессов">Схемы процессов</Tooltip>,
vlad.dev marked this conversation as resolved Outdated

gettext() тут пока не практикуем?

gettext() тут пока не практикуем?
}, },
{ {
key: '/running-processes', key: '/running-processes',
@ -43,7 +47,7 @@ export default function SiderMenu({
alt="running processes" alt="running processes"
/> />
), ),
label: 'Запущенные процессы', label: <Tooltip title="Запущенные процессы">Запущенные процессы</Tooltip>,
}, },
!collapsed !collapsed
? { ? {
@ -53,6 +57,7 @@ export default function SiderMenu({
marginBottom: '-16px', marginBottom: '-16px',
marginTop: '-4px', marginTop: '-4px',
cursor: 'default', cursor: 'default',
width: '100%',
}, },
disabled: true, disabled: true,
} }
@ -65,18 +70,30 @@ export default function SiderMenu({
children: [ children: [
{ {
key: '/accounts', key: '/accounts',
label: 'Учетные записи', label: !collapsed ? (
style: { fontSize: '12px', paddingLeft: '52px' }, <Tooltip title="Учетные записи">Учетные записи</Tooltip>
) : (
'Учетные записи'
),
style: collapseStyle,
}, },
{ {
key: '/events-list', key: '/events-list',
label: 'Справочник событий', label: !collapsed ? (
style: { fontSize: '12px', paddingLeft: '52px' }, <Tooltip title="Справочник событий">Справочник событий</Tooltip>
) : (
'Справочник событий'
),
style: collapseStyle,
}, },
{ {
key: '/configuration', key: '/configuration',
label: 'Конфигурация', label: !collapsed ? (
style: { fontSize: '12px', paddingLeft: '52px' }, <Tooltip title="Конфигурация">Конфигурация</Tooltip>
) : (
'Конфигурация'
),
style: collapseStyle,
}, },
], ],
}, },

View File

@ -6,6 +6,7 @@ export const theme = {
itemColor: 'f2f2f2', itemColor: 'f2f2f2',
itemBg: '#f2f2f2', itemBg: '#f2f2f2',
subMenuItemBg: '#f2f2f2', subMenuItemBg: '#f2f2f2',
iconSize: '18px',
}, },
Layout: { Layout: {
bodyBg: '#f2f2f2', bodyBg: '#f2f2f2',