mirror of
https://github.com/bitwarden/browser
synced 2026-01-04 09:33:27 +00:00
[PM-3683] Remove ipcRenderer from electron-platform-utils (#6679)
* [PM-3683] Remove ipcRenderer from electron-platform-utils * FIx review comments * Formatting * Use isNullOrWhitespace
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
import * as path from "path";
|
||||
|
||||
import { app, dialog, ipcMain, Menu, MenuItem, nativeTheme, session, Notification } from "electron";
|
||||
import {
|
||||
app,
|
||||
dialog,
|
||||
ipcMain,
|
||||
Menu,
|
||||
MenuItem,
|
||||
nativeTheme,
|
||||
session,
|
||||
Notification,
|
||||
shell,
|
||||
} from "electron";
|
||||
|
||||
import { ThemeType } from "@bitwarden/common/enums";
|
||||
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
||||
import { SafeUrls } from "@bitwarden/common/platform/misc/safe-urls";
|
||||
|
||||
import { WindowMain } from "../main/window.main";
|
||||
import { RendererMenuItem } from "../utils";
|
||||
@@ -68,6 +79,12 @@ export class ElectronMainMessagingService implements MessagingService {
|
||||
alert.show();
|
||||
});
|
||||
|
||||
ipcMain.handle("launchUri", async (event, uri) => {
|
||||
if (SafeUrls.canLaunch(uri)) {
|
||||
shell.openExternal(uri);
|
||||
}
|
||||
});
|
||||
|
||||
nativeTheme.on("updated", () => {
|
||||
windowMain.win?.webContents.send(
|
||||
"systemThemeUpdated",
|
||||
|
||||
Reference in New Issue
Block a user