mirror of
https://github.com/responsively-org/responsively-app
synced 2024-11-10 06:44:13 +00:00
Merge branch '812-Add-Shortcut-for-opening-dev-tools' of https://github.com/codewithmitesh/responsively-app into 812-Add-Shortcut-for-opening-dev-tools
This commit is contained in:
commit
6015abb07f
1 changed files with 5 additions and 5 deletions
|
@ -8,12 +8,12 @@ import {
|
|||
setRotate,
|
||||
} from 'renderer/store/features/renderer';
|
||||
import { Icon } from '@iconify/react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { ScreenshotAllArgs } from 'main/screenshot';
|
||||
import { selectActiveSuite } from 'renderer/store/features/device-manager';
|
||||
import WebPage from 'main/screenshot/webpage';
|
||||
import { getDevicesMap } from 'common/deviceList';
|
||||
import { updateWebViewHeightAndScale } from 'common/webViewUtils';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import NavigationControls from './NavigationControls';
|
||||
import Menu from './Menu';
|
||||
import Button from '../Button';
|
||||
|
@ -31,6 +31,10 @@ const ToolBar = () => {
|
|||
const activeSuite = useSelector(selectActiveSuite);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
function handleInspectShortcut() {
|
||||
dispatch(setIsInspecting(!isInspecting));
|
||||
}
|
||||
|
||||
const screenshotCaptureHandler = async () => {
|
||||
dispatch(setIsCapturingScreenshot(true));
|
||||
const webViews: NodeListOf<Electron.WebviewTag> =
|
||||
|
@ -94,12 +98,8 @@ const ToolBar = () => {
|
|||
return () => document.removeEventListener('keypress', handle);
|
||||
}, [key]);
|
||||
}
|
||||
function handleInspectShortcut() {
|
||||
dispatch(setIsInspecting(!isInspecting));
|
||||
}
|
||||
// setting shortcut I for inspect element
|
||||
useKey('KeyI', handleInspectShortcut);
|
||||
|
||||
return (
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<NavigationControls />
|
||||
|
|
Loading…
Reference in a new issue