mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-03 22:20:56 +00:00
feat(nui): Content container, right nav bar
This commit is contained in:
1 parent
e3b145bcbd
commit
6493762795
5 files changed
+51
-23
No files matched your search
@@ -1,9 +1,10 @@
|
|||||||
import { Center, Box } from '@chakra-ui/react';
|
import { Center, Box } from '@chakra-ui/react';
|
||||||
import { debugData } from '../utils/debugData';
|
import { debugData } from '../utils/debugData';
|
||||||
import TopBar from './NavBars/TopBar';
|
import TopBar from './NavBars/TopBar';
|
||||||
import SideBar from './NavBars/SideBar';
|
import SideBar from './NavBars/LeftBar';
|
||||||
import { Routes, Route } from 'react-router-dom';
|
import { Routes, Route } from 'react-router-dom';
|
||||||
import Resource from './Resource';
|
import Resource from './Resource';
|
||||||
|
import RightBar from './NavBars/RightBar';
|
||||||
|
|
||||||
debugData([
|
debugData([
|
||||||
{
|
{
|
||||||
@@ -18,6 +19,10 @@ const App: React.FC = () => {
|
|||||||
<Box width="60%" height="60%" backgroundColor="#191E26" borderRadius="1vh" color="white" fontFamily="Poppins">
|
<Box width="60%" height="60%" backgroundColor="#191E26" borderRadius="1vh" color="white" fontFamily="Poppins">
|
||||||
<TopBar />
|
<TopBar />
|
||||||
<SideBar />
|
<SideBar />
|
||||||
|
<RightBar />
|
||||||
|
<Routes>
|
||||||
|
<Route path="/:resource" element={<Resource />} />
|
||||||
|
</Routes>
|
||||||
</Box>
|
</Box>
|
||||||
</Center>
|
</Center>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { Box, VStack } from '@chakra-ui/react';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
|
const SideBar: React.FC = () => {
|
||||||
|
return (
|
||||||
|
<Box p="1.2vh" fontSize="1.5vh" float="left">
|
||||||
|
<VStack align="left">
|
||||||
|
<Link to="es_extended">es_extended</Link>
|
||||||
|
<Link to="ox_inventory">ox_inventory</Link>
|
||||||
|
<Link to="luke_garages">luke_garages</Link>
|
||||||
|
</VStack>
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SideBar;
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Box, VStack } 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>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default RightBar;
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
import { Box, VStack } from '@chakra-ui/react';
|
|
||||||
|
|
||||||
const SideBar: React.FC = () => {
|
|
||||||
return (
|
|
||||||
<Box p="1.2vh" fontSize="1.5vh" position="fixed">
|
|
||||||
<VStack align="left">
|
|
||||||
<Box>es_extended</Box>
|
|
||||||
<Box>ox_inventory</Box>
|
|
||||||
<Box>luke_garages</Box>
|
|
||||||
</VStack>
|
|
||||||
</Box>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default SideBar;
|
|
||||||
@@ -1,10 +1,16 @@
|
|||||||
import { useParams } from "react-router-dom";
|
import { useParams } from 'react-router-dom';
|
||||||
|
import { Box, Center } from '@chakra-ui/react';
|
||||||
|
|
||||||
const Resource = () => {
|
const Resource: React.FC = () => {
|
||||||
|
let { resource } = useParams();
|
||||||
|
|
||||||
const { resource } = useParams();
|
return (
|
||||||
|
<Center h="95%">
|
||||||
|
<Box h="100%" w="95%" backgroundColor="#1B2129">
|
||||||
|
<h2>{resource}</h2>
|
||||||
|
</Box>
|
||||||
|
</Center>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
return <h1>{resource}</h1>;
|
export default Resource;
|
||||||
}
|
|
||||||
|
|
||||||
export default Resource;
|
|
||||||
Reference in new issue
Block a user