mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-19 21:58:29 +01:00
chore(suite-desktop): F5/cmd+R to reload app
This commit is contained in:
@@ -54,7 +54,9 @@ Available shortcuts:
|
||||
|
||||
| name | commands |
|
||||
| --------------------- | ---------------------------------------------------- |
|
||||
| Reload app (renderer) | F5, Ctrl+R, Cmd+R |
|
||||
| Open DevTools | F12, Cmd+Shift+I,Ctrl+Shift+I, Cmd+Alt+I, Ctrl+Alt+I |
|
||||
|
||||
## Runtime flags
|
||||
|
||||
Runtime flags can be used when running the Suite Desktop executable, enabling or disabling certain features. For example: `./Trezor-Suite-22.7.2.AppImage --open-devtools` will run with this flag turned on, which will result in opening DevTools on app launch.
|
||||
|
||||
@@ -18,14 +18,12 @@ const init: Module = ({ mainWindow }) => {
|
||||
});
|
||||
});
|
||||
|
||||
electronLocalshortcut.register(mainWindow, 'F5', () => {
|
||||
logger.info('shortcuts', 'F5 pressed');
|
||||
mainWindow.loadURL(APP_SRC);
|
||||
});
|
||||
|
||||
electronLocalshortcut.register(mainWindow, 'CommandOrControl+R', () => {
|
||||
logger.info('shortcuts', 'CTRL+R pressed');
|
||||
mainWindow.loadURL(APP_SRC);
|
||||
const reloadAppShortcuts = ['F5', 'CommandOrControl+R'];
|
||||
reloadAppShortcuts.forEach(shortcut => {
|
||||
electronLocalshortcut.register(mainWindow, shortcut, () => {
|
||||
logger.info('shortcuts', `${shortcut} pressed to reload app`);
|
||||
mainWindow.webContents.reload();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user