mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 06:28:54 +00:00
refactor(nui): Layout improvements
This commit is contained in:
1 parent
ed03361f61
commit
2c15418011
5 files changed
+35
-12
No files matched your search
@@ -4,8 +4,8 @@ import { Box, Center } from '@chakra-ui/react';
|
||||
const MainContent: React.FC = ({ children }) => {
|
||||
return (
|
||||
<>
|
||||
<Center h="95%">
|
||||
<Box h="100%" w="95%" backgroundColor="#1B2129">
|
||||
<Center h="95%" alignItems="stretch">
|
||||
<Box h="100%" w="50%" backgroundColor="#1B2129" flex="1">
|
||||
{children}
|
||||
</Box>
|
||||
</Center>
|
||||
|
||||
@@ -29,11 +29,13 @@ const LeftBar: React.FC = () => {
|
||||
});
|
||||
|
||||
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">
|
||||
{initData.resources.map((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>
|
||||
))}
|
||||
</VStack>
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
import React from 'react';
|
||||
import { Box, VStack } from '@chakra-ui/react';
|
||||
import { Box, VStack, Center } from '@chakra-ui/react';
|
||||
|
||||
const RightBar: React.FC = () => {
|
||||
return (
|
||||
<Box float="right" w="20%" h="max">
|
||||
<VStack align="left">
|
||||
<Box>Number of slow queries: 3</Box>
|
||||
<Box>Most active resource: essentialmode</Box>
|
||||
<Box>Total number of queries: 732</Box>
|
||||
</VStack>
|
||||
<Box float="right" w="20%" h="max" p="1.2vh">
|
||||
<Center>
|
||||
<VStack align="left">
|
||||
<Box>Number of slow queries: 3</Box>
|
||||
<Box>Most active resource: essentialmode</Box>
|
||||
<Box>Total number of queries: 732</Box>
|
||||
</VStack>
|
||||
</Center>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -72,7 +72,12 @@ const Resource: React.FC = () => {
|
||||
{headerGroups.map((header): any => (
|
||||
<Tr {...header.getHeaderGroupProps()}>
|
||||
{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')}
|
||||
<chakra.span pl="4">
|
||||
{column.isSorted ? (
|
||||
@@ -100,6 +105,7 @@ const Resource: React.FC = () => {
|
||||
wordBreak="break-word"
|
||||
textOverflow="ellipsis"
|
||||
overflow="hidden"
|
||||
borderBottomColor="#313C4A"
|
||||
>
|
||||
{cell.render('Cell')}
|
||||
</Td>
|
||||
|
||||
@@ -17,3 +17,16 @@ body {
|
||||
code {
|
||||
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