refactor: lint

This commit is contained in:
Hachi-R
2025-01-29 03:46:59 -03:00
parent 5a19e9fd12
commit b56fc4d888
13 changed files with 81 additions and 63 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);
};

View File

@@ -230,16 +230,11 @@ export class WindowManager {
`${process.env["ELECTRON_RENDERER_URL"]}#/editor?themeId=${themeId}`
);
} else {
editorWindow.loadFile(
path.join(__dirname, "../renderer/index.html"),
{
hash: "editor",
}
);
editorWindow.loadFile(path.join(__dirname, "../renderer/index.html"), {
hash: "editor",
});
}
editorWindow.once("ready-to-show", () => {
editorWindow.show();
});