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
@@ -3,11 +3,12 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { FileFilter, OpenDialogOptions, remote } from "electron";
|
||||
import type { FileFilter, OpenDialogOptions } from "electron";
|
||||
import { observer } from "mobx-react";
|
||||
import React from "react";
|
||||
import { cssNames } from "../../utils";
|
||||
import { Button } from "../button";
|
||||
import { requestOpenFilePickingDialog } from "../../ipc";
|
||||
|
||||
export interface PathPickOpts {
|
||||
label: string;
|
||||
@@ -29,8 +30,8 @@ export interface PathPickerProps extends PathPickOpts {
|
||||
export class PathPicker extends React.Component<PathPickerProps> {
|
||||
static async pick(opts: PathPickOpts) {
|
||||
const { onPick, onCancel, label, ...dialogOptions } = opts;
|
||||
const { dialog, BrowserWindow } = remote;
|
||||
const { canceled, filePaths } = await dialog.showOpenDialog(BrowserWindow.getFocusedWindow(), {
|
||||
|
||||
const { canceled, filePaths } = await requestOpenFilePickingDialog({
|
||||
message: label,
|
||||
...dialogOptions,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user