@@ -4,13 +4,13 @@ import List from "@material-ui/core/List"
4
4
import ListItem from "@material-ui/core/ListItem"
5
5
import { makeStyles } from "@material-ui/core/styles"
6
6
import MenuIcon from "@material-ui/icons/Menu"
7
+ import { CoderIcon } from "components/Icons/CoderIcon"
7
8
import { useState } from "react"
8
9
import { NavLink , useLocation } from "react-router-dom"
9
10
import { colors } from "theme/colors"
10
11
import * as TypesGen from "../../api/typesGenerated"
11
- import { containerWidth , navHeight , sidePadding } from "../../theme/constants"
12
+ import { navHeight } from "../../theme/constants"
12
13
import { combineClasses } from "../../util/combineClasses"
13
- import { Logo } from "../Icons/Logo"
14
14
import { UserDropdown } from "../UserDropdown/UsersDropdown"
15
15
16
16
export interface NavbarViewProps {
@@ -114,11 +114,13 @@ export const NavbarView: React.FC<React.PropsWithChildren<NavbarViewProps>> = ({
114
114
>
115
115
< div className = { styles . drawer } >
116
116
< div className = { styles . drawerHeader } >
117
- { logo_url ? (
118
- < img src = { logo_url } alt = "Custom Logo" />
119
- ) : (
120
- < Logo fill = "white" opacity = { 1 } width = { 125 } />
121
- ) }
117
+ < div className = { combineClasses ( [ styles . logo , styles . drawerLogo ] ) } >
118
+ { logo_url ? (
119
+ < img src = { logo_url } alt = "Custom Logo" />
120
+ ) : (
121
+ < CoderIcon />
122
+ ) }
123
+ </ div >
122
124
</ div >
123
125
< NavItems
124
126
canViewAuditLog = { canViewAuditLog }
@@ -131,7 +133,7 @@ export const NavbarView: React.FC<React.PropsWithChildren<NavbarViewProps>> = ({
131
133
{ logo_url ? (
132
134
< img src = { logo_url } alt = "Custom Logo" />
133
135
) : (
134
- < Logo fill = "white" opacity = { 1 } width = { 125 } />
136
+ < CoderIcon fill = "white" opacity = { 1 } width = { 125 } />
135
137
) }
136
138
</ NavLink >
137
139
@@ -159,20 +161,13 @@ const useStyles = makeStyles((theme) => ({
159
161
root : {
160
162
height : navHeight ,
161
163
background : theme . palette . background . paper ,
162
- "@media (display-mode: standalone)" : {
163
- borderTop : `1px solid ${ theme . palette . divider } ` ,
164
- } ,
165
164
borderBottom : `1px solid ${ theme . palette . divider } ` ,
166
- transition : "margin 150ms ease" ,
167
165
} ,
168
166
wrapper : {
169
167
position : "relative" ,
170
168
display : "flex" ,
171
169
justifyContent : "space-between" ,
172
170
alignItems : "center" ,
173
- margin : "0 auto" ,
174
- maxWidth : containerWidth ,
175
- padding : `0 ${ sidePadding } px` ,
176
171
[ theme . breakpoints . up ( "md" ) ] : {
177
172
justifyContent : "flex-start" ,
178
173
} ,
@@ -195,6 +190,7 @@ const useStyles = makeStyles((theme) => ({
195
190
} ,
196
191
} ,
197
192
profileButton : {
193
+ paddingRight : theme . spacing ( 2 ) ,
198
194
[ theme . breakpoints . up ( "md" ) ] : {
199
195
marginLeft : "auto" ,
200
196
} ,
@@ -208,13 +204,19 @@ const useStyles = makeStyles((theme) => ({
208
204
alignItems : "center" ,
209
205
display : "flex" ,
210
206
height : navHeight ,
211
- paddingRight : theme . spacing ( 4 ) ,
207
+ color : theme . palette . text . primary ,
208
+ padding : theme . spacing ( 2 ) ,
212
209
// svg is for the Coder logo, img is for custom images
213
210
"& svg, & img" : {
214
- width : 109 ,
215
- maxHeight : `calc(${ navHeight } px)` ,
211
+ width : "100%" ,
212
+ height : "100%" ,
213
+ objectFit : "contain" ,
216
214
} ,
217
215
} ,
216
+ drawerLogo : {
217
+ padding : 0 ,
218
+ maxHeight : theme . spacing ( 5 ) ,
219
+ } ,
218
220
title : {
219
221
flex : 1 ,
220
222
textAlign : "center" ,
@@ -238,26 +240,8 @@ const useStyles = makeStyles((theme) => ({
238
240
239
241
// NavLink adds this class when the current route matches.
240
242
"&.active" : {
241
- position : "relative" ,
242
243
color : theme . palette . text . primary ,
243
244
fontWeight : "bold" ,
244
-
245
- "&::before" : {
246
- content : `" "` ,
247
- left : 0 ,
248
- width : 2 ,
249
- height : "100%" ,
250
- background : theme . palette . secondary . dark ,
251
- position : "absolute" ,
252
-
253
- [ theme . breakpoints . up ( "md" ) ] : {
254
- bottom : 0 ,
255
- left : theme . spacing ( 3 ) ,
256
- width : `calc(100% - 2 * ${ theme . spacing ( 3 ) } px)` ,
257
- right : theme . spacing ( 3 ) ,
258
- height : 2 ,
259
- } ,
260
- } ,
261
245
} ,
262
246
263
247
[ theme . breakpoints . up ( "md" ) ] : {
0 commit comments