Skip to content

Commit

Permalink
Fix z-index issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed May 21, 2024
1 parent 8ec1474 commit 96d1a25
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 16 deletions.
2 changes: 1 addition & 1 deletion backend/src/assets/css/agency.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ div.agency {

.agency div.col-2 {
display: flex;
justify-content: center;
flex-direction: column;
}
}

Expand Down
8 changes: 6 additions & 2 deletions backend/src/assets/css/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
z-index: 101;
}

.menu {
z-index: 1401 !important;
}

.header-action {
margin-right: 20px;
}
Expand All @@ -21,7 +25,7 @@

/* Device width is less than or equal to 960px */

@media only screen and (width <= 960px) {
@media only screen and (width <=960px) {
.header {
min-height: 56px;
}
Expand All @@ -33,7 +37,7 @@

/* Device width is greater than or equal to 960px */

@media only screen and (width >= 960px) {
@media only screen and (width >=960px) {
.header {
min-height: 64px;
}
Expand Down
1 change: 0 additions & 1 deletion backend/src/assets/css/location-list.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
section.location-list {
margin: 0 10px;
max-width: 500px;
display: flex;
flex-direction: column;
align-items: center;
Expand Down
1 change: 0 additions & 1 deletion backend/src/assets/css/locations.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ div.locations .info-box {
div.locations div.col-2 {
display: flex;
flex-direction: column;
justify-content: center;
margin-top: 3px;
padding: 1px;
}
Expand Down
4 changes: 3 additions & 1 deletion backend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ const Header = ({
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
open={isMenuOpen}
onClose={handleMenuClose}
className="menu"
>
<MenuItem onClick={handleSettingsClick}>
<SettingsIcon className="header-action" />
Expand All @@ -232,6 +233,7 @@ const Header = ({
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
open={isMobileMenuOpen}
onClose={handleMobileMenuClose}
className="menu"
>
<MenuItem onClick={handleSettingsClick}>
<SettingsIcon className="header-action" />
Expand Down Expand Up @@ -279,7 +281,7 @@ const Header = ({
</IconButton>
)}
<>
<Drawer open={isSideMenuOpen} onClose={handleSideMenuClose}>
<Drawer open={isSideMenuOpen} onClose={handleSideMenuClose} className="menu">
<List sx={classes.list}>
<ListItemLink href="/">
<ListItemIcon><DashboardIcon /></ListItemIcon>
Expand Down
14 changes: 7 additions & 7 deletions backend/src/components/SimpleBackdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ interface SimpleBackdropProps {
}

const SimpleBackdrop = ({ progress, text }: SimpleBackdropProps) => (
<div>
<Backdrop open sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}>
{progress && <CircularProgress color="inherit" sx={{ marginRight: 5 }} />}
<Typography color="inherit">{text}</Typography>
</Backdrop>
</div>
)
<div>
<Backdrop open sx={{ color: '#fff', zIndex: 1402 }}>
{progress && <CircularProgress color="inherit" sx={{ marginRight: 5 }} />}
<Typography color="inherit">{text}</Typography>
</Backdrop>
</div>
)

export default SimpleBackdrop
4 changes: 4 additions & 0 deletions frontend/src/assets/css/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
z-index: 101;
}

.menu {
z-index: 1401 !important;
}

.header-action {
margin-right: 20px;
}
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ const Header = ({
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
open={isMenuOpen}
onClose={handleMenuClose}
className="menu"
>
<MenuItem onClick={handleSettingsClick}>
<SettingsIcon className="header-action" />
Expand All @@ -231,6 +232,7 @@ const Header = ({
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
open={isMobileMenuOpen}
onClose={handleMobileMenuClose}
className="menu"
>
<MenuItem onClick={handleSettingsClick}>
<SettingsIcon className="header-action" />
Expand Down Expand Up @@ -283,7 +285,7 @@ const Header = ({
</IconButton>
)}
<>
<Drawer open={isSideMenuOpen} onClose={handleSideMenuClose}>
<Drawer open={isSideMenuOpen} onClose={handleSideMenuClose} className="menu">
<List sx={classes.list}>
<ListItemLink href="/">
<ListItemIcon><HomeIcon /></ListItemIcon>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/SimpleBackdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ interface SimpleBackdropProps {

const SimpleBackdrop = ({ progress, text }: SimpleBackdropProps) => (
<div>
<Backdrop open sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}>
<Backdrop open sx={{ color: '#fff', zIndex: 1402 }}>
{progress && <CircularProgress color="inherit" sx={{ marginRight: 5 }} />}
<Typography color="inherit">{text}</Typography>
</Backdrop>
</div>
)
)

export default SimpleBackdrop

0 comments on commit 96d1a25

Please sign in to comment.