diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-02-23 22:30:36 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-02-23 22:30:36 +0100 |
commit | 816b3bfc277dbdde0716fcd8946bb13440d67767 (patch) | |
tree | b0ed21200026ac3d57c9436dc5837af9ead13b27 /web/pw-server/src/routes/index.svelte | |
parent | 54b9694f0d0d7e853592317d60ad262ae8c13568 (diff) | |
download | planetwars.dev-816b3bfc277dbdde0716fcd8946bb13440d67767.tar.xz planetwars.dev-816b3bfc277dbdde0716fcd8946bb13440d67767.zip |
show bot stderr
Diffstat (limited to 'web/pw-server/src/routes/index.svelte')
-rw-r--r-- | web/pw-server/src/routes/index.svelte | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/web/pw-server/src/routes/index.svelte b/web/pw-server/src/routes/index.svelte index 7b364be..1ef5c68 100644 --- a/web/pw-server/src/routes/index.svelte +++ b/web/pw-server/src/routes/index.svelte @@ -11,6 +11,8 @@ import * as AcePythonMode from "ace-builds/src-noconflict/mode-python?client"; import { getBotCode, saveBotCode } from "$lib/bot_code"; import { debounce } from "$lib/utils"; + import SubmitPane from "$lib/components/SubmitPane.svelte"; + import OutputPane from "$lib/components/OutputPane.svelte"; let matches = []; @@ -156,14 +158,18 @@ </ul> </div> <div class="editor-container"> - {#if selectedMatchLog !== undefined} + {#if selectedMatchLog} <Visualizer matchLog={selectedMatchLog} /> {:else} <EditorView {editSession} /> {/if} </div> <div class="sidebar-right"> - <button class="play-button" on:click={submitCode}>Submit</button> + {#if selectedMatchLog} + <OutputPane matchLog={selectedMatchLog} /> + {:else} + <SubmitPane on:submit={submitCode} /> + {/if} </div> </div> </div> @@ -199,7 +205,8 @@ width: 400px; background-color: white; border-left: 1px solid; - padding: 10px; + padding: 0; + display: flex; } .editor-container { flex-grow: 1; @@ -211,17 +218,6 @@ height: 100%; } - .play-button { - padding: 8px 16px; - border-radius: 8px; - border: 0; - font-size: 18pt; - display: block; - margin: 20px auto; - background-color: lightgreen; - cursor: pointer; - } - .editor-button { padding: 15px; } |