mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: close theme editor if the theme was deleted
This commit is contained in:
parent
d91d8dd26f
commit
964e9bbb2b
7 changed files with 30 additions and 0 deletions
1
src/renderer/src/declaration.d.ts
vendored
1
src/renderer/src/declaration.d.ts
vendored
|
|
@ -285,6 +285,7 @@ declare global {
|
|||
onCssInjected: (
|
||||
cb: (cssString: string) => void
|
||||
) => () => Electron.IpcRenderer;
|
||||
closeEditorWindow: (themeId?: string) => Promise<void>;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ export const DeleteAllThemesModal = ({
|
|||
}
|
||||
|
||||
await window.electron.deleteAllCustomThemes();
|
||||
await window.electron.closeEditorWindow();
|
||||
onClose();
|
||||
onThemesDeleted();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ export const DeleteThemeModal = ({
|
|||
}
|
||||
|
||||
await window.electron.deleteCustomTheme(themeId);
|
||||
await window.electron.closeEditorWindow(themeId);
|
||||
onThemeDeleted();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue