mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-23 02:41:02 +00:00
feat: close theme editor if the theme was deleted
This commit is contained in:
@@ -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");
|
||||
|
||||
11
src/main/events/themes/close-editor-window.ts
Normal file
11
src/main/events/themes/close-editor-window.ts
Normal 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);
|
||||
Reference in New Issue
Block a user