This commit is contained in:
rosetta
2026-01-30 05:01:05 +02:00
commit 83f38dc63f
327 changed files with 18725 additions and 0 deletions

30
app/hooks/useWindow.ts Normal file
View File

@@ -0,0 +1,30 @@
// Desc: Custom hook to handle window resizing
export enum ElectronTheme {
SYSTEM = 'system',
DARK = 'dark',
LIGHT = 'light'
}
const useWindow = () => {
const setSize = (width : number, height : number) => {
window.api.send('window-resize', { width: width, height: height });
}
const setResizeble = (isResizeble : boolean) => {
window.api.send('window-resizeble', isResizeble);
}
const setTheme = (theme : ElectronTheme) => {
window.api.send('window-theme', theme);
}
return {
setSize,
setResizeble,
setTheme
}
}
export default useWindow;