-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new confirmation dialog after adding a directory
- Loading branch information
Showing
10 changed files
with
336 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<script lang="ts"> | ||
import { hideDialog } from "../api/client"; | ||
type ButtonColor = "blue" | "gray"; | ||
export let title: string; | ||
export let yesColor: ButtonColor = "blue"; | ||
export let noColor: ButtonColor = "gray"; | ||
export let onConfirm: () => Promise<void>; | ||
</script> | ||
|
||
|
||
<div class="dialog-holder"> | ||
<div class="dialog"> | ||
<p class="dialog-title">{title}</p> | ||
<button class={yesColor} on:click={async () => await onConfirm()}>Yes</button> | ||
<button class={noColor} on:click={() => { | ||
hideDialog(); | ||
}}>No</button> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
.dialog-holder { | ||
display: flex; | ||
width: 100%; | ||
height: 100%; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
.dialog { | ||
text-align: center; | ||
background-color: rgb(27, 27, 27); | ||
border-radius: 8px 8px 8px 8px; | ||
border-left: 4px solid rgb(101, 255, 242); | ||
width: 50%; | ||
height: auto; | ||
padding-bottom: 16px; | ||
} | ||
.dialog-title { | ||
font-size: 24px; | ||
} | ||
.blue { | ||
cursor: pointer; | ||
background-color: rgb(101, 255, 242); | ||
} | ||
.gray { | ||
cursor: pointer; | ||
color: white; | ||
background-color: rgb(68, 68, 68); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="fade"> | ||
<slot/> | ||
</div> | ||
|
||
<style> | ||
.fade { | ||
user-select: none; | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
background-color: rgba(0, 0, 0, 0.39); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<script lang="ts"> | ||
import MdInfoOutline from "svelte-icons/md/MdInfoOutline.svelte"; | ||
export let launchingText: string; | ||
export let launching: boolean; | ||
</script> | ||
|
||
<div class={`instance-popup ${launching ? 'show' : ''}`}> | ||
<p>{launchingText}</p> | ||
<div class="instance-icon"> | ||
<MdInfoOutline/> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
.instance-popup { | ||
visibility: hidden; | ||
transform: scale(0, 0); | ||
position: absolute; | ||
background-color: rgb(27, 27, 27); | ||
border-radius: 8px 8px 8px 8px; | ||
border-left: 4px solid rgb(101, 255, 242); | ||
right: 20px; | ||
bottom: 20px; | ||
width: 400px; | ||
height: 80px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
.instance-popup.show { | ||
animation-name: show; | ||
animation-duration: 6s; | ||
} | ||
@keyframes show { | ||
0% { | ||
visibility: hidden; | ||
transform: scale(0, 0); | ||
} | ||
5% { | ||
visibility: visible; | ||
transform: scale(1, 1); | ||
} | ||
95% { | ||
visibility: visible; | ||
transform: scale(1, 1); | ||
} | ||
100% { | ||
visibility: hidden; | ||
transform: scale(0, 0); | ||
} | ||
} | ||
.instance-icon { | ||
width: 50px; | ||
height: 50px; | ||
margin-right: 10px; | ||
color: rgb(101, 255, 242); | ||
} | ||
.instance-popup p { | ||
font-size: 20px; | ||
font-weight: bolder; | ||
margin-left: 8px; | ||
margin-top: 16px; | ||
} | ||
</style> |
Oops, something went wrong.