diff options
author | Jakob Stendahl <14180120+JakobST1n@users.noreply.github.com> | 2021-10-11 20:02:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 20:02:04 +0200 |
commit | c67531161e56488166a33232f87566309ba8676e (patch) | |
tree | 846e59a020e80bea48557d5a06af5728e44961ff /src_frontend/Components/Editor/TopBar.svelte | |
parent | e6880cd8ccf82d993f222cb14b4860581654acb8 (diff) | |
parent | c1b6eec770b885a9829e1f62bad5cc99389ca429 (diff) | |
download | Luxcena-Neo-c67531161e56488166a33232f87566309ba8676e.tar.gz Luxcena-Neo-c67531161e56488166a33232f87566309ba8676e.zip |
Merge pull request #24 from JakobST1n/rebuild
v1.0.0
Diffstat (limited to 'src_frontend/Components/Editor/TopBar.svelte')
-rw-r--r-- | src_frontend/Components/Editor/TopBar.svelte | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src_frontend/Components/Editor/TopBar.svelte b/src_frontend/Components/Editor/TopBar.svelte new file mode 100644 index 0000000..c74adf0 --- /dev/null +++ b/src_frontend/Components/Editor/TopBar.svelte @@ -0,0 +1,62 @@ +<script> + import { createEventDispatcher } from 'svelte'; + import { pop } from "svelte-spa-router"; + import PrettyVar from "../../ComponentLib/PrettyVar.svelte"; + + const dispatch = createEventDispatcher(); + + export let modeId; + export let hasChange = false; + export let procIsRunning = false; +</script> + +<style> + .topbar { + display: flex; + background-color: #444242; + height: 35px; + box-sizing: border-box; + padding: 10px; + font-size: 12px; + color: white; + } + .topbar .title { margin: auto; } + .savestatus { + font-size: 10px; + color: var(--grey-400); + } + button { + background: #444242; + border: none; + color: white; + } + button i { + margin-right: 5px; + } + button:hover { + filter: brightness(0.95); + } + button:active { + filter: brightness(0.90); + } +</style> + +<div class="topbar"> + <div><button on:click={() => dispatch("closedebugger")}><i class="fas fa-chevron-left"></i></button></div> + <div class="title"> + <span class="filename"><PrettyVar varText={modeId} /></span> + <span class="savestatus"> + {#if hasChange} + (not saved) + {/if} + </span> + </div> + <div> + {#if procIsRunning} + <button on:click={() => dispatch("restart")}><i class="fas fa-sync-alt"></i>Restart</button> + <button on:click={() => dispatch("stop")}><i class="fas fa-stop"></i>Stop</button> + {:else} + <button on:click={() => dispatch("start")}><i class="fas fa-play"></i>Start</button> + {/if} + </div> +</div>
\ No newline at end of file |