We are launching a docker version (server version) today so we want to just organize the repo so its easier to navigate.
18 lines
689 B
JavaScript
18 lines
689 B
JavaScript
if (window.electronAPI?.isElectron) {
|
|
document.documentElement.classList.add("electron");
|
|
}
|
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
document.documentElement.style.visibility = "visible";
|
|
if (!window.electronAPI?.isElectron) return;
|
|
document.body.classList.add("electron");
|
|
|
|
const titlebar = document.getElementById("titlebar");
|
|
if (!titlebar) return;
|
|
|
|
titlebar.style.display = "flex";
|
|
|
|
titlebar.querySelector(".min").onclick = () => window.electronAPI.win.minimize();
|
|
titlebar.querySelector(".max").onclick = () => window.electronAPI.win.maximize();
|
|
titlebar.querySelector(".close").onclick = () => window.electronAPI.win.close();
|
|
}); |