mirror of
https://github.com/ivabus/gui
synced 2025-04-24 06:27:09 +03:00

* #127 intiialize custom title bar --------- Co-authored-by: neil <neil@neils-MacBook-Pro.local>
28 lines
615 B
JavaScript
28 lines
615 B
JavaScript
import { Titlebar } from "custom-electron-titlebar";
|
|
|
|
const isVite = () => {
|
|
try {
|
|
return window.location.href.includes("is-vite");
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
};
|
|
|
|
if (!isVite()) {
|
|
const { init } = window.require("@sentry/electron/renderer");
|
|
const SvelteSentry = window.require("@sentry/svelte");
|
|
init(
|
|
{
|
|
dsn: "https://5ff29bb5b3b64cd4bd4f4960ef1db2e3@o4504750197899264.ingest.sentry.io/4504750206746624",
|
|
debug: true
|
|
},
|
|
SvelteSentry.init
|
|
);
|
|
}
|
|
|
|
window.addEventListener("DOMContentLoaded", () => {
|
|
// Title bar implemenation
|
|
new Titlebar({
|
|
titleHorizontalAlignment: "left"
|
|
});
|
|
});
|