diff --git a/src/routes/admin/new/+page.server.ts b/src/routes/admin/new/+page.server.ts new file mode 100644 index 0000000..a811fbc --- /dev/null +++ b/src/routes/admin/new/+page.server.ts @@ -0,0 +1,16 @@ +import { apiBaseUrl } from "$lib/components_custom/consts"; +import { redirect } from "@sveltejs/kit"; + +export async function load({ cookies }) { + const auth = await (await fetch(apiBaseUrl + "/v3/auth", { + headers: { + 'Content-Type': 'application/json', + 'x-api-key': cookies.get("authToken") || "" + } + })).json(); + + /*if (!auth.admin && !auth.moderator) { + throw redirect(303, '/401'); + }*/ + console.log("WARNING: Admin Auth Check is disabled! DO NOT USE IN PRODUCTION") +} diff --git a/src/routes/admin/new/+page.svelte b/src/routes/admin/new/+page.svelte new file mode 100644 index 0000000..b0c4bc8 --- /dev/null +++ b/src/routes/admin/new/+page.svelte @@ -0,0 +1,159 @@ + + + + +
+
+

Editing Mode

+ +

Filters

+ + + + + + + {#each games as game} +
+ game.checked = !game.checked} /> + +
+ {/each} +
+
+ + + + + + + {#if games.filter(value => value.checked == true).length == 0} +
+ +
+ {/if} + {#each games as game} + {#if game.checked} + {#each game.groups as group} +
+ {games[game.id].groups[group.id].checked = !group.checked}} /> + +
+ {/each} + {/if} + {/each} +
+
+
+
B
+
+
\ No newline at end of file