Seasonpicks: Disable countdown until seasonpicks will be locked
All checks were successful
Build Formula11 Docker Image / pocketbase-docker (push) Successful in 28s
All checks were successful
Build Formula11 Docker Image / pocketbase-docker (push) Successful in 28s
This commit is contained in:
@ -18,6 +18,9 @@
|
|||||||
<!-- Prefetch data specified in "load" functions on link hover -->
|
<!-- Prefetch data specified in "load" functions on link hover -->
|
||||||
<body data-theme="formula11Theme" data-sveltekit-preload-data="hover">
|
<body data-theme="formula11Theme" data-sveltekit-preload-data="hover">
|
||||||
<!-- SvelteKit inserts the body contents here -->
|
<!-- SvelteKit inserts the body contents here -->
|
||||||
<div style="display: contents; user-select: none; -moz-user-select: none">%sveltekit.body%</div>
|
<!-- TODO: The fucking user-select: none doesn't work in firefox -->
|
||||||
|
<div style="display: contents; user-select: none; -moz-user-select: -moz-none">
|
||||||
|
%sveltekit.body%
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
TEAM_BANNER_HEIGHT,
|
TEAM_BANNER_HEIGHT,
|
||||||
TEAM_BANNER_WIDTH,
|
TEAM_BANNER_WIDTH,
|
||||||
} from "$lib/config";
|
} from "$lib/config";
|
||||||
|
import Countdown from "$lib/components/Countdown.svelte";
|
||||||
|
|
||||||
let { data }: { data: PageData } = $props();
|
let { data }: { data: PageData } = $props();
|
||||||
|
|
||||||
@ -481,3 +482,13 @@
|
|||||||
{/await}
|
{/await}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{#await Promise.all([data.seasonpicks, data.currentrace]) then [seasonpicks, currentrace]}
|
||||||
|
{#if seasonpicks.length <= 0 && currentrace}
|
||||||
|
<div class="card mx-auto w-fit p-2 shadow">
|
||||||
|
<span class="mr-2 text-xl font-medium">Season pick modification will be locked in</span>
|
||||||
|
<Countdown date={currentrace.qualidate} gotext="0d 0h 0m" extraclass="font-bold text-xl" />
|
||||||
|
<span class="ml-2 text-xl font-medium">.</span>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{/await}
|
||||||
|
@ -5,6 +5,7 @@ import {
|
|||||||
fetch_seasonpickedusers,
|
fetch_seasonpickedusers,
|
||||||
fetch_visibleseasonpicks,
|
fetch_visibleseasonpicks,
|
||||||
fetch_teams,
|
fetch_teams,
|
||||||
|
fetch_currentrace,
|
||||||
} from "$lib/fetch";
|
} from "$lib/fetch";
|
||||||
import type { PageLoad } from "../$types";
|
import type { PageLoad } from "../$types";
|
||||||
|
|
||||||
@ -17,6 +18,7 @@ export const load: PageLoad = async ({ fetch, depends }) => {
|
|||||||
seasonpicks: fetch_visibleseasonpicks(fetch),
|
seasonpicks: fetch_visibleseasonpicks(fetch),
|
||||||
hottakes: fetch_hottakes(fetch),
|
hottakes: fetch_hottakes(fetch),
|
||||||
seasonpickedusers: fetch_seasonpickedusers(fetch),
|
seasonpickedusers: fetch_seasonpickedusers(fetch),
|
||||||
|
currentrace: fetch_currentrace(fetch), // Used for countdown
|
||||||
|
|
||||||
seasonpick: await fetch_currentseasonpick(fetch),
|
seasonpick: await fetch_currentseasonpick(fetch),
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user