diff --git a/frontend/sass/index.scss b/frontend/sass/index.scss index e576ef2..78e4807 100644 --- a/frontend/sass/index.scss +++ b/frontend/sass/index.scss @@ -12,6 +12,10 @@ body { flex-direction: column; height: 100%; width: var(--nav-width); + + body.fullscreen & { + display: none; + } } #navigation > :not(#service-buttons) { diff --git a/frontend/ts/index.ts b/frontend/ts/index.ts index 3164032..022e535 100644 --- a/frontend/ts/index.ts +++ b/frontend/ts/index.ts @@ -834,4 +834,9 @@ function setContextMenu(webContents: WebContents) { window: remote.getCurrentWindow(), }); }); -} \ No newline at end of file +} + +ipcRenderer.on('fullscreenchange', (e, fullscreen) => { + if (fullscreen) document.body.classList.add('fullscreen'); + else document.body.classList.remove('fullscreen'); +}); diff --git a/src/windows/MainWindow.ts b/src/windows/MainWindow.ts index 70ea2f7..7e91f82 100644 --- a/src/windows/MainWindow.ts +++ b/src/windows/MainWindow.ts @@ -129,6 +129,13 @@ export default class MainWindow extends Window { } }); + window.on('enter-full-screen', () => { + window.webContents.send('fullscreenchange', true); + }); + window.on('leave-full-screen', () => { + window.webContents.send('fullscreenchange', false); + }); + // Load navigation view window.loadFile(path.resolve(Meta.RESOURCES_PATH, 'index.html')) .catch(console.error);