mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make back/forward/refresh work the same as the arrow button in topbar (#3720)
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
parent
40a2d9e05c
commit
d6d66682f6
@ -188,14 +188,14 @@ export function buildMenu(windowManager: WindowManager) {
|
||||
label: "Back",
|
||||
accelerator: "CmdOrCtrl+[",
|
||||
click() {
|
||||
webContents.getFocusedWebContents()?.goBack();
|
||||
webContents.getAllWebContents().filter(wc => wc.getType() === "window").forEach(wc => wc.goBack());
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Forward",
|
||||
accelerator: "CmdOrCtrl+]",
|
||||
click() {
|
||||
webContents.getFocusedWebContents()?.goForward();
|
||||
webContents.getAllWebContents().filter(wc => wc.getType() === "window").forEach(wc => wc.goForward());
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -243,8 +243,10 @@ export class WindowManager extends Singleton {
|
||||
if (frameInfo) {
|
||||
this.sendToView({ channel: IpcRendererNavigationEvents.RELOAD_PAGE, frameInfo });
|
||||
} else {
|
||||
webContents.getFocusedWebContents()?.reload();
|
||||
webContents.getFocusedWebContents()?.clearHistory();
|
||||
webContents.getAllWebContents().filter(wc => wc.getType() === "window").forEach(wc => {
|
||||
wc.reload();
|
||||
wc.clearHistory();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user