mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Allowing to copy text from About dialog (#5335)
This commit is contained in:
parent
f2e070c92d
commit
fdf65e8ab6
@ -10,10 +10,7 @@ import { broadcastMessage } from "../../common/ipc";
|
|||||||
import { openBrowser } from "../../common/utils";
|
import { openBrowser } from "../../common/utils";
|
||||||
import { showAbout } from "./menu";
|
import { showAbout } from "./menu";
|
||||||
import windowManagerInjectable from "../window-manager.injectable";
|
import windowManagerInjectable from "../window-manager.injectable";
|
||||||
import type {
|
import type { MenuItemConstructorOptions } from "electron";
|
||||||
BrowserWindow,
|
|
||||||
MenuItem,
|
|
||||||
MenuItemConstructorOptions } from "electron";
|
|
||||||
import {
|
import {
|
||||||
webContents,
|
webContents,
|
||||||
} from "electron";
|
} from "electron";
|
||||||
@ -69,8 +66,8 @@ const applicationMenuItemsInjectable = getInjectable({
|
|||||||
{
|
{
|
||||||
label: `About ${productName}`,
|
label: `About ${productName}`,
|
||||||
id: "about",
|
id: "about",
|
||||||
click(menuItem: MenuItem, browserWindow: BrowserWindow) {
|
click() {
|
||||||
showAbout(browserWindow);
|
showAbout();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
...ignoreIf(autoUpdateDisabled, [
|
...ignoreIf(autoUpdateDisabled, [
|
||||||
@ -286,8 +283,8 @@ const applicationMenuItemsInjectable = getInjectable({
|
|||||||
{
|
{
|
||||||
label: `About ${productName}`,
|
label: `About ${productName}`,
|
||||||
id: "about",
|
id: "about",
|
||||||
click(menuItem: MenuItem, browserWindow: BrowserWindow) {
|
click() {
|
||||||
showAbout(browserWindow);
|
showAbout();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
...ignoreIf(autoUpdateDisabled, [
|
...ignoreIf(autoUpdateDisabled, [
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import type { BrowserWindow } from "electron";
|
|
||||||
import { app, dialog, Menu } from "electron";
|
import { app, dialog, Menu } from "electron";
|
||||||
import type { IComputedValue } from "mobx";
|
import type { IComputedValue } from "mobx";
|
||||||
import { autorun } from "mobx";
|
import { autorun } from "mobx";
|
||||||
@ -20,7 +19,7 @@ export function initMenu(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function showAbout(browserWindow: BrowserWindow) {
|
export function showAbout() {
|
||||||
const appInfo = [
|
const appInfo = [
|
||||||
`${appName}: ${app.getVersion()}`,
|
`${appName}: ${app.getVersion()}`,
|
||||||
`Electron: ${process.versions.electron}`,
|
`Electron: ${process.versions.electron}`,
|
||||||
@ -29,7 +28,7 @@ export function showAbout(browserWindow: BrowserWindow) {
|
|||||||
packageJson.copyright,
|
packageJson.copyright,
|
||||||
];
|
];
|
||||||
|
|
||||||
dialog.showMessageBoxSync(browserWindow, {
|
dialog.showMessageBoxSync({
|
||||||
title: `${isWindows ? " ".repeat(2) : ""}${appName}`,
|
title: `${isWindows ? " ".repeat(2) : ""}${appName}`,
|
||||||
type: "info",
|
type: "info",
|
||||||
buttons: ["Close"],
|
buttons: ["Close"],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user