Update Team Profile Views II

This commit is contained in:
Barry Low committed 2018-11-16 12:04:19 -08:00
1 parent 65a8436703
commit d850565870
7 files changed
+109 -53

No files matched your search

+46 -19
View File
@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@advancedalgos/web-components": {
"version": "0.0.13",
"resolved": "https://registry.npmjs.org/@advancedalgos/web-components/-/web-components-0.0.13.tgz",
"integrity": "sha512-jXz2w/r08GX8uqB4UTDaow27T3juvR7Bk/80TWmDORVPNCPK152MEUBgxF161hAyOj1jdB+K4M1Fy5GkEpDhmw==",
"version": "0.0.14",
"resolved": "https://registry.npmjs.org/@advancedalgos/web-components/-/web-components-0.0.14.tgz",
"integrity": "sha512-neaW/Gdsw9HgAXOKW+qbaoMbTymr4Rxk9t55Fp7YLUOmFIeSeyvPUN0Sn4fa4osKFdVwtWjQy2TmXMcFgAd31A==",
"requires": {
"@azure/storage-blob": "^10.1.0-preview",
"@material-ui/core": "^3.2.2",
@@ -35,9 +35,9 @@
}
},
"@types/node": {
"version": "9.6.35",
"resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.35.tgz",
"integrity": "sha512-h5zvHS8wXHGa+Gcqs9K8vqCgOtqjr0+NqG/DDJmQIX1wpR9HivAfgV8bjcD3mGM4bPfQw5Aneb2Pn8355L83jA=="
"version": "9.6.39",
"resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.39.tgz",
"integrity": "sha512-c3OkjgNpSMdHan56WhklP0FMOk5ocilKz2Mpa0NOGzu8jw5YERjCf9FG0epYB1+TxScv/oI4uJ204u2mUg7Hcw=="
},
"events": {
"version": "3.0.0",
@@ -1993,11 +1993,12 @@
}
},
"@material-ui/core": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/@material-ui/core/-/core-3.2.2.tgz",
"integrity": "sha512-wDTJyR76+OBdlltiPs3lc1gD6zR+dSA6nITtgkBeLf1NvWfNotMWdvldIDnF3bu24ySAX9imfzDfkBu4Edtqww==",
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@material-ui/core/-/core-3.5.1.tgz",
"integrity": "sha512-yMBwYV5HQ/kZjncSmzHSx4uxJCePdbq9N58Jl0tq9D1gD5fKVJY/lItnQLRlcpCzZUkGxfDhpDutvLDq58ZAkg==",
"requires": {
"@babel/runtime": "7.1.2",
"@material-ui/utils": "^3.0.0-alpha.0",
"@types/jss": "^9.5.6",
"@types/react-transition-group": "^2.0.8",
"brcast": "^3.0.1",
@@ -2006,7 +2007,7 @@
"debounce": "^1.1.0",
"deepmerge": "^2.0.1",
"dom-helpers": "^3.2.1",
"hoist-non-react-statics": "^2.5.0",
"hoist-non-react-statics": "^3.0.0",
"is-plain-object": "^2.0.4",
"jss": "^9.3.3",
"jss-camel-case": "^6.0.0",
@@ -2032,6 +2033,14 @@
"requires": {
"regenerator-runtime": "^0.12.0"
}
},
"hoist-non-react-statics": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.1.0.tgz",
"integrity": "sha512-MYcYuROh7SBM69xHGqXEwQqDux34s9tz+sCnxJmN18kgWh6JFdTw/5YdZtqsOdZJXddE/wUpCzfEdDrJj8p0Iw==",
"requires": {
"react-is": "^16.3.2"
}
}
}
},
@@ -2083,6 +2092,24 @@
}
}
},
"@material-ui/utils": {
"version": "3.0.0-alpha.0",
"resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-3.0.0-alpha.0.tgz",
"integrity": "sha512-HwC/pBcPG81UP4Jh0BaH2i4wAY9aDOrvL5+B/7J6cyFlG/Wip5Li+qI+GDlk9MR3kpG8v0sxfpWA0IlQYcHK6g==",
"requires": {
"@babel/runtime": "7.1.2"
},
"dependencies": {
"@babel/runtime": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.1.2.tgz",
"integrity": "sha512-Y3SCjmhSupzFB6wcv1KmmFucH6gDVnI30WjOcicV10ju0cZjak3Jcs67YLIXBrmZYw1xCrVeJPbycFwrqNyxpg==",
"requires": {
"regenerator-runtime": "^0.12.0"
}
}
}
},
"@sheerun/eslint-config-standard": {
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/@sheerun/eslint-config-standard/-/eslint-config-standard-10.2.1.tgz",
@@ -2219,9 +2246,9 @@
"integrity": "sha512-HtKGu+qG1NPvYe1z7ezLsyIaXYyi8SoAVqWDZgDQ8dLrsZvSzUNCwZyfX33uhWxL/SU0ZDQZ3nwZ0nimt507Kw=="
},
"@types/react": {
"version": "16.4.18",
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.4.18.tgz",
"integrity": "sha512-eFzJKEg6pdeaukVLVZ8Xb79CTl/ysX+ExmOfAAqcFlCCK5TgFDD9kWR0S18sglQ3EmM8U+80enjUqbfnUyqpdA==",
"version": "16.7.6",
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.7.6.tgz",
"integrity": "sha512-QBUfzftr/8eg/q3ZRgf/GaDP6rTYc7ZNem+g4oZM38C9vXyV8AWRWaTQuW5yCoZTsfHrN7b3DeEiUnqH9SrnpA==",
"requires": {
"@types/prop-types": "*",
"csstype": "^2.2.0"
@@ -6815,9 +6842,9 @@
}
},
"flatmap-stream": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/flatmap-stream/-/flatmap-stream-0.1.1.tgz",
"integrity": "sha512-lAq4tLbm3sidmdCN8G3ExaxH7cUCtP5mgDvrYowsx84dcYkJJ4I28N7gkxA6+YlSXzaGLJYIDEi9WGfXzMiXdw=="
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/flatmap-stream/-/flatmap-stream-0.1.2.tgz",
"integrity": "sha512-ucyr6WkLXjyMuHPtOUq4l+nSAxgWi7v4QO508eQ9resnGj+lSup26oIsUI5aH8k4Qfpjsxa8dDf9UCKkS2KHzQ=="
},
"flatten": {
"version": "1.0.2",
@@ -10920,9 +10947,9 @@
"dev": true
},
"popper.js": {
"version": "1.14.4",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.4.tgz",
"integrity": "sha1-juwdj/AqWjoVLdQ0FKFce3n9abY="
"version": "1.14.5",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.5.tgz",
"integrity": "sha512-fs4Sd8bZLgEzrk8aS7Em1qh+wcawtE87kRUJQhK6+LndyV1HerX7+LURzAylVaTyWIn5NTB/lyjnWqw/AZ6Yrw=="
},
"posix-character-classes": {
"version": "0.1.1",
+1 -1
View File
@@ -69,7 +69,7 @@
"workbox-cli": "^3.6.2"
},
"dependencies": {
"@advancedalgos/web-components": "0.0.13",
"@advancedalgos/web-components": "0.0.14",
"@azure/storage-blob": "^10.0.0-preview",
"apollo-cache-inmemory": "^1.3.5",
"apollo-client": "^2.4.2",
@@ -48,11 +48,15 @@ const styles = theme => ({
margin: '0 auto',
padding: `0 0 ${theme.spacing.unit * 2}px`
},
editContentContainer: {
marginBottom: `${theme.spacing.unit * 3}px`
},
teamMeta: {
borderRight: '1px solid #CCCCCC',
margin: `${theme.spacing.unit * 3}px 0 0`,
paddingLeft: `${theme.spacing.unit * 2}px`,
textAlign: 'center'
textAlign: 'center',
height: '100%'
},
teamContent: {
'& h2': {
@@ -171,7 +175,12 @@ export class ManageTeamEdit extends Component {
fileName={`${team.slug}-banner.jpg`}
containerName={containerName}
existingImage={banner}
imagePreviewConfig={{ width: 800, title: 'Change Banner' }}
imagePreviewConfig={{
width: '800px',
height: '200px',
title: 'Change Banner',
fontSize: '1.5em'
}}
cropContainerConfig={{ x: 10, y: 10, width: 800, height: 200 }}
cropPreviewBox={{ width: 650, height: 200 }}
saveImageConfig={{
@@ -181,35 +190,56 @@ export class ManageTeamEdit extends Component {
autoRotate: true,
mimeType: 'image/jpeg'
}}
containerStyle={{
display: 'block',
margin: 0,
height: '200px',
width: '800px',
overflow: 'visible'
}}
AzureStorageUrl={AzureStorageUrl}
AzureSASURL={AzureStorageSAS}
cropRatio={4}
debug
/>
<Grid container>
<Grid md={3}>
<Grid container className={classes.teamMeta} direction='column' justify='center'>
<ImageUpload
key='avatar1'
handleUrl={this.handleAvatar}
fileName={`${team.slug}-avatar.jpg`}
containerName={containerName}
existingImage={avatar}
imagePreviewConfig={{ width: 125, title: 'Change Avatar' }}
cropContainerConfig={{ x: 10, y: 10, width: 200, height: 200 }}
cropPreviewBox={{ width: 350, height: 350 }}
saveImageConfig={{
quality: 0.6,
maxWidth: 200,
maxHeight: 200,
autoRotate: true,
mimeType: 'image/jpeg'
}}
AzureStorageUrl={AzureStorageUrl}
AzureSASURL={AzureStorageSAS}
cropRatio={1}
debug
/>
<Grid container className={classes.editContentContainer}>
<Grid item md={3} alignSelf='stretch'>
<Grid container className={classes.teamMeta} direction='column' justify='flex-start'>
<Grid item>
<ImageUpload
key='avatar1'
handleUrl={this.handleAvatar}
fileName={`${team.slug}-avatar.jpg`}
containerName={containerName}
existingImage={avatar}
imagePreviewConfig={{
width: '125px',
height: '125px',
title: 'Change Avatar',
fontSize: '1.5em'
}}
cropContainerConfig={{ x: 10, y: 10, width: 200, height: 200 }}
cropPreviewBox={{ width: 350, height: 350 }}
saveImageConfig={{
quality: 0.6,
maxWidth: 200,
maxHeight: 200,
autoRotate: true,
mimeType: 'image/jpeg'
}}
containerStyle={{
display: 'block',
margin: '0 auto 12px',
height: '125px',
width: '125px',
overflow: 'visible'
}}
AzureStorageUrl={AzureStorageUrl}
AzureSASURL={AzureStorageSAS}
cropRatio={1}
debug
/>
</Grid>
<Typography variant='subtitle1' paragraph gutterBottom>
Members: {team.members.length}
</Typography>
@@ -221,7 +251,7 @@ export class ManageTeamEdit extends Component {
</Typography>
</Grid>
</Grid>
<Grid md={9}>
<Grid item md={9}>
<Grid container className={classes.teamContent} direction='column'>
<Typography
variant='h2'
@@ -85,7 +85,7 @@ const ManageTeamProfileView = ({ classes, team }) => {
<React.Fragment>
<img src={banner} alt={team.name} className={classes.banner} />
<Grid container>
<Grid md={3}>
<Grid item md={3}>
<Grid container className={classes.teamMeta} direction='column' justify='center'>
<img src={avatar} alt={team.name} className={classes.avatar} />
<Typography variant='subtitle1' paragraph gutterBottom>
@@ -99,7 +99,7 @@ const ManageTeamProfileView = ({ classes, team }) => {
</Typography>
</Grid>
</Grid>
<Grid md={9}>
<Grid item md={9}>
<Grid container className={classes.teamContent} direction='column'>
<Typography
variant='h2'
@@ -128,7 +128,7 @@ export const ManageTeamsList = ({ classes, match, ...props }) => (
} else {
return (
<div className={classes.root} >
<Grid spacing={0} direction='column' justify='center' alignItems='center'>
<Grid container spacing={0} direction='column' justify='center' alignItems='center'>
<Grid item xs={12}>
{errors === null &&
<Typography variant='h5' align='center' gutterBottom>
+1 -2
View File
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
import { BannerTopBar } from '../common'
import ManageTeamsList from './components/ManageTeamsList'
const ManageTeams = ({ classes, match, ...props }) => (
const ManageTeams = ({ match, ...props }) => (
<div>
<BannerTopBar
size={match.params.slug !== undefined ? 'small' : 'medium'}
@@ -19,7 +19,6 @@ const ManageTeams = ({ classes, match, ...props }) => (
)
ManageTeams.propTypes = {
classes: PropTypes.object.isRequired,
match: PropTypes.object
}
+1 -1
View File
@@ -8,7 +8,7 @@ export const theme = createMuiTheme({
secondary: indigo
},
typography: {
fontFamily: '"Saira","Saira Condenses", sans-serif'
fontFamily: '"Saira","Saira Condensed", sans-serif'
},
overrides: {
Paper: {