fix ui: fix ws modal height, add new shortcut to copy, fix new site type ios -> mobile
This commit is contained in:
parent
2f75bc49ef
commit
a2a721673d
7 changed files with 31 additions and 9 deletions
|
|
@ -141,7 +141,7 @@ const NewSiteForm = ({
|
|||
},
|
||||
{
|
||||
value: 'ios',
|
||||
label: 'iOS',
|
||||
label: 'Mobile',
|
||||
},
|
||||
]}
|
||||
value={site.platform}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ function WidgetPreview(props: Props) {
|
|||
<WidgetWrapper
|
||||
widget={metric}
|
||||
isPreview={true}
|
||||
isSaved={metric.exists()}
|
||||
// isSaved={metric.exists()}
|
||||
hideName
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import copy from 'copy-to-clipboard';
|
||||
import { useContext, useEffect } from 'react';
|
||||
import { toast } from 'react-toastify';
|
||||
|
||||
import { PlayerContext } from 'Components/Session/playerContext';
|
||||
import { SKIP_INTERVALS } from 'Components/Session_/Player/Controls/Controls';
|
||||
|
|
@ -23,8 +25,18 @@ function useShortcuts({
|
|||
setActiveTab: (tab: string) => void;
|
||||
disableDevtools?: boolean;
|
||||
}) {
|
||||
const { player } = useContext(PlayerContext);
|
||||
const { player, store } = useContext(PlayerContext);
|
||||
|
||||
const copySessionUrl = (withTs?: boolean) => {
|
||||
if (withTs) {
|
||||
const time = store.get().time;
|
||||
const sessUrl = `${window.location.href}?jumpto=${time}`;
|
||||
copy(sessUrl);
|
||||
} else {
|
||||
copy(window.location.href);
|
||||
}
|
||||
toast.success('Copied session url to clipboard');
|
||||
};
|
||||
const forthTenSeconds = () => {
|
||||
player.jumpInterval(SKIP_INTERVALS[skipInterval]);
|
||||
};
|
||||
|
|
@ -41,6 +53,7 @@ function useShortcuts({
|
|||
) {
|
||||
return false;
|
||||
} else {
|
||||
console.log(e);
|
||||
// shift + f = fullscreenOn
|
||||
if (e.shiftKey) {
|
||||
e.preventDefault();
|
||||
|
|
@ -49,9 +62,13 @@ function useShortcuts({
|
|||
case 'F':
|
||||
return fullScreenOn();
|
||||
case 'X':
|
||||
return disableDevtools ? null : toggleBottomBlock(blocks.overview);
|
||||
return disableDevtools
|
||||
? null
|
||||
: toggleBottomBlock(blocks.overview);
|
||||
case 'P':
|
||||
return disableDevtools ? null : toggleBottomBlock(blocks.performance);
|
||||
return disableDevtools
|
||||
? null
|
||||
: toggleBottomBlock(blocks.performance);
|
||||
case 'N':
|
||||
return disableDevtools ? null : toggleBottomBlock(blocks.network);
|
||||
case 'C':
|
||||
|
|
@ -59,11 +76,15 @@ function useShortcuts({
|
|||
case 'R':
|
||||
return disableDevtools ? null : toggleBottomBlock(blocks.storage);
|
||||
case 'E':
|
||||
return disableDevtools ? null : toggleBottomBlock(blocks.stackEvents);
|
||||
return disableDevtools
|
||||
? null
|
||||
: toggleBottomBlock(blocks.stackEvents);
|
||||
case '>':
|
||||
return openNextSession();
|
||||
case '<':
|
||||
return openPrevSession();
|
||||
case 'U':
|
||||
return copySessionUrl(true);
|
||||
case 'A':
|
||||
player.pause();
|
||||
return setActiveTab('EVENTS');
|
||||
|
|
@ -100,4 +121,4 @@ function useShortcuts({
|
|||
}, [forthTenSeconds, backTenSeconds, player, fullScreenOn, fullScreenOff]);
|
||||
}
|
||||
|
||||
export default useShortcuts
|
||||
export default useShortcuts;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ function ShortcutGrid() {
|
|||
<div className={'p-4 overflow-y-auto h-screen'}>
|
||||
<div className={'mb-4 font-semibold text-xl'}>Keyboard Shortcuts</div>
|
||||
<div className=" grid grid-cols-2 grid-flow-row-dense auto-cols-max gap-4 justify-items-start">
|
||||
<Cell shortcut="⇧ + U" text="Copy Session URL with time" />
|
||||
<Cell shortcut="⇧ + C" text="Launch Console" />
|
||||
<Cell shortcut="⇧ + N" text="Launch Network" />
|
||||
<Cell shortcut="⇧ + P" text="Launch Performance" />
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ function WSModal({ socketMsgList }: Props) {
|
|||
<div className={'col-span-1'}>Length</div>
|
||||
<div className={'col-span-2 text-right'}>Time</div>
|
||||
</div>
|
||||
<div style={{ height: '100%', maxWidth: 700, overflowY: 'auto' }}>
|
||||
<div style={{ height: 'calc(100% - 36px)', maxWidth: 700, overflowY: 'auto' }}>
|
||||
{socketMsgList.map((msg) => (
|
||||
<Row msg={msg} key={msg.timestamp} />
|
||||
))}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@openreplay/tracker",
|
||||
"description": "The OpenReplay tracker main package",
|
||||
"version": "14.0.1-6",
|
||||
"version": "14.0.0",
|
||||
"keywords": [
|
||||
"logging",
|
||||
"replay"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue