mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-20 01:33:56 +00:00
refactor: lint
This commit is contained in:
@@ -2,11 +2,11 @@ import { registerEvent } from "../register-event";
|
||||
import { WindowManager } from "@main/services";
|
||||
|
||||
const injectCSS = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
cssString: string
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
cssString: string
|
||||
) => {
|
||||
WindowManager.mainWindow?.webContents.send("css-injected", cssString);
|
||||
return;
|
||||
WindowManager.mainWindow?.webContents.send("css-injected", cssString);
|
||||
return;
|
||||
};
|
||||
|
||||
registerEvent("injectCSS", injectCSS);
|
||||
registerEvent("injectCSS", injectCSS);
|
||||
|
||||
@@ -3,8 +3,8 @@ import { themes } from "@main/level/sublevels/themes";
|
||||
import { Theme } from "@types";
|
||||
|
||||
const getActiveCustomTheme = async () => {
|
||||
const allThemes = await themes.values().all();
|
||||
return allThemes.find((theme: Theme) => theme.isActive);
|
||||
const allThemes = await themes.values().all();
|
||||
return allThemes.find((theme: Theme) => theme.isActive);
|
||||
};
|
||||
|
||||
registerEvent("getActiveCustomTheme", getActiveCustomTheme);
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { themes } from "@main/level/sublevels/themes";
|
||||
import { registerEvent } from "../register-event";
|
||||
|
||||
const getCustomThemeById = async (_event: Electron.IpcMainInvokeEvent, themeId: string) => {
|
||||
return await themes.get(themeId);
|
||||
const getCustomThemeById = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
themeId: string
|
||||
) => {
|
||||
return await themes.get(themeId);
|
||||
};
|
||||
|
||||
registerEvent("getCustomThemeById", getCustomThemeById);
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { WindowManager } from "@main/services";
|
||||
import { registerEvent } from "../register-event";
|
||||
|
||||
const openEditorWindow = async (_event: Electron.IpcMainInvokeEvent, themeId: string) => {
|
||||
const openEditorWindow = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
themeId: string
|
||||
) => {
|
||||
WindowManager.openEditorWindow(themeId);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user