Merge pull request #352 from openreplay/dev

Chore(release): UI fixes
This commit is contained in:
Mehdi Osman 2022-02-25 13:06:21 +00:00 committed by GitHub
commit 4952b8774e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 10 deletions

View file

@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { SlideModal, Avatar, Icon } from 'UI';
import { SlideModal, Avatar, TextEllipsis, Icon } from 'UI';
import SessionList from '../SessionList';
import stl from './assistTabs.css'
@ -19,7 +19,11 @@ const AssistTabs = (props: Props) => {
<div className="flex items-center mr-3">
{/* <Icon name="user-alt" color="gray-darkest" /> */}
<Avatar iconSize="20" width="30px" height="30px" seed={ props.userNumericHash } />
<div className="ml-2 font-medium">{props.userId}'s</div>
<div className="ml-2 font-medium">
<TextEllipsis maxWidth={120} inverted popupProps={{ inverted: true, size: 'tiny' }}>
{props.userId}'s asdasd asdasdasdasd
</TextEllipsis>
</div>
</div>
<div
className={stl.btnLink}

View file

@ -139,7 +139,7 @@ export default class PlayerBlockHeader extends React.PureComponent {
{ _live && (
<>
<SessionMetaList className="" metaList={_metaList} />
<SessionMetaList className="" metaList={_metaList} maxLength={3} />
<div className={ stl.divider } />
</>
)}

View file

@ -161,7 +161,7 @@ function LiveSessionList(props: Props) {
))}
<LoadMoreButton
className="mt-3"
className="my-6"
displayedCount={displayedCount}
totalCount={sessions.size}
onClick={addPage}

View file

@ -6,19 +6,20 @@ import MetaMoreButton from '../MetaMoreButton';
interface Props {
className?: string,
metaList: []
metaList: [],
maxLength?: number,
}
const MAX_LENGTH = 4;
export default function SessionMetaList(props: Props) {
const { className = '', metaList } = props
const { className = '', metaList, maxLength = 4 } = props
return (
<div className={cn("text-sm flex items-start", className)}>
{metaList.slice(0, MAX_LENGTH).map(({ label, value }, index) => (
{metaList.slice(0, maxLength).map(({ label, value }, index) => (
<MetaItem key={index} label={label} value={''+value} className="mr-3" />
))}
{metaList.length > MAX_LENGTH && (
<MetaMoreButton list={metaList} maxLength={MAX_LENGTH} />
{metaList.length > maxLength && (
<MetaMoreButton list={metaList} maxLength={maxLength} />
)}
</div>
)