From 5df7183e819ce3fae31c8d9a0e220bdc7375e566 Mon Sep 17 00:00:00 2001 From: yan Date: Fri, 18 Dec 2015 16:20:42 -0800 Subject: [PATCH 1/3] Refactor IPC names into a separate file for maintainability --- app/index.js | 21 ++++++++++---------- app/localShortcuts.js | 29 ++++++++++++++------------- app/menu.js | 27 +++++++++++++------------ app/updater.js | 11 +++++----- js/actions/appActions.js | 9 +++++---- js/components/main.js | 15 +++++++------- js/components/urlBar.js | 7 ++++--- js/constants/messages.js | 43 ++++++++++++++++++++++++++++++++++++++++ js/contextMenus.js | 9 +++++---- js/stores/appStore.js | 7 ++++--- 10 files changed, 115 insertions(+), 63 deletions(-) create mode 100644 js/constants/messages.js diff --git a/app/index.js b/app/index.js index 57b86ab5f8c..e9f8824da87 100644 --- a/app/index.js +++ b/app/index.js @@ -10,6 +10,7 @@ const BrowserWindow = electron.BrowserWindow const Menu = require('./menu') const LocalShortcuts = require('./localShortcuts') const Updater = require('./updater') +const messages = require('../js/constants/messages') // Report crashes electron.crashReporter.start() @@ -57,23 +58,23 @@ const spawnWindow = () => { app.on('ready', function () { windows.push(spawnWindow()) - ipcMain.on('quit-application', () => { + ipcMain.on(messages.QUIT_APPLICATION, () => { app.quit() }) - ipcMain.on('context-menu-opened', (e, nodeName) => { - BrowserWindow.getFocusedWindow().webContents.send('context-menu-opened', nodeName) + ipcMain.on(messages.CONTEXT_MENU_OPENED, (e, nodeName) => { + BrowserWindow.getFocusedWindow().webContents.send(messages.CONTEXT_MENU_OPENED, nodeName) }) - ipcMain.on('new-window', () => windows.push(spawnWindow())) - process.on('new-window', () => windows.push(spawnWindow())) + ipcMain.on(messages.NEW_WINDOW, () => windows.push(spawnWindow())) + process.on(messages.NEW_WINDOW, () => windows.push(spawnWindow())) - ipcMain.on('close-window', () => BrowserWindow.getFocusedWindow().close()) - process.on('close-window', () => BrowserWindow.getFocusedWindow().close()) + ipcMain.on(messages.CLOSE_WINDOW, () => BrowserWindow.getFocusedWindow().close()) + process.on(messages.CLOSE_WINDOW, () => BrowserWindow.getFocusedWindow().close()) Menu.init() - ipcMain.on('update-requested', () => { + ipcMain.on(messages.UPDATE_REQUESTED, () => { Updater.update() }) @@ -82,8 +83,8 @@ app.on('ready', function () { Updater.init(process.platform) // this is fired by the menu entry - process.on('check-for-update', () => Updater.checkForUpdate()) + process.on(messages.CHECK_FOR_UPDATE, () => Updater.checkForUpdate()) } else { - process.on('check-for-update', () => Updater.fakeCheckForUpdate()) + process.on(messages.CHECK_FOR_UPDATE, () => Updater.fakeCheckForUpdate()) } }) diff --git a/app/localShortcuts.js b/app/localShortcuts.js index 5ef56ea895e..9b43d825128 100644 --- a/app/localShortcuts.js +++ b/app/localShortcuts.js @@ -5,6 +5,7 @@ const electron = require('electron') const BrowserWindow = electron.BrowserWindow const electronLocalshortcut = require('electron-localshortcut') +const messages = require('../js/constants/messages') module.exports.register = (win) => { // Most of these events will simply be listened to by the app store and acted @@ -12,24 +13,24 @@ module.exports.register = (win) => { // the URL bar. In those cases it's acceptable for the individual components to // listen to the events. const simpleWebContentEvents = [ - ['CmdOrCtrl+L', 'shortcut-focus-url'], - ['Ctrl+Tab', 'shortcut-next-tab'], - ['Ctrl+Shift+Tab', 'shortcut-prev-tab'], - ['CmdOrCtrl+Shift+]', 'shortcut-next-tab'], - ['CmdOrCtrl+Shift+[', 'shortcut-prev-tab'], - ['CmdOrCtrl+9', 'shortcut-set-active-frame-to-last'], - ['CmdOrCtrl+Shift+T', 'shortcut-undo-closed-frame'], - ['Escape', 'shortcut-active-frame-stop'], - ['CmdOrCtrl+R', 'shortcut-active-frame-reload'], - ['CmdOrCtrl+=', 'shortcut-active-frame-zoom-in'], - ['CmdOrCtrl+-', 'shortcut-active-frame-zoom-out'], - ['CmdOrCtrl+0', 'shortcut-active-frame-zoom-reset'], - ['CmdOrCtrl+Alt+I', 'shortcut-active-frame-toggle-dev-tools'] + ['CmdOrCtrl+L', messages.SHORTCUT_FOCUS_URL], + ['Ctrl+Tab', messages.SHORTCUT_NEXT_TAB], + ['Ctrl+Shift+Tab', messages.SHORTCUT_PREV_TAB], + ['CmdOrCtrl+Shift+]', messages.SHORTCUT_NEXT_TAB], + ['CmdOrCtrl+Shift+[', messages.SHORTCUT_PREV_TAB], + ['CmdOrCtrl+9', messages.SHORTCUT_SET_ACTIVE_FRAME_TO_LAST], + ['CmdOrCtrl+Shift+T', messages.SHORTCUT_UNDO_CLOSED_FRAME], + ['Escape', messages.SHORTCUT_ACTIVE_FRAME_STOP], + ['CmdOrCtrl+R', messages.SHORTCUT_ACTIVE_FRAME_RELOAD], + ['CmdOrCtrl+=', messages.SHORTCUT_ACTIVE_FRAME_ZOOM_IN], + ['CmdOrCtrl+-', messages.SHORTCUT_ACTIVE_FRAME_ZOOM_OUT], + ['CmdOrCtrl+0', messages.SHORTCUT_ACTIVE_FRAME_RESET], + ['CmdOrCtrl+Alt+I', messages.SHORTCUT_ACTIVE_FRAME_TOGGLE_DEV_TOOLS] ] // Tab ordering shortcuts Array.from(new Array(8), (x, i) => i).reduce((list, i) => { - list.push(['CmdOrCtrl+' + String(i + 1), 'shortcut-set-active-frame-by-index', i]) + list.push(['CmdOrCtrl+' + String(i + 1), messages.SHORTCUT_SET_ACTIVE_FRAME_BY_INDEX, i]) return list }, simpleWebContentEvents) diff --git a/app/menu.js b/app/menu.js index 5e6d385fd4d..c735093dab7 100644 --- a/app/menu.js +++ b/app/menu.js @@ -5,6 +5,7 @@ const electron = require('electron') const app = electron.app const Menu = require('menu') +const messages = require('../js/constants/messages') const init = () => { var template = [ @@ -14,7 +15,7 @@ const init = () => { { label: 'Check for updates ...', click: function (item, focusedWindow) { - process.emit('check-for-update') + process.emit(messages.CHECK_FOR_UPDATE) } }, { @@ -22,26 +23,26 @@ const init = () => { accelerator: 'CmdOrCtrl+T', click: function (item, focusedWindow) { if (focusedWindow) { - focusedWindow.webContents.send('shortcut-new-frame') + focusedWindow.webContents.send(messages.SHORTCUT_NEW_FRAME) } else { // no active windows - process.emit('new-window') + process.emit(messages.NEW_WINDOW) } } }, { label: 'New Private Tab', accelerator: 'CmdOrCtrl+Alt+T', click: function (item, focusedWindow) { - focusedWindow.webContents.send('shortcut-new-frame') + focusedWindow.webContents.send(messages.SHORTCUT_NEW_FRAME) } }, { label: 'New Window', accelerator: 'CmdOrCtrl+N', - click: () => process.emit('new-window') + click: () => process.emit(messages.NEW_WINDOW) }, { label: 'New Private Window', accelerator: 'CmdOrCtrl+Alt+N', - click: () => process.emit('new-window') + click: () => process.emit(messages.NEW_WINDOW) }, { type: 'separator' }, { @@ -68,7 +69,7 @@ const init = () => { accelerator: 'CmdOrCtrl+W', click: function (item, focusedWindow) { if (focusedWindow) { - focusedWindow.webContents.send('shortcut-close-frame') + focusedWindow.webContents.send(messages.SHORTCUT_CLOSE_FRAME) } } }, { @@ -78,7 +79,7 @@ const init = () => { accelerator: 'CmdOrCtrl+Shift+W', click: function (item, focusedWindow) { if (focusedWindow) { - process.emit('close-window') + process.emit(messages.CLOSE_WINDOW) } } }, { @@ -225,7 +226,7 @@ const init = () => { accelerator: 'CmdOrCtrl+Alt+I', click: function (item, focusedWindow) { if (focusedWindow) { - focusedWindow.webContents.send('shortcut-active-frame-toggle-dev-tools') + focusedWindow.webContents.send(messages.SHORTCUT_ACTIVE_FRAME_TOGGLE_DEV_TOOLS) } } }, { @@ -404,7 +405,7 @@ const init = () => { { label: 'Brave Help', click: function (item, focusedWindow) { - focusedWindow.webContents.send('shortcut-new-frame', + focusedWindow.webContents.send(messages.SHORTCUT_NEW_FRAME, 'https://brave.com') } }, { @@ -412,13 +413,13 @@ const init = () => { }, { label: 'Submit Feedback...', click: function (item, focusedWindow) { - focusedWindow.webContents.send('shortcut-new-frame', + focusedWindow.webContents.send(messages.SHORTCUT_NEW_FRAME, 'https://brave.com') } }, { label: 'Spread the word about Brave...', click: function (item, focusedWindow) { - focusedWindow.webContents.send('shortcut-new-frame', + focusedWindow.webContents.send(messages.SHORTCUT_NEW_FRAME, 'https://brave.com') } } @@ -444,7 +445,7 @@ const init = () => { }, { label: 'Send us Feedback...', click: function (item, focusedWindow) { - focusedWindow.webContents.send('shortcut-new-frame', + focusedWindow.webContents.send(messages.SHORTCUT_NEW_FRAME, 'https://brave.com') } }, { diff --git a/app/updater.js b/app/updater.js index 5c9f59feb03..fd41e4cbf5a 100644 --- a/app/updater.js +++ b/app/updater.js @@ -8,6 +8,7 @@ const path = require('path') const fs = require('fs') const autoUpdater = require('auto-updater') const config = require('./appConfig') +const messages = require('../js/constants/messages') // this maps the result of a call to process.platform to an update API identifier var platforms = { @@ -37,7 +38,7 @@ exports.checkForUpdate = () => { // development version only exports.fakeCheckForUpdate = () => { - BrowserWindow.getFocusedWindow().webContents.send('update-available') + BrowserWindow.getFocusedWindow().webContents.send(messages.UPDATE_AVAILABLE) } exports.update = () => { @@ -45,14 +46,14 @@ exports.update = () => { autoUpdater.quitAndInstall() } -autoUpdater.on('update-downloaded', (evt) => { - BrowserWindow.getFocusedWindow().webContents.send('update-available') +autoUpdater.on(messages.UPDATE_DOWNLOADED, (evt) => { + BrowserWindow.getFocusedWindow().webContents.send(messages.UPDATE_AVAILABLE) }) -autoUpdater.on('update-available', (evt) => { +autoUpdater.on(messages.UPDATE_AVAILABLE, (evt) => { console.log('update downloading') }) -autoUpdater.on('update-not-available', (evt) => { +autoUpdater.on(messages.UPDATE_NOT_AVAILABLE, (evt) => { console.log('update is not available') }) diff --git a/js/actions/appActions.js b/js/actions/appActions.js index 2940c8c841f..ab456ad6b38 100644 --- a/js/actions/appActions.js +++ b/js/actions/appActions.js @@ -10,6 +10,7 @@ const Config = require('../constants/config') const UrlUtil = require('../../node_modules/urlutil.js/dist/node-urlutil.js') const AppStore = require('../stores/appStore') const ipc = global.require('electron').ipcRenderer +const messages = require('../constants/messages') const AppActions = { /** @@ -135,7 +136,7 @@ const AppActions = { * Dispatches an event to the main process to create a new window */ newWindow: function () { - ipc.send('new-window') + ipc.send(messages.NEW_WINDOW) }, closeFrame: function (frameProps) { @@ -153,7 +154,7 @@ const AppActions = { * Dispatches an event to the main process to close the current window */ closeWindow: function () { - ipc.send('close-window') + ipc.send(messages.CLOSE_WINDOW) }, /** @@ -161,7 +162,7 @@ const AppActions = { */ updateRequested: function () { console.log('appActions updateRequested') - ipc.send('update-requested') + ipc.send(messages.UPDATE_REQUESTED) }, /** @@ -178,7 +179,7 @@ const AppActions = { * Dispatches an event to the main process to quit the entire application */ quitApplication: function () { - ipc.send('quit-application') + ipc.send(messages.QUIT_APPLICATION) }, /** diff --git a/js/components/main.js b/js/components/main.js index 6d74c07be08..b47ae1b76b7 100644 --- a/js/components/main.js +++ b/js/components/main.js @@ -21,6 +21,7 @@ const UpdateBar = require('./updateBar') // Constants const Config = require('../constants/config') +const messages = require('../constants/messages') // State handling const FrameStateUtil = require('../state/frameStateUtil') @@ -33,29 +34,29 @@ class Main extends ImmutableComponent { }) } - ipc.on('context-menu-opened', (e, nodeName) => { + ipc.on(messages.CONTEXT_MENU_OPENED, (e, nodeName) => { console.log('got context menu open', nodeName) contextMenus.onMainContextMenu(nodeName) }) - ipc.on('shortcut-new-frame', (event, url) => { + ipc.on(messages.SHORTCUT_NEW_FRAME, (event, url) => { AppActions.newFrame({ location: url || Config.defaultUrl }) // Focus URL bar when adding tab via shortcut - electron.remote.getCurrentWebContents().send('shortcut-focus-url') + electron.remote.getCurrentWebContents().send(messages.SHORTCUT_FOCUS_URL) }) - ipc.on('shortcut-close-frame', (e, i) => typeof i !== 'undefined' + ipc.on(messages.SHORTCUT_CLOSE_FRAME, (e, i) => typeof i !== 'undefined' ? AppActions.closeFrame(FrameStateUtil.getFrameByKey(self.props.browser, i)) : AppActions.closeFrame()) - ipc.on('shortcut-undo-closed-frame', () => AppActions.undoClosedFrame()) + ipc.on(messages.SHORTCUT_UNDO_CLOSED_FRAME, () => AppActions.undoClosedFrame()) const self = this - ipc.on('shortcut-set-active-frame-by-index', (e, i) => + ipc.on(messages.SHORTCUT_SET_ACTIVE_FRAME_BY_INDEX, (e, i) => AppActions.setActiveFrame(FrameStateUtil.getFrameByIndex(self.props.browser, i))) - ipc.on('shortcut-set-active-frame-to-last', () => + ipc.on(messages.SHORTCUT_SET_ACTIVE_FRAME_TO_LAST, () => AppActions.setActiveFrame(self.props.browser.getIn(['frames', self.props.browser.get('frames').size - 1]))) loadOpenSearch().then(searchDetail => AppActions.setSearchDetail(searchDetail)) diff --git a/js/components/urlBar.js b/js/components/urlBar.js index 6ca85515673..1c159408341 100644 --- a/js/components/urlBar.js +++ b/js/components/urlBar.js @@ -12,23 +12,24 @@ const cx = require('../lib/classSet.js') const ipc = global.require('electron').ipcRenderer const UrlBarSuggestions = require('./urlBarSuggestions.js') +const messages = require('../constants/messages') import {isUrl} from '../lib/appUrlUtil.js' class UrlBar extends ImmutableComponent { constructor () { super() - ipc.on('shortcut-focus-url', () => { + ipc.on(messages.SHORTCUT_FOCUS_URL, () => { AppActions.setNavBarFocused(true) AppActions.setUrlBarAutoselected(true) }) // escape key handling - ipc.on('shortcut-active-frame-stop', () => { + ipc.on(messages.SHORTCUT_ACTIVE_FRAME_STOP, () => { this.restore() AppActions.setUrlBarAutoselected(true) AppActions.setUrlBarActive(true) }) - process.on('focus-urlbar', () => { + process.on(messages.FOCUS_URLBAR, () => { this.updateDOMInputFocus(true) }) } diff --git a/js/constants/messages.js b/js/constants/messages.js new file mode 100644 index 00000000000..43eb697248c --- /dev/null +++ b/js/constants/messages.js @@ -0,0 +1,43 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +const _ = null +const messages = { + // URL bar shortcuts + SHORTCUT_FOCUS_URL: _, + FOCUS_URLBAR: _, + // Active frame shortcuts + SHORTCUT_ACTIVE_FRAME_STOP: _, + SHORTCUT_ACTIVE_FRAME_RELOAD: _, + SHORTCUT_ACTIVE_FRAME_ZOOM_IN: _, + SHORTCUT_ACTIVE_FRAME_ZOOM_OUT: _, + SHORTCUT_ACTIVE_FRAME_RESET: _, + SHORTCUT_ACTIVE_FRAME_TOGGLE_DEV_TOOLS: _, + SHORTCUT_SET_ACTIVE_FRAME_BY_INDEX: _, /** @arg {number} index of frame */ + SHORTCUT_ACTIVE_FRAME_VIEW_SOURCE: _, + SHORTCUT_SET_ACTIVE_FRAME_TO_LAST: _, + // Frame management shortcuts + SHORTCUT_NEW_FRAME: _, /** @arg {string} opt_url to load if any */ + SHORTCUT_CLOSE_FRAME: _, + SHORTCUT_UNDO_CLOSED_FRAME: _, + SHORTCUT_FRAME_MUTE: _, + SHORTCUT_FRAME_RELOAD: _, /** @arg {number} key of frame */ + SHORTCUT_NEXT_TAB: _, + SHORTCUT_PREV_TAB: _, + // Window management + CLOSE_WINDOW: _, + NEW_WINDOW: _, + // Misc + CONTEXT_MENU_OPENED: _, + QUIT_APPLICATION: _, + // Updates + UPDATE_REQUESTED: _, + UPDATE_AVAILABLE: _, + UPDATE_NOT_AVAILABLE: _, + CHECK_FOR_UPDATE: _ +} + +Object.keys(messages).forEach((k) => messages[k] = k.toLowerCase().replace(/_/g, '-')) + +module.exports = messages diff --git a/js/contextMenus.js b/js/contextMenus.js index d88b55da2ad..7fe628bd127 100644 --- a/js/contextMenus.js +++ b/js/contextMenus.js @@ -4,6 +4,7 @@ const remote = require('remote') const Menu = remote.require('menu') +const messages = require('./constants/messages') function tabTemplateInit (tabKey) { return [ @@ -11,7 +12,7 @@ function tabTemplateInit (tabKey) { label: 'Reload tab', click: (item, focusedWindow) => { if (focusedWindow) { - focusedWindow.webContents.send('shortcut-frame-reload', tabKey) + focusedWindow.webContents.send(messages.SHORTCUT_FRAME_RELOAD, tabKey) } } }, { @@ -30,7 +31,7 @@ function tabTemplateInit (tabKey) { click: (item, focusedWindow) => { if (focusedWindow) { // TODO: Don't switch active tabs when this is called - focusedWindow.webContents.send('shortcut-close-frame', tabKey) + focusedWindow.webContents.send(messages.SHORTCUT_CLOSE_FRAME, tabKey) } } } @@ -43,14 +44,14 @@ function mainTemplateInit (nodeName) { label: 'Reload', click: (item, focusedWindow) => { if (focusedWindow) { - focusedWindow.webContents.send('shortcut-active-frame-reload') + focusedWindow.webContents.send(messages.SHORTCUT_ACTIVE_FRAME_RELOAD) } } }, { label: 'View Page Source', click: (item, focusedWindow) => { if (focusedWindow) { - focusedWindow.webContents.send('shortcut-active-frame-view-source') + focusedWindow.webContents.send(messages.SHORTCUT_ACTIVE_FRAME_VIEW_SOURCE) } } }, { diff --git a/js/stores/appStore.js b/js/stores/appStore.js index d1e0254a03b..b295a641ec7 100644 --- a/js/stores/appStore.js +++ b/js/stores/appStore.js @@ -8,6 +8,7 @@ const AppConstants = require('../constants/appConstants') const Immutable = require('immutable') const FrameStateUtil = require('../state/frameStateUtil') const ipc = global.require('electron').ipcRenderer +const messages = require('../constants/messages') // For this simple example, store immutable data object for a simple counter. // This is of course very silly, but this is just for an app template with top @@ -290,7 +291,7 @@ AppDispatcher.register((action) => { } }) -ipc.on('update-available', () => { +ipc.on(messages.UPDATE_AVAILABLE, () => { console.log('appStore update-available') appState = appState.merge({ updateAvailable: true @@ -298,13 +299,13 @@ ipc.on('update-available', () => { appStore.emitChange() }) -ipc.on('shortcut-next-tab', () => { +ipc.on(messages.SHORTCUT_NEXT_TAB, () => { appState = FrameStateUtil.makeNextFrameActive(appState) updateTabPageIndex(FrameStateUtil.getActiveFrame(appState)) appStore.emitChange() }) -ipc.on('shortcut-prev-tab', () => { +ipc.on(messages.SHORTCUT_PREV_TAB, () => { appState = FrameStateUtil.makePrevFrameActive(appState) updateTabPageIndex(FrameStateUtil.getActiveFrame(appState)) appStore.emitChange() From 818e9270e69e5cb0d9dd57651e5790518d5b1a8c Mon Sep 17 00:00:00 2001 From: yan Date: Fri, 18 Dec 2015 16:28:06 -0800 Subject: [PATCH 2/3] Add more annotations --- js/constants/messages.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/constants/messages.js b/js/constants/messages.js index 43eb697248c..6517bd7eab0 100644 --- a/js/constants/messages.js +++ b/js/constants/messages.js @@ -19,7 +19,7 @@ const messages = { SHORTCUT_SET_ACTIVE_FRAME_TO_LAST: _, // Frame management shortcuts SHORTCUT_NEW_FRAME: _, /** @arg {string} opt_url to load if any */ - SHORTCUT_CLOSE_FRAME: _, + SHORTCUT_CLOSE_FRAME: _, /** @arg {number} opt_key of frame, defaults to active frame */ SHORTCUT_UNDO_CLOSED_FRAME: _, SHORTCUT_FRAME_MUTE: _, SHORTCUT_FRAME_RELOAD: _, /** @arg {number} key of frame */ @@ -29,7 +29,7 @@ const messages = { CLOSE_WINDOW: _, NEW_WINDOW: _, // Misc - CONTEXT_MENU_OPENED: _, + CONTEXT_MENU_OPENED: _, /** @arg {string} nodeName of node being clicked */ QUIT_APPLICATION: _, // Updates UPDATE_REQUESTED: _, From 035d04b757e08498f8bdf0d7734c9ea0fe6f5b48 Mon Sep 17 00:00:00 2001 From: yan Date: Fri, 18 Dec 2015 17:12:19 -0800 Subject: [PATCH 3/3] s/SHORTCUT_ACTIVE_FRAME_RESET/SHORTCUT_ACTIVE_FRAME_ZOOM_RESET --- app/localShortcuts.js | 2 +- js/constants/messages.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/localShortcuts.js b/app/localShortcuts.js index 9b43d825128..84e11cd432e 100644 --- a/app/localShortcuts.js +++ b/app/localShortcuts.js @@ -24,7 +24,7 @@ module.exports.register = (win) => { ['CmdOrCtrl+R', messages.SHORTCUT_ACTIVE_FRAME_RELOAD], ['CmdOrCtrl+=', messages.SHORTCUT_ACTIVE_FRAME_ZOOM_IN], ['CmdOrCtrl+-', messages.SHORTCUT_ACTIVE_FRAME_ZOOM_OUT], - ['CmdOrCtrl+0', messages.SHORTCUT_ACTIVE_FRAME_RESET], + ['CmdOrCtrl+0', messages.SHORTCUT_ACTIVE_FRAME_ZOOM_RESET], ['CmdOrCtrl+Alt+I', messages.SHORTCUT_ACTIVE_FRAME_TOGGLE_DEV_TOOLS] ] diff --git a/js/constants/messages.js b/js/constants/messages.js index 6517bd7eab0..e65fd81a57f 100644 --- a/js/constants/messages.js +++ b/js/constants/messages.js @@ -12,7 +12,7 @@ const messages = { SHORTCUT_ACTIVE_FRAME_RELOAD: _, SHORTCUT_ACTIVE_FRAME_ZOOM_IN: _, SHORTCUT_ACTIVE_FRAME_ZOOM_OUT: _, - SHORTCUT_ACTIVE_FRAME_RESET: _, + SHORTCUT_ACTIVE_FRAME_ZOOM_RESET: _, SHORTCUT_ACTIVE_FRAME_TOGGLE_DEV_TOOLS: _, SHORTCUT_SET_ACTIVE_FRAME_BY_INDEX: _, /** @arg {number} index of frame */ SHORTCUT_ACTIVE_FRAME_VIEW_SOURCE: _,