This commit is contained in:
BhagwanSingh 2025-11-27 16:34:42 +05:30
parent 0ae8f6185a
commit 345822885f
2 changed files with 57 additions and 28 deletions

View File

@ -4,26 +4,59 @@
<style>
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #ffffff;
font-family: Arial, sans-serif;
}
.loader {
width: 50px;
height: 50px;
border: 5px solid #e0e0e0;
.loader-container {
position: relative;
width: 100px;
height: 100px;
}
/* Circular spinner */
.loader-ring {
width: 100%;
height: 100%;
border: 6px solid #e0e0e0;
border-top-color: #6a5acd;
border-radius: 50%;
animation: spin 1s linear infinite;
}
/* Logo in center */
.loader-logo {
position: absolute;
inset: 0;
display: flex;
justify-content: center;
align-items: center;
}
.loader-logo img {
width: 45px;
height: 45px;
object-fit: contain;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
</style>
</head>
<body>
<div class="loader"></div>
<div class="loader-container">
<div class="loader-ring"></div>
<!-- Place your logo here -->
<div class="loader-logo">
<img src="your-logo.png" alt="App Logo">
</div>
</div>
</body>
</html>

View File

@ -78,10 +78,6 @@ app.on("ready", async () => {
);
// Create the main window
const win = new BrowserWindow({
width: 500,
@ -92,7 +88,7 @@ app.on("ready", async () => {
maximizable: false,
closable: true,
alwaysOnTop: true,
skipTaskbar: true,
// skipTaskbar: true,
autoHideMenuBar: true,
frame: true,
show: false,
@ -149,7 +145,7 @@ app.on("ready", async () => {
// ------------------------------------
// HANDLE CLOSE EVENTS
// ------------------------------------
handleCloseEvents(win);
// handleCloseEvents(win);
});
@ -173,28 +169,28 @@ app.on("ready", async () => {
// ---------------------------
// CUSTOM CLOSE BEHAVIOR
// ---------------------------
function handleCloseEvents(window: BrowserWindow) {
let willClose = false;
// function handleCloseEvents(window: BrowserWindow) {
// let willClose = false;
window.on("close", (e) => {
if (willClose) return;
// window.on("close", (e) => {
// if (willClose) return;
e.preventDefault();
window.hide();
// e.preventDefault();
// window.hide();
if (app.dock) {
app.dock.hide();
}
});
// if (app.dock) {
// app.dock.hide();
// }
// });
app.on("before-quit", () => {
willClose = true;
});
// app.on("before-quit", () => {
// willClose = true;
// });
window.on("show", () => {
willClose = false;
});
}
// window.on("show", () => {
// willClose = false;
// });
// }
// ---------------------------
// GET MAIN WINDOW EXPORT