openreplay/frontend/app/components/Session/Player/ClipPlayer/QueueControls.tsx
Delirium 2cd96b0df0
Highlight UI (#2951)
* ui: start highlight ui

* ui: tag items

* ui: connecting highlights to notes api...

* Highlight feature refinements (#2948)

* ui: move clips player to foss, connect notes api to hl

* ui: tune note/hl editing, prevent zoom slider body from jumping around

* ui: safe check for tag

* ui: fix thumbnail gen

* ui: fix thumbnail gen

* ui: make player modal wider, add shadow

* ui: custom warn barge for clips

* ui: swap icon for note event wrapper

* ui: rm other, fix cancel

* ui: moving around creation modal

* ui: bg tint

* ui: rm disabled for text btn

* ui: fix ownership sorting

* ui: close player on bg click

* ui: fix query, fix min distance for default range

* ui: move hl list header out of list comp

* ui: spot list header segmented size

* Various improvements in highlights (#2955)

* ui: update hl in hlPanel comp

* ui: rm debug

* ui: fix icons file

---------

Co-authored-by: Sudheer Salavadi <connect.uxmaster@gmail.com>
2025-01-24 09:59:54 +01:00

79 lines
2.5 KiB
TypeScript

import React, {useEffect} from 'react';
import cn from 'classnames';
import {LeftOutlined, RightOutlined} from '@ant-design/icons';
import {Button, Popover} from 'antd';
import {useStore} from 'App/mstore';
import {observer} from 'mobx-react-lite';
import AutoplayToggle from "Shared/AutoplayToggle";
// import AutoplayToggle from "Components/Session/Player/ClipPlayer/AutoplayToggle";
interface Props {
}
function QueueControls(props: Props) {
const {clipStore, projectsStore, sessionStore, searchStore} = useStore();
const previousId = clipStore.prevId;
const nextId = clipStore.nextId;
const nextHandler = () => {
clipStore.next();
};
const prevHandler = () => {
clipStore.prev();
};
return (
<div className="flex items-center gap-1">
<div
onClick={prevHandler}
className={cn('p-1 group rounded-full', {
'pointer-events-none opacity-50': !previousId,
'cursor-pointer': !!previousId,
})}
>
<Popover
placement="bottom"
content={
<div className="whitespace-nowrap">Play Previous Session</div>
}
open={previousId ? undefined : false}
mouseEnterDelay={1}
>
<Button
size={'small'}
shape={'circle'}
disabled={!previousId}
className={'flex items-center justify-center'}
>
<LeftOutlined/>
</Button>
</Popover>
</div>
<AutoplayToggle/>
<div
onClick={nextHandler}
className={cn('p-1 group ml-1 rounded-full')}
>
<Popover
placement="bottom"
content={<div className="whitespace-nowrap">Play Next Session</div>}
open={nextId ? undefined : false}
mouseEnterDelay={1}
>
<Button
size={'small'}
shape={'circle'}
// disabled={!nextId}
className={'flex items-center justify-center'}
>
<RightOutlined/>
</Button>
</Popover>
</div>
</div>
);
}
export default observer(QueueControls);