mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-04 14:38:50 +00:00
refactor(nui): Layout improvements
This commit is contained in:
1 parent
ed03361f61
commit
2c15418011
5 files changed
+30
-7
No files matched your search
@@ -4,8 +4,8 @@ import { Box, Center } from '@chakra-ui/react';
|
|||||||
const MainContent: React.FC = ({ children }) => {
|
const MainContent: React.FC = ({ children }) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Center h="95%">
|
<Center h="95%" alignItems="stretch">
|
||||||
<Box h="100%" w="95%" backgroundColor="#1B2129">
|
<Box h="100%" w="50%" backgroundColor="#1B2129" flex="1">
|
||||||
{children}
|
{children}
|
||||||
</Box>
|
</Box>
|
||||||
</Center>
|
</Center>
|
||||||
|
|||||||
@@ -29,11 +29,13 @@ const LeftBar: React.FC = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box p="1.2vh" fontSize="1.5vh" float="left" maxWidth="13vh">
|
<Box p="1.2vh" fontSize="1.5vh" float="left" w="10%" height="55vh" overflowY="scroll">
|
||||||
<VStack align="left">
|
<VStack align="left">
|
||||||
{initData.resources.map((resource, index) => (
|
{initData.resources.map((resource, index) => (
|
||||||
<Link to={resource} key={`${resource}-${index}`}>
|
<Link to={resource} key={`${resource}-${index}`}>
|
||||||
<Box _hover={{ transform: 'scale(1.1)' }}>{resource}</Box>
|
<Box _hover={{ transform: 'scale(1.1)', color: 'white' }} color="grey">
|
||||||
|
{resource}
|
||||||
|
</Box>
|
||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
</VStack>
|
</VStack>
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Box, VStack } from '@chakra-ui/react';
|
import { Box, VStack, Center } from '@chakra-ui/react';
|
||||||
|
|
||||||
const RightBar: React.FC = () => {
|
const RightBar: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<Box float="right" w="20%" h="max">
|
<Box float="right" w="20%" h="max" p="1.2vh">
|
||||||
|
<Center>
|
||||||
<VStack align="left">
|
<VStack align="left">
|
||||||
<Box>Number of slow queries: 3</Box>
|
<Box>Number of slow queries: 3</Box>
|
||||||
<Box>Most active resource: essentialmode</Box>
|
<Box>Most active resource: essentialmode</Box>
|
||||||
<Box>Total number of queries: 732</Box>
|
<Box>Total number of queries: 732</Box>
|
||||||
</VStack>
|
</VStack>
|
||||||
|
</Center>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -72,7 +72,12 @@ const Resource: React.FC = () => {
|
|||||||
{headerGroups.map((header): any => (
|
{headerGroups.map((header): any => (
|
||||||
<Tr {...header.getHeaderGroupProps()}>
|
<Tr {...header.getHeaderGroupProps()}>
|
||||||
{header.headers.map((column) => (
|
{header.headers.map((column) => (
|
||||||
<Th {...column.getHeaderProps(column.getSortByToggleProps())} color="white" fontFamily="Poppins">
|
<Th
|
||||||
|
{...column.getHeaderProps(column.getSortByToggleProps())}
|
||||||
|
color="white"
|
||||||
|
fontFamily="Poppins"
|
||||||
|
borderBottomColor="#313C4A"
|
||||||
|
>
|
||||||
{column.render('Header')}
|
{column.render('Header')}
|
||||||
<chakra.span pl="4">
|
<chakra.span pl="4">
|
||||||
{column.isSorted ? (
|
{column.isSorted ? (
|
||||||
@@ -100,6 +105,7 @@ const Resource: React.FC = () => {
|
|||||||
wordBreak="break-word"
|
wordBreak="break-word"
|
||||||
textOverflow="ellipsis"
|
textOverflow="ellipsis"
|
||||||
overflow="hidden"
|
overflow="hidden"
|
||||||
|
borderBottomColor="#313C4A"
|
||||||
>
|
>
|
||||||
{cell.render('Cell')}
|
{cell.render('Cell')}
|
||||||
</Td>
|
</Td>
|
||||||
|
|||||||
@@ -17,3 +17,16 @@ body {
|
|||||||
code {
|
code {
|
||||||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
|
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 2px;
|
||||||
|
border-radius: 1vh;
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: grey;
|
||||||
|
border-radius: 1vh;
|
||||||
|
}
|
||||||
Reference in new issue
Block a user