mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Upgrade to Electron 14.2.4 (#4625)
Co-authored-by: Sebastian Malton <sebastian@malton.name> Co-authored-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
58 files changed
+545
-418
No files matched your search
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { dialogShowOpenDialogHandler, requestMain } from "../../common/ipc";
|
||||
|
||||
export async function showOpenDialog(options: Electron.OpenDialogOptions): Promise<Electron.OpenDialogReturnValue> {
|
||||
return requestMain(dialogShowOpenDialogHandler, options);
|
||||
}
|
||||
@@ -3,32 +3,10 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { webContents } from "@electron/remote";
|
||||
import { reaction } from "mobx";
|
||||
import { broadcastMessage } from "../../common/ipc";
|
||||
import { emitWindowLocationChanged } from "../ipc";
|
||||
import { navigation } from "../navigation";
|
||||
|
||||
export function watchHistoryState() {
|
||||
return reaction(() => navigation.location, () => {
|
||||
const getAllWebContents = webContents.getAllWebContents();
|
||||
|
||||
const canGoBack = getAllWebContents.some((webContent) => {
|
||||
if (webContent.getType() === "window") {
|
||||
return webContent.canGoBack();
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
const canGoForward = getAllWebContents.some((webContent) => {
|
||||
if (webContent.getType() === "window") {
|
||||
return webContent.canGoForward();
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
broadcastMessage("history:can-go-back", canGoBack);
|
||||
broadcastMessage("history:can-go-forward", canGoForward);
|
||||
});
|
||||
return reaction(() => navigation.location, emitWindowLocationChanged);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import * as dialog from "./dialog";
|
||||
|
||||
export { dialog };
|
||||
Reference in new issue
Block a user