aboutsummaryrefslogtreecommitdiffstats
path: root/src/web/src/components/Users/User.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/src/components/Users/User.js')
-rw-r--r--src/web/src/components/Users/User.js63
1 files changed, 32 insertions, 31 deletions
diff --git a/src/web/src/components/Users/User.js b/src/web/src/components/Users/User.js
index e196844e..38d11a22 100644
--- a/src/web/src/components/Users/User.js
+++ b/src/web/src/components/Users/User.js
@@ -1,6 +1,6 @@
import {
Item,
- Icon
+ Icon,
} from 'semantic-ui-react';
const ImagePlaceholder = () =>
@@ -9,7 +9,7 @@ const ImagePlaceholder = () =>
const Presence = ({ presence }) => {
const colors = {
Away: 'yellow',
- Online: 'green'
+ Online: 'green',
}
return <Icon name='circle' color={colors[presence] || 'grey'}/>
@@ -23,36 +23,37 @@ const FreeUploadSlot = ({ hasFreeUploadSlot }) => (
);
const User = ({
- username,
- description,
- hasFreeUploadSlot,
- hasPicture,
- picture,
- queueLength,
- uploadSlots,
- updatedAt,
- isPrivileged,
- presence,
- address,
- port,
- }) => (
- <>
- <Item>
- {hasPicture ?
- <Item.Image size='small' src={`data:image;base64,${picture}`} />
- : <ImagePlaceholder/>}
+ username,
+ description,
+ hasFreeUploadSlot,
+ hasPicture,
+ picture,
+ queueLength,
+ uploadSlots,
+ updatedAt,
+ isPrivileged,
+ presence,
+ address,
+ port,
+}) => (
+ <>
+ <Item>
+ {hasPicture ?
+ <Item.Image size='small' src={`data:image;base64,${picture}`} />
+ : <ImagePlaceholder/>}
- <Item.Content>
- <Item.Header as='a'><Presence presence={presence}/>{username}</Item.Header>
- <Item.Meta>
- Free Upload Slot: <FreeUploadSlot hasFreeUploadSlot/>, Total Upload Slots: {uploadSlots}, Queue Length: {queueLength}, IP Address: {address}, Port: {port}
- </Item.Meta>
- <Item.Description>
- {description || 'No user info.'}
- </Item.Description>
- </Item.Content>
- </Item>
- </>
+ <Item.Content>
+ <Item.Header as='a'><Presence presence={presence}/>{username}</Item.Header>
+ <Item.Meta>
+ Free Upload Slot: <FreeUploadSlot hasFreeUploadSlot />,
+ Total Upload Slots: {uploadSlots}, Queue Length: {queueLength}, IP Address: {address}, Port: {port}
+ </Item.Meta>
+ <Item.Description>
+ {description || 'No user info.'}
+ </Item.Description>
+ </Item.Content>
+ </Item>
+ </>
);
export default User; \ No newline at end of file