Files
ota-admin-portal/src/components/useStyles.jsx
John Wu 86eeaab869 Development (#94)
* CEC-371 Car ECU display (#79)

* Merge Development (#53)

* Use responsive iframe control for charts (#49)

* Use responsive iframe control to charts

* Move external Grafana link to Dashboard page

* Remove unused embedded style class

* Add button label

* added delete button to deploy packages

* Fix unit test warning
Remove unused route from test

* Fix styling of button

* minor fixes per pr review

Co-authored-by: jcw-fisker <jwatson@fiskerinc.com>
Co-authored-by: John Cotten Watson <83605808+jcw-fisker@users.noreply.github.com>

* Development Merge (#57)

* CEC-287 Car connection status (#59) (#60)

* Car connection status

* Formatting

* Merge Development (#64)

* Add connection status to vehicles page

* ConnectedIcon control

* Handle Style

* Development (#67)

* preliminary map for vehicles

* weird zoom bug

* passing react tests

* fixing warnings and updating snapshots

* update node environment to 14

* addressing comments by changing variable types and adding styles to home page title

* adding CODEOWNERS file

* fixing token error

* CEC-371 Update car ECUs display (#78)

* Clean up className styles
Update car status page to show update and ECUs

* Add update ecu version button
Show all ECUs on car status page
Only show car ecus for search

Co-authored-by: jcw-fisker <jwatson@fiskerinc.com>
Co-authored-by: John Cotten Watson <83605808+jcw-fisker@users.noreply.github.com>
Co-authored-by: Drew Taylor <69828061+drew-fisker@users.noreply.github.com>

* CEC-394 Car update log (#81)

* CEC-394 Car update status control

* Remove Datadog RUM
Remove package update components
Move control components into Controls folder
Add Car update status page

* Display update status log
Clean up unused update package code

* Remove console.logs

* no vars

* adding timestamp to vehicle popup

* modifying vehicle data query

* removing extraneous code

* removing console log

* Clean up SonarCloud warnings (#83)

* Clean up SonarCloud warnings

* Bogus security warning

* Fix another warning

* Fix unauthorized locations request

* Fix update progress control

* CEC-563 New manifest format (#88)

* Add ManifestCreateContext
Update create manifest page

* Finish UI changes and API integration

* Fixes

* Fix test

* Remove manifest ECU file version and type

* Fixes

* Add manifest ecu file type control

* Fix Sonar warnings

* Fix test

* Update codeowners

* Formatting

* CEC-553 Change file type to string (#90)

* CEC-553 File type uses string enum

* Fix test timeout

* Fix

* Merge development

* Increase timeout

* Clean up (#95)

* Clean up
Mock missing methods

* Smell

Co-authored-by: jcw-fisker <jwatson@fiskerinc.com>
Co-authored-by: John Cotten Watson <83605808+jcw-fisker@users.noreply.github.com>
Co-authored-by: Drew Taylor <69828061+drew-fisker@users.noreply.github.com>
Co-authored-by: Drew Taylor <dtaylor@fiskerinc.com>
2021-10-14 12:23:16 -07:00

283 lines
5.9 KiB
JavaScript

import { makeStyles } from "@material-ui/core/styles";
const MENUITEM_HEIGHT = 48;
const MENUITEM_PADDING_TOP = 8;
const DRAWER_WIDTH = 240;
const useStyles = makeStyles((theme) => ({
modal: {
display: "flex",
alignItems: "center",
justifyContent: "center",
},
modaldialog: {
backgroundColor: theme.palette.background.paper,
border: "2px solid #000",
boxShadow: theme.shadows[5],
padding: theme.spacing(2, 4, 3),
},
paper: {
marginTop: theme.spacing(1),
display: "flex",
flexDirection: "column",
alignItems: "center",
},
avatar: {
margin: theme.spacing(1),
backgroundColor: theme.palette.primary.main,
},
form: {
width: "100%", // Fix IE 11 issue.
marginTop: theme.spacing(1),
},
submit: {
margin: theme.spacing(3, 0, 2),
textAlign: "center",
},
formControl: {
margin: theme.spacing(3, 0, 2),
width: "100%",
minWidth: 120,
},
formControlInline: {
marginRight: "10px !important",
minWidth: 120,
},
labelInline: {
fontSize: "1.25em",
margin: theme.spacing(4, 1, 1),
display: "inline-flex",
boxSizing: "border-box",
verticalAlign: "bottom",
},
chips: {
display: "flex",
flexWrap: "wrap",
},
chip: {
margin: 2,
},
menuProps: {
PaperProps: {
style: {
maxHeight: MENUITEM_HEIGHT * 4.5 + MENUITEM_PADDING_TOP,
width: 250,
},
},
},
previewChip: {
minWidth: 160,
maxWidth: 210,
},
root: {
display: "flex",
},
appBar: {
transition: theme.transitions.create(["margin", "width"], {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.leavingScreen,
}),
color: "black",
backgroundColor: "white",
},
appBarShift: {
width: `calc(100% - ${DRAWER_WIDTH}px)`,
marginLeft: DRAWER_WIDTH,
transition: theme.transitions.create(["margin", "width"], {
easing: theme.transitions.easing.easeOut,
duration: theme.transitions.duration.enteringScreen,
}),
},
menuButton: {
marginRight: theme.spacing(2),
},
hide: {
display: "none",
},
drawer: {
width: DRAWER_WIDTH,
flexShrink: 0,
},
drawerPaper: {
width: DRAWER_WIDTH,
},
drawerHeader: {
display: "flex",
alignItems: "center",
padding: theme.spacing(0, 1),
// necessary for content to be below app bar
...theme.mixins.toolbar,
justifyContent: "flex-start",
},
drawerHeaderLogo: {
backgroundColor: "#3f51b5",
},
content: {
flexGrow: 1,
padding: theme.spacing(3),
transition: theme.transitions.create("margin", {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.leavingScreen,
}),
marginLeft: -DRAWER_WIDTH,
},
contentShift: {
transition: theme.transitions.create("margin", {
easing: theme.transitions.easing.easeOut,
duration: theme.transitions.duration.enteringScreen,
}),
marginLeft: 0,
},
rightToolbar: {
marginLeft: "auto",
marginRight: -12,
},
link: {
cursor: "pointer",
textDecorationColor: "Blue",
textDecorationStyle: "solid",
textDecorationLine: "underline",
color: "Blue",
},
hiddenSortSpan: {
border: 0,
clip: "rect(0 0 0 0)",
height: 1,
margin: -1,
overflow: "hidden",
padding: 0,
position: "absolute",
top: 20,
width: 1,
},
margin: {
margin: theme.spacing(1),
},
textField: {
width: "25ch",
},
tableToolbar: {
display: "flex",
textAlign: "left",
paddingLeft: theme.spacing(2),
paddingRight: theme.spacing(1),
width: "100%",
},
logo: {
height: 60,
width: 60,
margin: "auto",
},
grow: {
flexGrow: 1,
},
embeddedWrapper: {
marginTop: 10,
position: "relative",
overflow: "hidden",
width: "100%",
paddingTop: "56.25%",
},
closeButton: {
position: "absolute",
right: theme.spacing(1),
top: theme.spacing(1),
color: theme.palette.grey[500],
},
homePageTitle: {
marginBottom: 25,
},
markerTitle: {
margin: 5,
},
popUp: {
minHeight: "15vh",
},
popUpTitle: {
margin: 0,
padding: theme.spacing(2),
},
popUpContent: {
"& p": {
margin: 0,
},
paddingBottom: "2vh",
},
popupSection: {
marginBottom: "1vh",
},
toolbarFooter: {
width: "100%",
textAlign: "right",
},
breadcrumbs: {
fontSize: "8px",
},
addButton: {
fontSize: "large",
position: "relative",
top: 100,
left: 100,
},
batteryGrid: {},
batteryForm: {
alignItems: "stretch",
flexDirection: "column",
},
grafanaContainer: {
alignContent: "stretch",
alignItems: "center",
display: "flex",
flexDirection: "column",
justifyContent: "center",
padding: 15,
paddingBottom: 20,
},
datascopeContainerText: {
margin: 0,
},
datascopeContainerValue: {
margin: 0,
},
textJustifyAlign: { textAlign: "justifyContent" },
textCenterAlign: { textAlign: "center" },
textRightAlign: { textAlign: "right" },
fullWidth: { width: "100%" },
pageCenter: {
position: "absolute",
top: "50%",
left: "50%",
transform: "translate(-50%, -50%)",
},
menuExternalLink: {
textDecoration: "inherit",
color: "inherit",
"&:link": {
textDecoration: "inherit",
color: "inherit",
cursor: "auto",
},
"&:visited": {
textDecoration: "inherit",
color: "inherit",
cursor: "auto",
},
},
tableSize: { height: 700, width: "100%" },
whiteBackground: { backgroundColor: "White" },
progressIcon: { width: 40, height: 40 },
progressSuccess: { color: "green" },
progressError: { color: "red" },
hidden: { display: "none" },
clickable: { cursor: "pointer" },
fileDropArea: {
width: "100%",
height: "100%",
textAlign: "center",
color: "Black",
},
overHighlight: { background: "green" },
}));
export default useStyles;