diff --git a/frontend/src/lib/components/dashboard/InfoButton.svelte b/frontend/src/lib/components/dashboard/InfoButton.svelte index 215fb8e..58497d4 100644 --- a/frontend/src/lib/components/dashboard/InfoButton.svelte +++ b/frontend/src/lib/components/dashboard/InfoButton.svelte @@ -2,6 +2,7 @@ import { tippy } from 'svelte-tippy'; import 'tippy.js/dist/tippy.css'; import { createEventDispatcher } from 'svelte'; + import { submissionProgress, UploadStatus } from '$lib/stores/portfolio'; const dispatch = createEventDispatcher(); @@ -26,14 +27,25 @@ + {#if $submissionProgress.status === UploadStatus.Submitted} + download()} on:keydown={(_) => download()} use:tippy={{ + content: "Stáhnout portfolio", + placement: 'top', + showOnCreate: false, + delay: 0 + }}> + + + {:else} download()} on:keydown={(_) => download()} use:tippy={{ - content: "Stáhnout portfolio", + content: "Nelze stáhnout, portfolio nebylo odevzdáno", placement: 'top', showOnCreate: false, delay: 0 }}> - - + + + {/if} @@ -41,4 +53,7 @@ .icon { @apply w-10 h-10 stroke-sspsBlueDark hover:cursor-pointer; } + .disabledIcon { + @apply w-10 h-10 stroke-gray-300 hover:cursor-not-allowed; + }