1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[PM-3680] Remove ipcRenderer from desktop-theming.service (#6478)

This commit is contained in:
Daniel García
2023-10-13 12:20:27 +02:00
committed by GitHub
parent 67fa1e06d0
commit 3dab77ba9e
2 changed files with 8 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
import { ipcRenderer } from "electron";
import { DeviceType } from "@bitwarden/common/enums/device-type.enum";
import { DeviceType, ThemeType } from "@bitwarden/common/enums";
import { isDev, isWindowsStore } from "../utils";
@@ -12,6 +12,11 @@ export default {
isDev: isDev(),
isWindowsStore: isWindowsStore(),
reloadProcess: () => ipcRenderer.send("reload-process"),
getSystemTheme: (): Promise<ThemeType> => ipcRenderer.invoke("systemTheme"),
onSystemThemeUpdated: (callback: (theme: ThemeType) => void) => {
ipcRenderer.on("systemThemeUpdated", (_event, theme: ThemeType) => callback(theme));
},
};
function deviceType(): DeviceType {