openreplay/frontend/app/components/Session/Player/ReplayPlayer/PlayerBlock.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

46 lines
1.2 KiB
TypeScript

import cn from 'classnames';
import { observer } from 'mobx-react-lite';
import React from 'react';
import { useStore } from 'App/mstore';
import SubHeader from 'Components/Session_/Subheader';
import styles from 'Components/Session_/playerBlock.module.css';
import Player from './PlayerInst';
interface IProps {
sessionId: string;
activeTab: string;
jiraConfig: Record<string, any>;
fullView?: boolean;
setActiveTab: (tab: string) => void;
}
function PlayerBlock(props: IProps) {
const {
activeTab,
fullView = false,
setActiveTab,
} = props;
const { uiPlayerStore, sessionStore, integrationsStore } = useStore();
const jiraConfig = integrationsStore.issues.list[0];
const sessionId = sessionStore.current.sessionId;
const fullscreen = uiPlayerStore.fullscreen;
const shouldShowSubHeader = !fullscreen && !fullView;
return (
<div
className={cn(styles.playerBlock, 'flex flex-col', 'overflow-x-hidden')}
>
{shouldShowSubHeader ? (
<SubHeader setActiveTab={setActiveTab} sessionId={sessionId} jiraConfig={jiraConfig} />
) : null}
<Player
setActiveTab={setActiveTab}
activeTab={activeTab}
fullView={fullView}
/>
</div>
);
}
export default observer(PlayerBlock);