ui: Ensure a message is shown when theme is disabled
This commit is contained in:
parent
0a7b40abd7
commit
1a21115503
3 changed files with 39 additions and 6 deletions
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
export let hints = [];
|
||||
export let exercice = {};
|
||||
export let locked_theme = false;
|
||||
|
||||
let hints_submitted = {};
|
||||
|
||||
|
|
@ -117,7 +118,7 @@
|
|||
{#if !(hint.content || hint.file) || (!hint.file && hint.hidden)}
|
||||
<div>
|
||||
{#if !(hint.content || hint.file)}
|
||||
<button type="button" on:click={openHint(hint)} class="btn btn-info" class:disabled={hints_submitted[hint.id]} disabled={$settings.disablesubmitbutton}>
|
||||
<button type="button" on:click={openHint(hint)} class="btn btn-info" class:disabled={hints_submitted[hint.id]} disabled={$settings.disablesubmitbutton || locked_theme}>
|
||||
{#if hints_submitted[hint.id]}
|
||||
<Spinner size="sm" class="me-2" />
|
||||
{:else}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@
|
|||
<Icon name="gift-fill" />
|
||||
</Badge>
|
||||
{/if}
|
||||
{#if th.locked}
|
||||
<Badge color="light">
|
||||
<Icon name="lock-fill" />
|
||||
</Badge>
|
||||
{/if}
|
||||
<Badge>
|
||||
{#if $my && $my.team_id}{$myThemes[th.id].exercice_solved}/{/if}{th.exercice_count}
|
||||
</Badge>
|
||||
|
|
|
|||
Reference in a new issue