Revize 0d90d67b
Přidáno uživatelem Václav Honzík před asi 2 roky(ů)
frontend/src/features/Navigation/Navigation.tsx | ||
---|---|---|
5 | 5 |
import CssBaseline from '@mui/material/CssBaseline' |
6 | 6 |
import MuiAppBar, { AppBarProps as MuiAppBarProps } from '@mui/material/AppBar' |
7 | 7 |
import Toolbar from '@mui/material/Toolbar' |
8 |
import List from '@mui/material/List' |
|
9 | 8 |
import Typography from '@mui/material/Typography' |
10 |
import Divider from '@mui/material/Divider' |
|
11 | 9 |
import IconButton from '@mui/material/IconButton' |
12 | 10 |
import MenuIcon from '@mui/icons-material/Menu' |
13 |
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft' |
|
14 |
import ChevronRightIcon from '@mui/icons-material/ChevronRight' |
|
15 |
import ListItem from '@mui/material/ListItem' |
|
16 |
import ListItemIcon from '@mui/material/ListItemIcon' |
|
17 |
import ListItemText from '@mui/material/ListItemText' |
|
18 |
import InboxIcon from '@mui/icons-material/MoveToInbox' |
|
19 |
import MailIcon from '@mui/icons-material/Mail' |
|
20 | 11 |
import { Fragment, FunctionComponent } from 'react' |
21 | 12 |
import NavigationMenu from './NavigationMenu' |
22 |
import { Paper } from '@mui/material' |
|
13 |
import { Paper, Stack } from '@mui/material' |
|
14 |
import { useDispatch, useSelector } from 'react-redux' |
|
15 |
import { toggleTheme } from '../Theme/themeSlice' |
|
16 |
import { RootState } from '../redux/store' |
|
17 |
|
|
18 |
import DarkModeIcon from '@mui/icons-material/DarkMode' |
|
19 |
import LightModeIcon from '@mui/icons-material/LightMode' |
|
23 | 20 |
|
24 | 21 |
const drawerWidth = 240 |
25 | 22 |
|
... | ... | |
83 | 80 |
setOpen(true) |
84 | 81 |
} |
85 | 82 |
|
83 |
const colorThemeMode = useSelector( |
|
84 |
(state: RootState) => state.theme.paletteMode |
|
85 |
) |
|
86 |
|
|
87 |
const dispatch = useDispatch() |
|
88 |
|
|
89 |
const onToggleTheme = () => { |
|
90 |
dispatch(toggleTheme()) |
|
91 |
} |
|
92 |
|
|
86 | 93 |
return ( |
87 | 94 |
<Fragment> |
88 | 95 |
<Paper style={{ minHeight: '100vh', borderRadius: 0 }}> |
... | ... | |
99 | 106 |
> |
100 | 107 |
<MenuIcon /> |
101 | 108 |
</IconButton> |
102 |
<Typography variant="h6" noWrap component="div"> |
|
103 |
Assyrian Toponyms App Prototype |
|
104 |
</Typography> |
|
109 |
{/* <Box> */} |
|
110 |
<Typography variant="h6" noWrap component="div"> |
|
111 |
Assyrian Toponyms App Prototype |
|
112 |
</Typography> |
|
113 |
<Stack sx={{ml: 'auto'}} alignItems="flex-end"> |
|
114 |
{colorThemeMode === 'dark' ? ( |
|
115 |
<IconButton onClick={onToggleTheme}> |
|
116 |
<LightModeIcon /> |
|
117 |
</IconButton> |
|
118 |
) : ( |
|
119 |
<IconButton onClick={onToggleTheme}> |
|
120 |
<DarkModeIcon /> |
|
121 |
</IconButton> |
|
122 |
)} |
|
123 |
</Stack> |
|
124 |
{/* </Box> */} |
|
105 | 125 |
</Toolbar> |
106 | 126 |
</AppBar> |
107 | 127 |
<NavigationMenu |
Také k dispozici: Unified diff
map dialogs + catalog filter fix
re #9547 #9545