aboutsummaryrefslogtreecommitdiffstats
path: root/src/web
diff options
context:
space:
mode:
Diffstat (limited to 'src/web')
-rw-r--r--src/web/src/components/Users/User.js42
-rw-r--r--src/web/src/components/Users/Users.css11
2 files changed, 43 insertions, 10 deletions
diff --git a/src/web/src/components/Users/User.js b/src/web/src/components/Users/User.js
index 2e597201..be1d6443 100644
--- a/src/web/src/components/Users/User.js
+++ b/src/web/src/components/Users/User.js
@@ -1,8 +1,13 @@
import {
Item,
- Image
+ Icon,
+ Divider,
+ Button
} from 'semantic-ui-react';
+const ImagePlaceholder = () =>
+ (<div className='users-picture-placeholder ui small image'><Icon name='camera' size='big'/></div>);
+
const User = ({
username,
description,
@@ -14,16 +19,33 @@ const User = ({
updatedAt,
fetching
}) => (
- <Item>
- <Item.Image size='small' src={`data:image;base64,${picture}`} />
+ <>
+ <Item>
+ {hasPicture ?
+ <Item.Image size='small' src={`data:image;base64,${picture}`} />
+ : <ImagePlaceholder/>}
+
+ <Item.Content>
+ <Item.Header as='a'>{username}</Item.Header>
+ <Item.Meta>
+ Free Upload Slot: <Icon
+ name={hasFreeUploadSlot ? 'check' : 'close'}
+ color={hasFreeUploadSlot ? 'green' : 'red'}
+ />, Total Upload Slots: {uploadSlots}, Queue Length: {queueLength}
+ </Item.Meta>
+ <Item.Description>
+ {description || 'No user info.'}
+ </Item.Description>
+ <div className='users-statistics'>
- <Item.Content>
- <Item.Header as='a'>{username}</Item.Header>
- <Item.Description>
- {description}
- </Item.Description>
- </Item.Content>
- </Item>
+ </div>
+ </Item.Content>
+ </Item>
+ <Divider/>
+ <div>
+ <Button>Force Refresh</Button>
+ </div>
+ </>
);
export default User; \ No newline at end of file
diff --git a/src/web/src/components/Users/Users.css b/src/web/src/components/Users/Users.css
index a5c7b048..29e31f48 100644
--- a/src/web/src/components/Users/Users.css
+++ b/src/web/src/components/Users/Users.css
@@ -22,4 +22,15 @@
.users-user {
margin-top: 15px !important;
min-height: 78px;
+}
+
+.users-picture-placeholder {
+ text-align: center;
+ padding-top: 10px !important;
+ opacity: .125;
+}
+
+.ui.items > .item > .content > .description {
+ white-space: pre-wrap;
+ margin-top: 15px;
} \ No newline at end of file