Skip to content

Commit

Permalink
Added Confirmation Dialog Before Closing The App
Browse files Browse the repository at this point in the history
  • Loading branch information
sandunwira committed Sep 17, 2023
1 parent 6f5ea69 commit 967e441
Show file tree
Hide file tree
Showing 84 changed files with 382 additions and 130 deletions.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "lumina"
version = "1.1.0"
version = "1.2.0"
description = "An opensource app to achieve relaxation and mindfulness"
authors = ["KoolApps Team"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "Lumina",
"version": "1.1.0"
"version": "1.2.0"
},
"tauri": {
"allowlist": {
Expand Down
8 changes: 4 additions & 4 deletions src/app.css
Expand Up @@ -51,8 +51,8 @@ button {
font-size: medium;
padding: 10px 20px;
color: #ECECEC;
background: #56afe7;
border: 2px solid #56afe7;
background: #56AFE7;
border: 2px solid #56AFE7;
border-radius: 8px;
transition: 0.5s
}
Expand Down Expand Up @@ -83,7 +83,7 @@ button:hover {
background: #242424;
border: 3px solid #6590BB;
border-radius: 10px;
filter: drop-shadow(0 0 30px #6590bb51);
filter: drop-shadow(0 0 30px #6590BB51);
}
.iframeControls {
display: flex;
Expand Down Expand Up @@ -112,7 +112,7 @@ abbr:hover {
box-shadow: none;
}
50% {
box-shadow: inset 0px 0px 500px #2f455a;
box-shadow: inset 0px 0px 500px #2F455A;
}
100% {
box-shadow: none;
Expand Down
4 changes: 4 additions & 0 deletions src/breathe.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
45 changes: 40 additions & 5 deletions src/css/dialog.css
Expand Up @@ -26,7 +26,7 @@ dialog {
height: 100%;
}
.dialogContainer p{
color: #9e9e9e;
color: #9E9E9E;
font-size: 10px;
text-align: justify;
text-align-last: center;
Expand Down Expand Up @@ -54,7 +54,7 @@ dialog {
}
.dialogTitle button:hover {
color: #ECECEC;
background: #ff1616;
background: #FF1616;
transition: 0.2s;
}

Expand All @@ -63,7 +63,7 @@ dialog {
}
.dialogImg img {
height: 50px;
filter: drop-shadow(0 0 8px #78abd867);
filter: drop-shadow(0 0 8px #78ABD867);
}

.dialogDesc {
Expand Down Expand Up @@ -100,8 +100,43 @@ dialog {
}

.dialogFooter p {
color: #9e9e9e;
color: #9E9E9E;
font-size: 10px;
text-align: justify;
text-align-last: center;
}
}




#closeDialog {
height: 300px;
}

#closeDialog form{
width: 80%;
}

#closeDialog h1{
margin-bottom: 40px;
text-align: center;
font-size: 24px;
}


.closeButtons{
gap: 25px;
}

.closeButtons button{
outline: none;
width: 130px;
height: 45px;
}


#dialogCloseBtn:hover{
background: #bb1d0f;
border: 2px solid #ECECEC;
transition: 0.3s;
}
24 changes: 14 additions & 10 deletions src/css/main.css
Expand Up @@ -28,7 +28,7 @@
}
#timeIcon i {
font-size: 60px;
color: #34a1e4;
color: #34A1E4;
}

#greetingContainer {
Expand All @@ -43,8 +43,12 @@
#greetingLocation {
font-size: 18px;
letter-spacing: 1px;
-webkit-text-stroke: 1px #56afe7;
color: #56afe7;
-webkit-text-stroke: 1px #56AFE7;
color: #56AFE7;
}
#greetingLocation i{
font-size: 12px;
-webkit-text-stroke: 0;
}

.homeScreenTime h1 {
Expand Down Expand Up @@ -78,7 +82,7 @@
}

#sectionCard p {
color: #56afe7;
color: #56AFE7;
height: 125%;
width: 100%;
font-family: 'GilroyExtraBold', sans-serif;
Expand All @@ -95,7 +99,7 @@
}
.lockScreenTime h1 {
font-size: 85px;
color: #56afe7;
color: #56AFE7;
font-family: 'GilroyExtraBold', sans-serif;
}
.lockScreenDate h1 {
Expand Down Expand Up @@ -242,8 +246,8 @@
}

#storyCard:hover p {
color: #ffffff;
background: linear-gradient(45deg, #0c243390, #1c71a590);
color: #FFFFFF;
background: linear-gradient(45deg, #0C243390, #1C71A590);
backdrop-filter: blur(8px);
border-radius: 10px;
visibility: visible;
Expand Down Expand Up @@ -292,8 +296,8 @@
}

#gamecard:hover p {
color: #ffffff;
background: linear-gradient(45deg, #0c243390, #1c71a590);
color: #FFFFFF;
background: linear-gradient(45deg, #0C243390, #1C71A590);
backdrop-filter: blur(8px);
border-radius: 10px;
visibility: visible;
Expand Down Expand Up @@ -347,7 +351,7 @@
border: none;
}
.navigation button:hover {
background: #3f81aa;
background: #3F81AA;
}

#myVideo {
Expand Down
4 changes: 4 additions & 0 deletions src/games.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/games/BullsEye.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="../js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="../js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/games/CatJumper.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="../js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="../js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/games/ClickOnTheCircle.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="../js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="../js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/games/CubNPup.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="../js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="../js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/games/Minesweeper.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="../js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="../js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/games/RememberCard.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="../js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="../js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/games/RockPaperScissors.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="../js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="../js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/games/SnakesAndLadders.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="../js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="../js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/games/TheCube.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="../js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="../js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/games/TicTacToe.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="../js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="../js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/games/TiltingMaze.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="../js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="../js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/games/TowerBlocks.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="../js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="../js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/home.html
Expand Up @@ -27,6 +27,10 @@
<dialog id="helpDialog"></dialog>
<script src="js/aboutDialog.js"></script>
<!--==================================================== DIALOG END -->
<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Titlebar Start ================================================-->
<div class="titlebar" id="titlebar"></div>
Expand Down
8 changes: 7 additions & 1 deletion src/index.html
Expand Up @@ -8,6 +8,7 @@
<link rel="stylesheet" href="app.css">
<link rel="stylesheet" href="css/titlebar.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/dialog.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">

<script type="module" src="/main.js" defer></script>
Expand All @@ -21,6 +22,11 @@

<body>

<!-- DIALOG START ==================================================-->
<dialog id="closeDialog"></dialog>
<script src="js/closeDialog.js"></script>
<!--==================================================== DIALOG END -->

<!-- Header Start ==================================================-->
<div class="banner flexContainer flexCol" id="lockScreen">

Expand All @@ -42,7 +48,7 @@
<button id="playPauseBtn" title="Toggle Music On/Off" class="pause" oncontextmenu="window.location.reload();">
<i class="fa-solid fa-music"></i>
</button>
<button id="quitBtn" title="Quit">
<button id="quitBtn" title="Quit" onclick="closeDialog.showModal();">
<i class="fa-solid fa-power-off"></i>
</button>
<button id="loginBtn" title="Continue" onclick="window.location.href='./home.html'">
Expand Down

0 comments on commit 967e441

Please sign in to comment.