blob: c74adf0e64ce7fa04940095e10d980e7ce61f7bb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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>
|