From 96a41aa5ea5b2ae53ed6651885571b9e976957df Mon Sep 17 00:00:00 2001 From: leandrofars Date: Fri, 20 Feb 2026 11:12:18 -0300 Subject: [PATCH] feat(frontend): layout without disabled tabs --- frontend/src/layouts/dashboard/config.js | 180 ++++++++++-------- .../src/layouts/dashboard/side-nav-item.js | 2 + frontend/src/layouts/dashboard/top-nav.js | 4 +- frontend/src/pages/devices/cwmp/[...id].js | 4 +- frontend/src/pages/devices/usp/[...id].js | 4 +- 5 files changed, 108 insertions(+), 86 deletions(-) diff --git a/frontend/src/layouts/dashboard/config.js b/frontend/src/layouts/dashboard/config.js index 3882d65..5b83f03 100644 --- a/frontend/src/layouts/dashboard/config.js +++ b/frontend/src/layouts/dashboard/config.js @@ -14,6 +14,8 @@ import UserIcon from '@heroicons/react/24/solid/UserIcon'; import BuildingOffice2Icon from '@heroicons/react/24/solid/BuildingOffice2Icon'; import BookOpenIcon from '@heroicons/react/24/solid/BookOpenIcon'; import CommandLineIcon from '@heroicons/react/24/solid/CommandLineIcon'; +import DocumentMagnifyingGlassIcon from '@heroicons/react/24/solid/DocumentMagnifyingGlassIcon'; +import MapIcon from '@heroicons/react/24/solid/MapIcon'; export const items = [ { @@ -34,44 +36,6 @@ export const items = [ ) }, - { - title: 'Mass Actions', - icon: ( - - - - ), - disabled: true, - children: [ - { - title: 'Firmware Update', - icon: ( - - - - ), - disabled: true - }, - { - title: 'Message', - disabled: true, - icon: ( - - - - ) - }, - ] - }, - { - title: 'Scripts', - disabled: true, - icon: ( - - - - ) - }, { title: 'Credentials', path: '/credentials', @@ -82,49 +46,11 @@ export const items = [ ) }, { - title: 'Access Control', - disabled: true, + title: 'Users', + path: '/access-control/users', icon: ( - - - ), - children: [ - { - title: 'Tenants', - disabled: true, - icon: ( - - - - ) - }, - { - title: 'Roles', - disabled: true, - icon: ( - - - - ) - }, - { - title: 'Users', - path: '/access-control/users', - icon: ( - - - - ) - }, - ] - }, - { - title: 'File Server', - disabled: true, - icon: ( - - + ) }, @@ -146,7 +72,101 @@ export const items = [ ), external: true, - }, + } +// { +// title: 'Mass Actions', +// icon: ( +// +// +// +// ), +// disabled: true, +// children: [ +// { +// title: 'Firmware Update', +// icon: ( +// +// +// +// ), +// disabled: true +// }, +// { +// title: 'Message', +// disabled: true, +// icon: ( +// +// +// +// ) +// }, +// ] +// }, +// { +// title: 'Scripts', +// disabled: true, +// icon: ( +// +// +// +// ) +// }, +// { +// title: "Map", +// icon: ( +// +// +// +// ), +// disabled: true, +// }, +// { +// title: 'Access Control', +// disabled: true, +// icon: ( +// +// +// +// ), +// children: [ +// { +// title: 'Tenants', +// disabled: true, +// icon: ( +// +// +// +// ) +// }, +// { +// title: 'Roles', +// disabled: true, +// icon: ( +// +// +// +// ) +// }, +// ] +// }, +// { +// title: 'File Server', +// disabled: true, +// icon: ( +// +// +// +// ) +// }, +// { +// title: "Audit Trail", +// disabled: true, +// icon: ( +// +// +// +// ), +// } ]; /* diff --git a/frontend/src/layouts/dashboard/side-nav-item.js b/frontend/src/layouts/dashboard/side-nav-item.js index 015f479..af662c0 100644 --- a/frontend/src/layouts/dashboard/side-nav-item.js +++ b/frontend/src/layouts/dashboard/side-nav-item.js @@ -60,6 +60,8 @@ export const SideNavItem = (props) => { ...(active && { backgroundColor: 'rgba(255, 255, 255, 0.04)' }), + width: "100%", + minHeight: "48px", '&:hover': { backgroundColor: 'rgba(255, 255, 255, 0.04)' } diff --git a/frontend/src/layouts/dashboard/top-nav.js b/frontend/src/layouts/dashboard/top-nav.js index 0b6e4fe..c2be666 100644 --- a/frontend/src/layouts/dashboard/top-nav.js +++ b/frontend/src/layouts/dashboard/top-nav.js @@ -28,7 +28,7 @@ import { AccountPopover } from './account-popover'; import { useAuth } from 'src/hooks/use-auth'; import { WsContext } from 'src/contexts/socketio-context'; import { useContext, useEffect } from 'react'; -import CurrencyDollarIcon from '@heroicons/react/24/outline/CurrencyDollarIcon'; +import TrophyIcon from '@heroicons/react/24/outline/TrophyIcon'; const SIDE_NAV_WIDTH = 280; const TOP_NAV_HEIGHT = 64; @@ -104,7 +104,7 @@ export const TopNav = (props) => { - + diff --git a/frontend/src/pages/devices/cwmp/[...id].js b/frontend/src/pages/devices/cwmp/[...id].js index e0bd369..c93adcd 100644 --- a/frontend/src/pages/devices/cwmp/[...id].js +++ b/frontend/src/pages/devices/cwmp/[...id].js @@ -75,7 +75,7 @@ const Page = () => { justifyContent:'center', }}> - + {/* } iconPosition={"end"} @@ -138,7 +138,7 @@ const Page = () => { iconPosition={"end"} label="Location" style={{opacity:"0.5", cursor:"default"}} - value={"location"} /> + value={"location"} /> */} {router.push(`/devices/cwmp/${deviceID}/msg`)}} diff --git a/frontend/src/pages/devices/usp/[...id].js b/frontend/src/pages/devices/usp/[...id].js index 6769a1f..d5fb616 100644 --- a/frontend/src/pages/devices/usp/[...id].js +++ b/frontend/src/pages/devices/usp/[...id].js @@ -77,7 +77,7 @@ const Page = () => { justifyContent:'center' }}> - + {/* } iconPosition={"end"} @@ -144,7 +144,7 @@ const Page = () => { iconPosition={"end"} label="Actions" style={{cursor:"default", opacity: 0.5}} - value={"actions"} /> + value={"actions"} /> */} {router.push(`/devices/usp/${deviceID}/discovery`)}}