Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"dependencies": {
"@codemirror/lang-rust": "^6.0.1",
"@fontsource-variable/inter": "^5.0.19",
"bits-ui": "^0.21.12",
"lucide-svelte": "^0.408.0",
"paneforge": "^0.0.5",
"svelte-codemirror-editor": "^1.4.0",
Expand Down
76 changes: 76 additions & 0 deletions frontend/pnpm-lock.yaml

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

55 changes: 39 additions & 16 deletions frontend/src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import { rust } from '@codemirror/lang-rust';
import { Loader2, Play } from 'lucide-svelte';
import { Dialog } from 'bits-ui';
import { Loader2, Play, Settings } from 'lucide-svelte';
import { PaneGroup, Pane, PaneResizer } from 'paneforge';
import CodeMirror from 'svelte-codemirror-editor';
import { submitSchema, executionOutputSchema } from '$lib/schemas';
Expand Down Expand Up @@ -89,21 +90,43 @@
<div class="flex h-screen flex-col">
<header class="flex-shrink-0 border-b p-2">
<div class="flex items-center justify-between">
<h1 class="text-lg font-medium">Executor</h1>
<form>
<button
class="inline-flex items-center justify-center rounded-md bg-green-500 px-3.5 py-2 text-sm font-medium text-white transition-colors hover:bg-green-600 disabled:bg-green-400"
on:click={submitCode}
disabled={pending}
>
{#if pending}
<Loader2 class="mr-2 size-4 animate-spin" />
{:else}
<Play class="mr-2 size-4" />
{/if}
Run
</button>
</form>
<div>
<h1 class="font-medium">Executor</h1>
</div>
<div>
<form>
<button
class="inline-flex items-center justify-center rounded-md bg-green-500 px-3.5 py-2 text-sm font-medium text-white transition-colors hover:bg-green-600 disabled:bg-green-400"
on:click={submitCode}
disabled={pending}
>
{#if pending}
<Loader2 class="mr-2 size-4 animate-spin" />
{:else}
<Play class="mr-2 size-4" />
{/if}
Run
</button>
</form>
</div>
<div>
<Dialog.Root>
<Dialog.Trigger
class="inline-flex items-center justify-center rounded-md px-2 py-2 text-sm transition-colors hover:bg-zinc-200"
>
<Settings class="size-4" />
</Dialog.Trigger>
<Dialog.Portal>
<Dialog.Overlay class="fixed inset-0 z-50 bg-black/80" />
<Dialog.Content
class="fixed left-[50%] top-[50%] z-50 w-full max-w-xl translate-x-[-50%] translate-y-[-50%] rounded-md border bg-white p-2"
>
<Dialog.Title>Settings</Dialog.Title>
<Dialog.Description>Test</Dialog.Description>
</Dialog.Content>
</Dialog.Portal>
</Dialog.Root>
</div>
</div>
</header>
<main class="flex min-h-0 flex-1 flex-col bg-zinc-100">
Expand Down