u
This commit is contained in:
@@ -5,12 +5,14 @@ import { ThemeProvider, createTheme } from '@mui/material/styles';
|
||||
import SettingsIcon from '@mui/icons-material/Settings';
|
||||
import ShowChartIcon from '@mui/icons-material/ShowChart';
|
||||
import DashboardIcon from '@mui/icons-material/Dashboard';
|
||||
import RuleIcon from '@mui/icons-material/Rule';
|
||||
|
||||
import Settings from './components/Settings';
|
||||
import Chart from './components/Chart';
|
||||
import Login from './components/Login';
|
||||
import ViewManager from './components/ViewManager';
|
||||
import ViewDisplay from './components/ViewDisplay';
|
||||
import RuleEditor from './components/RuleEditor';
|
||||
|
||||
const darkTheme = createTheme({
|
||||
palette: {
|
||||
@@ -98,6 +100,9 @@ export default class App extends Component {
|
||||
|
||||
<Button color="inherit" component={Link} to="/" startIcon={<DashboardIcon />}>Views</Button>
|
||||
<Button color="inherit" component={Link} to="/live" startIcon={<ShowChartIcon />}>Live</Button>
|
||||
{user && user.role === 'admin' && (
|
||||
<Button color="inherit" component={Link} to="/rules" startIcon={<RuleIcon />}>Rules</Button>
|
||||
)}
|
||||
<Button color="inherit" component={Link} to="/settings" startIcon={<SettingsIcon />}>Settings</Button>
|
||||
|
||||
{user ? (
|
||||
@@ -111,6 +116,7 @@ export default class App extends Component {
|
||||
<Routes>
|
||||
<Route path="/" element={<ViewManager user={user} />} />
|
||||
<Route path="/views/:id" element={<ViewDisplay />} />
|
||||
<Route path="/rules" element={<RuleEditor user={user} />} />
|
||||
<Route path="/live" element={
|
||||
<Chart
|
||||
selectedChannels={selectedChannels}
|
||||
|
||||
Reference in New Issue
Block a user