mirror of
https://github.com/responsively-org/responsively-app
synced 2024-11-10 14:54:12 +00:00
Reload shortcut key implemented
This commit is contained in:
parent
1c27833164
commit
83c2de633e
2 changed files with 10 additions and 4 deletions
|
@ -2,9 +2,7 @@
|
|||
import React, {Component} from 'react';
|
||||
import cx from 'classnames';
|
||||
import Grid from '@material-ui/core/Grid';
|
||||
import ArrowLeftIcon from '../icons/ArrowLeft';
|
||||
import ArrowRightIcon from '../icons/ArrowRight';
|
||||
import ReloadIcon from '../icons/Reload';
|
||||
import {ipcRenderer} from 'electron';
|
||||
import HomeIcon from '../icons/Home';
|
||||
import {Icon} from 'flwww';
|
||||
|
||||
|
@ -14,6 +12,11 @@ import {iconsColor} from '../../constants/colors';
|
|||
import {Tooltip} from '@material-ui/core';
|
||||
|
||||
class NavigationControls extends Component {
|
||||
|
||||
componentDidMount() {
|
||||
ipcRenderer.on('reload-url', this.props.triggerNavigationReload);
|
||||
}
|
||||
|
||||
render() {
|
||||
const iconProps = {
|
||||
color: iconsColor,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* @flow
|
||||
*/
|
||||
require('dotenv').config();
|
||||
import electron, {app, BrowserWindow, ipcMain} from 'electron';
|
||||
import electron, {app, BrowserWindow, globalShortcut, ipcMain} from 'electron';
|
||||
import {autoUpdater} from 'electron-updater';
|
||||
import settings from 'electron-settings';
|
||||
import log from 'electron-log';
|
||||
|
@ -128,6 +128,9 @@ const createWindow = async () => {
|
|||
|
||||
mainWindow.once('ready-to-show', () => {
|
||||
mainWindow.show();
|
||||
globalShortcut.register('CommandOrControl+R', () => {
|
||||
mainWindow.webContents.send('reload-url');
|
||||
})
|
||||
});
|
||||
|
||||
ipcMain.on('http-auth-promt-response', (event, ...args) => {
|
||||
|
|
Loading…
Reference in a new issue