ui: Fix errors after migration
This commit is contained in:
parent
47776eeeb4
commit
d791e74a2a
10 changed files with 110 additions and 96 deletions
|
|
@ -10,12 +10,12 @@ export const ssr = false;
|
|||
export async function load() {
|
||||
await challengeInfo.refresh();
|
||||
await settings.refresh();
|
||||
await themes.refresh();
|
||||
teams.refresh();
|
||||
await themesStore.refresh();
|
||||
teamsStore.refresh();
|
||||
my.refresh((my) => {
|
||||
if (my && my.team_id === 0) {
|
||||
stop_refresh = true;
|
||||
}
|
||||
});
|
||||
issues.refresh();
|
||||
issuesStore.refresh();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
} from 'sveltestrap';
|
||||
|
||||
import Header from '$lib/components/Header.svelte';
|
||||
|
||||
import { challengeInfo } from '$lib/stores/challengeinfo';
|
||||
import { settings } from '$lib/stores/settings';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
|
|||
|
|
@ -5,20 +5,20 @@
|
|||
|
||||
import { challengeInfo } from '$lib/stores/challengeinfo.js';
|
||||
|
||||
export let theme;
|
||||
export let data;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{theme?theme.name:""} - {$challengeInfo.title}</title>
|
||||
<title>{data.theme?data.theme.name:""} - {$challengeInfo.title}</title>
|
||||
</svelte:head>
|
||||
|
||||
{#if theme}
|
||||
<div style="background-image: url({theme.image})" class="page-header">
|
||||
{#if data.theme}
|
||||
<div style="background-image: url({data.theme.image})" class="page-header">
|
||||
<Container class="text-primary">
|
||||
<h1 class="display-2">
|
||||
<a href="{theme.urlid}">{theme.name}</a>
|
||||
<a href="{data.theme.urlid}">{data.theme.name}</a>
|
||||
</h1>
|
||||
<h2>{@html theme.authors}</h2>
|
||||
<h2>{@html data.theme.authors}</h2>
|
||||
</Container>
|
||||
<div class="headerfade"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
export let data;
|
||||
</script>
|
||||
|
||||
{#if data.theme && data.theme.exercices}
|
||||
{#if data && data.theme && data.theme.exercices}
|
||||
<Card class="niceborder text-indent mt-2 mb-4">
|
||||
|
||||
<CardBody class="bg-dark text-light">
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
<div style="position: absolute; margin-left: calc(var(--bs-gutter-x) * -.5 - 15px); margin-top: -0.5rem;">
|
||||
<svg style="height: 50px; width: 23px;">
|
||||
<rect
|
||||
style="fill:#{$my && $my.exercices[k] && (index < 1 || ($my.exercices[Object.keys(data.data.theme.exercices)[index-1]] && $my.exercices[Object.keys(data.theme.exercices)[index-1]].solved_rank)) ? '62c462' : 'bbb'}"
|
||||
style="fill:#{$my && $my.exercices[k] && (index < 1 || ($my.exercices[Object.keys(data.theme.exercices)[index-1]] && $my.exercices[Object.keys(data.theme.exercices)[index-1]].solved_rank)) ? '62c462' : 'bbb'}"
|
||||
width="5"
|
||||
height="30"
|
||||
x="10"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { get_store_value } from 'svelte/internal';
|
|||
|
||||
import { themes } from '$lib/stores/themes.js';
|
||||
|
||||
export async function load({ parent }) {
|
||||
export async function load({ params, parent }) {
|
||||
const stuff = await parent();
|
||||
|
||||
let exercice = null;
|
||||
|
|
|
|||
Reference in a new issue