-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from Smithsonian/feature/repository-ui
Store migration, performance improvements and fixes, treeview issues
- Loading branch information
Showing
70 changed files
with
3,229 additions
and
3,591 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from 'react'; | ||
import { Box, Typography } from '@material-ui/core'; | ||
import { makeStyles } from '@material-ui/core/styles'; | ||
import { eSystemObjectType } from '../../types/server'; | ||
import { getTermForSystemObjectType } from '../../utils/repository'; | ||
|
||
const useStyles = makeStyles(({ typography, breakpoints }) => ({ | ||
container: { | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
height: 20, | ||
width: 20, | ||
borderRadius: 2.5, | ||
backgroundColor: ({ backgroundColor }: RepositoryIconProps) => backgroundColor, | ||
[breakpoints.down('lg')]: { | ||
height: 15, | ||
width: 15, | ||
}, | ||
}, | ||
initial: { | ||
fontSize: 10, | ||
fontWeight: typography.fontWeightBold, | ||
color: ({ textColor }: RepositoryIconProps) => textColor, | ||
} | ||
})); | ||
|
||
interface RepositoryIconProps { | ||
objectType: eSystemObjectType; | ||
backgroundColor: string; | ||
textColor: string; | ||
} | ||
|
||
function RepositoryIcon(props: RepositoryIconProps): React.ReactElement { | ||
const { objectType } = props; | ||
const classes = useStyles(props); | ||
const initial = getTermForSystemObjectType(objectType).toUpperCase().slice(0, 1); | ||
|
||
return ( | ||
<Box className={classes.container}> | ||
<Typography className={classes.initial}>{initial}</Typography> | ||
</Box> | ||
); | ||
} | ||
|
||
export default RepositoryIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
import { CircularProgress, CircularProgressProps } from '@material-ui/core'; | ||
import { makeStyles } from '@material-ui/core/styles'; | ||
|
||
const useStyles = makeStyles(() => ({ | ||
container: { | ||
animationDuration: '750ms' | ||
} | ||
})); | ||
|
||
function Progress({ className, ...props }: CircularProgressProps): React.ReactElement { | ||
const classes = useStyles(); | ||
|
||
return ( | ||
<CircularProgress className={`${classes.container} ${className}`} color='primary' thickness={2} {...props} /> | ||
); | ||
} | ||
|
||
export default Progress; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.