* fix raw app header overflow * update ui-builder hash * Make monaco default size match brand guidelines * nit * Move run button to test panel * wip improve history * add current checkout point * fix logic to switch wetween history state * improve history visualisation * improve animations * nit * remove test page * fix timing issue when selecty history entries * update ui_builder hash * remove dev file * nit * revert setting editor font to 13.5 px * update ui builder --------- Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
32 lines
761 B
Svelte
32 lines
761 B
Svelte
<script lang="ts">
|
|
import { Button, ButtonType } from '$lib/components/common'
|
|
import { CornerDownLeft, Loader2 } from 'lucide-svelte'
|
|
|
|
interface Props {
|
|
isLoading: boolean
|
|
hideShortcut?: boolean
|
|
onRun: () => Promise<void>
|
|
onCancel: () => Promise<void>
|
|
size?: ButtonType.UnifiedSize
|
|
}
|
|
|
|
let { isLoading, hideShortcut = false, onRun, onCancel, size = 'sm' }: Props = $props()
|
|
</script>
|
|
|
|
{#if !isLoading}
|
|
<Button
|
|
loading={isLoading}
|
|
unifiedSize={size}
|
|
variant="accent"
|
|
onClick={() => onRun()}
|
|
shortCut={{ Icon: CornerDownLeft, hide: hideShortcut }}
|
|
>
|
|
Run
|
|
</Button>
|
|
{:else}
|
|
<Button unifiedSize={size} variant="accent" destructive onClick={() => onCancel()}>
|
|
<Loader2 size={14} class="animate-spin mr-2" />
|
|
Cancel
|
|
</Button>
|
|
{/if}
|