mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
feat(app): enable cursor in session player (#33)
This commit is contained in:
parent
5d005f7930
commit
911c02a443
3 changed files with 27 additions and 6 deletions
5
.changeset/sour-cougars-walk.md
Normal file
5
.changeset/sour-cougars-walk.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@hyperdx/app': patch
|
||||
---
|
||||
|
||||
feat(app): enable cursor in session player
|
||||
|
|
@ -2,6 +2,7 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
import { Replayer } from 'rrweb';
|
||||
import { throttle } from 'lodash';
|
||||
import cx from 'classnames';
|
||||
|
||||
import { useSearchEventStream } from './search';
|
||||
import { useRouter } from 'next/router';
|
||||
|
|
@ -392,9 +393,10 @@ export default function DOMPlayer({
|
|||
)}
|
||||
<div
|
||||
ref={wrapper}
|
||||
className={`player-wrapper overflow-hidden ${
|
||||
isBuffering ? 'd-none' : ''
|
||||
}`}
|
||||
className={cx('player-wrapper overflow-hidden', {
|
||||
'd-none': isLoading || isBuffering,
|
||||
started: (replayer.current?.getCurrentTime() ?? 0) > 0,
|
||||
})}
|
||||
>
|
||||
<div
|
||||
className="player rr-block"
|
||||
|
|
|
|||
|
|
@ -421,9 +421,23 @@ body {
|
|||
|
||||
/* Custom Components */
|
||||
|
||||
// Make sure the rrweb mouse doesn't obscure elements below it for the inspector
|
||||
.replayer-mouse {
|
||||
pointer-events: none;
|
||||
.player-wrapper {
|
||||
position: relative;
|
||||
|
||||
.replayer-mouse {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-color: rgba(#fff, 0.5);
|
||||
border: 2px solid rgba($gray-100, 0.75);
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
pointer-events: none; // Make sure the rrweb mouse doesn't obscure elements below it for the inspector
|
||||
display: none;
|
||||
}
|
||||
|
||||
&.started .replayer-mouse {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.shimmer {
|
||||
|
|
|
|||
Loading…
Reference in a new issue