Fixed creator grid information
This commit is contained in:
@@ -166,11 +166,23 @@ def csv_parse(a):
|
|||||||
fullitem["index"] = cnt
|
fullitem["index"] = cnt
|
||||||
fullitem["parsed"] = {}
|
fullitem["parsed"] = {}
|
||||||
if len(columns) != len(commasplit):
|
if len(columns) != len(commasplit):
|
||||||
allitems.append(fullitem)
|
|
||||||
continue
|
if len(commasplit) > len(columns):
|
||||||
|
diff = len(commasplit)-len(columns)
|
||||||
|
|
||||||
|
try:
|
||||||
|
commasplit = commasplit[0:len(commasplit)-diff]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
for item in range(0, len(columns)-len(commasplit)):
|
||||||
|
commasplit.append("")
|
||||||
|
|
||||||
for key in range(len(columns)):
|
for key in range(len(columns)):
|
||||||
fullitem["parsed"][columns[key]] = commasplit[key]
|
try:
|
||||||
|
fullitem["parsed"][columns[key]] = commasplit[key]
|
||||||
|
except:
|
||||||
|
continue
|
||||||
|
|
||||||
allitems.append(fullitem)
|
allitems.append(fullitem)
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import {
|
|||||||
SkipNext as SkipNextIcon,
|
SkipNext as SkipNextIcon,
|
||||||
SkipPrevious as SkipPreviousIcon,
|
SkipPrevious as SkipPreviousIcon,
|
||||||
PlayArrow as PlayArrowIcon,
|
PlayArrow as PlayArrowIcon,
|
||||||
|
VerifiedUser as VerifiedUserIcon,
|
||||||
} from "@material-ui/icons";
|
} from "@material-ui/icons";
|
||||||
|
|
||||||
|
|
||||||
@@ -162,21 +163,30 @@ const CreatorGrid = props => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Zoom key={index} in={true} style={{}}>
|
<Zoom key={index} in={true} style={{}}>
|
||||||
<Grid item xs={xs} style={{ padding: "12px 10px 12px 10px" }}>
|
<Grid item xs={xs} style={{ padding: "12px 10px 12px 10px", }}>
|
||||||
<Card style={{border: "1px solid rgba(255,255,255,0.3)"}}>
|
<Card style={{border: "1px solid rgba(255,255,255,0.3)", minHeight: 177, maxHeight: 177,}}>
|
||||||
<CardActionArea component={Link} to={"/creators/"+data.username} style={{padding: "5px 10px 5px 10px", }}>
|
<CardActionArea component={Link} to={"/creators/"+data.username} style={{padding: "5px 10px 5px 10px", minHeight: 177, maxHeight: 177,}}>
|
||||||
<CardContent sx={{ flex: '1 0 auto', minWidth: 160, maxWidth: 160, overflow: "hidden", padding: 0, }}>
|
<CardContent sx={{ flex: '1 0 auto', minWidth: 160, maxWidth: 160, overflow: "hidden", padding: 0, }}>
|
||||||
<div style={{display: "flex"}}>
|
<div style={{display: "flex"}}>
|
||||||
<img style={{height: 74, width: 74, borderRadius: 100, }} alt={"Creator profile of "+data.username} src={data.image} />
|
<img style={{height: 74, width: 74, borderRadius: 100, }} alt={"Creator profile of "+data.username} src={data.image} />
|
||||||
<Typography component="div" variant="body1" style={{marginTop: 20, marginLeft: 15, }}>
|
<Typography component="div" variant="body1" style={{marginTop: 20, marginLeft: 15, }}>
|
||||||
@{data.username}
|
@{data.username}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
<span style={{marginTop: "auto", marginBottom: "auto", marginLeft: 10, }}>
|
||||||
|
{data.verified === true ?
|
||||||
|
<Tooltip title="Verified and earning from Shuffle contributions" placement="top">
|
||||||
|
<VerifiedUserIcon style={{}}/>
|
||||||
|
</Tooltip>
|
||||||
|
:
|
||||||
|
null
|
||||||
|
}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<Typography variant="body1" color="textSecondary" style={{marginTop: 10, }}>
|
<Typography variant="body1" color="textSecondary" style={{marginTop: 10, }}>
|
||||||
<b>{data.apps}</b> apps <span style={{marginLeft: 15, }}/><b>{data.workflows}</b> workflows
|
<b>{data.apps === undefined || data.apps === null ? 0 : data.apps}</b> apps <span style={{marginLeft: 15, }}/><b>{data.workflows === null || data.workflows === undefined ? 0 : data.workflows}</b> workflows
|
||||||
</Typography>
|
</Typography>
|
||||||
{data.specialized_apps !== undefined && data.specialized_apps !== null && data.specialized_apps.length > 0 ?
|
{data.specialized_apps !== undefined && data.specialized_apps !== null && data.specialized_apps.length > 0 ?
|
||||||
<AvatarGroup max={10} style={{flexDirection: "row", padding: 0, margin: 0, itemAlign: "left", textAlign: "left",}}>
|
<AvatarGroup max={10} style={{flexDirection: "row", padding: 0, margin: 0, itemAlign: "left", textAlign: "left", marginTop: 3,}}>
|
||||||
{data.specialized_apps.map((app, index) => {
|
{data.specialized_apps.map((app, index) => {
|
||||||
// Putting all this in secondary of ListItemText looked weird.
|
// Putting all this in secondary of ListItemText looked weird.
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user