Skip to content

Commit

Permalink
Merge pull request #41 from natrontech/upload-script
Browse files Browse the repository at this point in the history
fix: layout exercise done
  • Loading branch information
janlauber authored Nov 4, 2023
2 parents 017fe56 + d888305 commit 8bf2909
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions kubelab-ui/src/routes/labs/[id]/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -329,26 +329,25 @@
: ''}"
>
<div class="text-center">
<h1 class="text-4xl font-bold">
{checkIfExerciseIsDone($exercise.id) ? "Exercise done" : "Exercise not started"}
</h1>
<p class="text-xl">
{checkIfExerciseIsDone($exercise.id)
? "Click the button below to restart the exercise. You must finish it again!"
: "Click the button below to start the exercise"}
</p>
<button
class="btn {checkIfExerciseIsDone($exercise.id)
? 'btn-warning'
: 'btn-neutral dark:btn-primary dark:text-neutral'} mt-4"
on:click={() => handleStartExercise()}
>
{#if $loadingExercises.has($exercise.id)}
<span class="loading loading-dots loading-md" /> starting...
{:else}
<Play /> Start Terminal
{/if}
</button>
{#if checkIfExerciseIsDone($exercise.id)}
<h1 class="text-4xl font-bold">
<CheckCircle class="inline-block w-12 h-12" />
{checkIfExerciseIsDone($exercise.id) ? "Exercise done" : "Exercise not started"}
</h1>
{:else}
<button
class="btn {checkIfExerciseIsDone($exercise.id)
? 'btn-warning'
: 'btn-neutral dark:btn-primary dark:text-neutral'} mt-4"
on:click={() => handleStartExercise()}
>
{#if $loadingExercises.has($exercise.id)}
<span class="loading loading-dots loading-md" /> starting...
{:else}
<Play /> Start Terminal
{/if}
</button>
{/if}
</div>
</div>
{/key}
Expand Down

0 comments on commit 8bf2909

Please sign in to comment.