Fixed setting wrong switching in menu list
All checks were successful
Testing Example / build-and-test (push) Successful in 2m21s

Added bump for database settings
This commit is contained in:
SnippetsX 2024-11-24 01:13:20 +03:00
parent 9ebd7786ad
commit 4cd1ad4530
6 changed files with 49 additions and 11 deletions

View File

@ -27,7 +27,7 @@ function App() {
<Route path="/dashboard" element={<Dashboard/>} />
<Route path="/dashboard/users" element={<DashboardUsers />} />
{/* <Route path="/dashboard/configuration" element={<Settings />} />
<Route path="/dashboard/reports" element={<Reports />} /> */}
<Route path="/dashboard/reports" element={<Reports />} /> */}
<Route path="/dashboard/console" element={<Terminal/>} />
<Route path="/settings" element={<SettingsMain/>} />
<Route path="/settings/info" element={<SettingsInfo/>} />

View File

View File

@ -0,0 +1,28 @@
import React from "react";
import { ThemeProvider, Box, Typography } from "@mui/material";
import { theme } from "../theme";
const SettingsDatabaseConfig = () => {
return (
<ThemeProvider theme={theme}>
<Box sx={{ display: 'flex' }}>
<CssBaseline />
<AppBarFull />
<SidebarSettings />
<Box
component="main"
sx={{ flexGrow: 1, bgcolor: 'background.default', p: 3 }}
>
<Toolbar />
<Typography variant="h5" sx={{ mb: 3, color: 'primary.main' }}>
Database Configuration
</Typography>
</Box>
</Box>
</ThemeProvider>
);
};
export default SettingsDatabaseConfig;

View File

@ -65,3 +65,9 @@ export function getDeveloperMode() {
throw error;
});
}
export function getDatabaseConfig() {
return getConfig().then(config => config.database);
}

View File

@ -1 +1 @@
{"buildMajor":1,"buildMinor":0,"buildRevision":18,"buildTag":"DEV"}
{"buildMajor":1,"buildMinor":0,"buildRevision":19,"buildTag":"DEV"}

View File

@ -31,24 +31,28 @@ export const SidebarSettings = () => {
>
<Divider />
<List>
<ListItem button key="Database Configuration" selected={window.location.pathname === '/settings'}>
<ListItem button key="Main Settings" onClick={() => window.location.href = '/settings'}>
<DashboardIcon sx={{ marginRight: 2, color: '#FFFFFF'}}/>
<ListItemText primary="Main Settings" sx={{ color: '#FFFFFF' }} />
</ListItem>
<ListItem button key="Database Configuration" onClick={() => window.location.href = '/settings/database'}>
<DashboardIcon sx={{ marginRight: 2, color: '#FFFFFF'}}/>
<ListItemText primary="Database Configuration" sx={{ color: '#FFFFFF' }} />
</ListItem>
<ListItem button key="Access lists" selected={window.location.pathname === '/settings/access'}>
<ListItem button key="Access lists" onClick={() => window.location.href = '/settings/access'}>
<PeopleIcon sx={{ marginRight: 2, color: '#FFFFFF' }}/>
<ListItemText primary="Access lists" sx={{ color: '#FFFFFF' }} />
</ListItem>
<ListItem button key="Update" selected={window.location.pathname === '/settings/update'}>
<ListItem button key="Update" onClick={() => window.location.href = '/settings/update'}>
<UpdateIcon sx={{ marginRight: 2, color: '#FFFFFF' }}/>
<ListItemText primary="Update" sx={{ color: '#FFFFFF' }} />
</ListItem>
<ListItem button key="Info" selected={window.location.pathname === '/settings/info'}>
<ListItem button key="Info" onClick={() => window.location.href = '/settings/info'}>
<InfoIcon sx={{ marginRight: 2, color: '#FFFFFF' }}/>
<ListItemText primary="Info" sx={{ color: '#FFFFFF' }} onClick={() => { window.location.href = '/settings/info'; }}/>
<ListItemText primary="Info" sx={{ color: '#FFFFFF' }} />
</ListItem>
{getDeveloperMode() && (
<ListItem button key="Debug" selected={window.location.pathname === '/settings/debug'}>
<ListItem button key="Debug" onClick={() => window.location.href = '/settings/debug'}>
<BarChartIcon sx={{ marginRight: 2, color: '#FFFFFF' }}/>
<ListItemText primary="Debug" sx={{ color: '#FFFFFF' }} />
</ListItem>
@ -82,15 +86,15 @@ export const SidebarMain = () => {
<DashboardIcon sx={{ marginRight: 2, color: '#FFFFFF'}}/>
<ListItemText primary="Dashboard" sx={{ color: '#FFFFFF' }} />
</ListItem>
<ListItem button key="Users">
<ListItem button key="Users" onClick={() => window.location.href = '/dashboard/users'}>
<PeopleIcon sx={{ marginRight: 2, color: '#FFFFFF' }}/>
<ListItemText primary="Users" sx={{ color: '#FFFFFF' }} />
</ListItem>
<ListItem button key="Reports">
<ListItem button key="Reports" onClick={() => window.location.href = '/dashboard/reports'}>
<BarChartIcon sx={{ marginRight: 2, color: '#FFFFFF' }}/>
<ListItemText primary="Reports" sx={{ color: '#FFFFFF' }} />
</ListItem>
<ListItem button key="Server Configuration">
<ListItem button key="Server Configuration" onClick={() => window.location.href = '/dashboard/configuration'}>
<ConstructionOutlinedIcon sx={{ marginRight: 2, color: '#FFFFFF' }}/>
<ListItemText primary="Server Configuration" sx={{ color: '#FFFFFF' }} />
</ListItem>