feat(ui) - session list - tabs and settings
This commit is contained in:
parent
b36a0a09ea
commit
a034460838
4 changed files with 15 additions and 11 deletions
|
|
@ -2,12 +2,12 @@ import React from 'react';
|
|||
import SessionList from './components/SessionList';
|
||||
import SessionHeader from './components/SessionHeader';
|
||||
|
||||
interface Props {}
|
||||
function SessionListContainer(props: Props) {
|
||||
function SessionListContainer() {
|
||||
return (
|
||||
<div className="widget-wrapper">
|
||||
<SessionHeader />
|
||||
<div className="p-4">
|
||||
<div className="border-b" />
|
||||
<div className="px-4">
|
||||
<SessionList />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -33,20 +33,24 @@ function SessionHeader(props: Props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<div className="flex items-center p-4 justify-between">
|
||||
<div className="flex items-center px-4 pt-2 justify-between">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="mr-3 text-lg flex items-center">
|
||||
<div
|
||||
className={cn('py-3 cursor-pointer mr-4 ', { 'border-b color-teal border-teal': !isBookmark })}
|
||||
className={cn('py-3 cursor-pointer mr-4', {
|
||||
'border-b color-teal border-teal': !isBookmark,
|
||||
})}
|
||||
onClick={() => props.setActiveTab({ type: 'all' })}
|
||||
>
|
||||
<span className="font-bold">Sessions</span> <span className="color-gray-medium ml-2">{listCount}</span>
|
||||
<span className="font-bold">SESSIONS</span> <span className="color-gray-medium ml-2">{listCount}</span>
|
||||
</div>
|
||||
<div
|
||||
className={cn('py-3 cursor-pointer', { 'border-b color-teal border-teal': isBookmark })}
|
||||
className={cn('py-3 cursor-pointer', {
|
||||
'border-b color-teal border-teal': isBookmark,
|
||||
})}
|
||||
onClick={() => props.setActiveTab({ type: 'bookmark' })}
|
||||
>
|
||||
<span className="font-bold">{`${isEnterprise ? 'Vault' : 'Bookmarks'}`}</span>
|
||||
<span className="font-bold">{`${isEnterprise ? 'VAULT' : 'BOOKMARKS'}`}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ function SessionList(props: Props) {
|
|||
show={!loading && list.size === 0}
|
||||
>
|
||||
{list.map((session: any) => (
|
||||
<React.Fragment key={session.sessionId}>
|
||||
<div key={session.sessionId} className="border-b">
|
||||
<SessionItem
|
||||
session={session}
|
||||
hasUserFilter={hasUserFilter}
|
||||
|
|
@ -68,8 +68,7 @@ function SessionList(props: Props) {
|
|||
metaList={metaList}
|
||||
lastPlayedSessionId={lastPlayedSessionId}
|
||||
/>
|
||||
<div className="border-b" />
|
||||
</React.Fragment>
|
||||
</div>
|
||||
))}
|
||||
</NoContent>
|
||||
|
||||
|
|
|
|||
|
|
@ -42,5 +42,6 @@ module.exports = {
|
|||
default: '#DDDDDD',
|
||||
'gray-light-shade': '#EEEEEE',
|
||||
'primary': '#3490dc',
|
||||
'transparent': 'transparent',
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue