feat: close theme editor if the theme was deleted

This commit is contained in:
Hachi-R
2025-01-30 09:43:58 -03:00
parent d91d8dd26f
commit 964e9bbb2b
7 changed files with 30 additions and 0 deletions

View File

@@ -83,6 +83,7 @@ import "./themes/open-editor-window";
import "./themes/get-custom-theme-by-id";
import "./themes/get-active-custom-theme";
import "./themes/css-injector";
import "./themes/close-editor-window";
import { isPortableVersion } from "@main/helpers";
ipcMain.handle("ping", () => "pong");

View File

@@ -0,0 +1,11 @@
import { WindowManager } from "@main/services";
import { registerEvent } from "../register-event";
const closeEditorWindow = async (
_event: Electron.IpcMainInvokeEvent,
themeId?: string
) => {
WindowManager.closeEditorWindow(themeId);
};
registerEvent("closeEditorWindow", closeEditorWindow);