diff --git a/frontend/src/lib/stores.ts b/frontend/src/lib/stores.ts index fa054c1..75e1a71 100644 --- a/frontend/src/lib/stores.ts +++ b/frontend/src/lib/stores.ts @@ -9,39 +9,3 @@ export const signedIn = writable(false); export const pathname = writable('/'); export const alertModal = writable({ open: false, title: '', body: '' }); - -import { goto } from '$app/navigation'; -import { page } from '$app/stores'; - -const URLSearchParamsToObject = (params: URLSearchParams) => { - const obj = {}; - params.forEach((v: string, k: string) => { - obj[k] = v; - }); - return obj; -}; - -export const createQueryParamsStore = (key: string) => { - let params; - page.subscribe((v) => { - params = URLSearchParamsToObject(v.url.searchParams); - }); - - return { - // eslint-disable-next-line @typescript-eslint/ban-types - subscribe: (cb: Function) => { - return page.subscribe((p) => { - cb(p.url.searchParams.get(key)); - }); - }, - set: (value: string) => { - params[key] = value; - const urlSearchParams = new URLSearchParams(params); - goto(`?${urlSearchParams.toString()}`, { - keepfocus: true, - replaceState: true, - noscroll: true - }); - } - }; -}; diff --git a/frontend/src/routes/account/controllers/add/+page.svelte b/frontend/src/routes/account/controllers/add/+page.svelte index 4af9bea..96ddd96 100644 --- a/frontend/src/routes/account/controllers/add/+page.svelte +++ b/frontend/src/routes/account/controllers/add/+page.svelte @@ -129,7 +129,7 @@ SPDX-License-Identifier: MPL-2.0 Read more here. diff --git a/frontend/src/routes/docs/(markdown)/classquizcontroller/+page.svx b/frontend/src/routes/docs/(markdown)/classquizcontroller/+page.svx new file mode 100644 index 0000000..5c2fc08 --- /dev/null +++ b/frontend/src/routes/docs/(markdown)/classquizcontroller/+page.svx @@ -0,0 +1,20 @@ + + +# ClassQuizController + +## Setup + +At first, you plug it into power, and after some seconds a WLAN-hotspot should be available, called +**ClassQuizController** with no password, which you can connect to. You're getting asked to sign in, and on this page, +you can enter your Wi-Fi SSID and your Wi-Fi password. + +After that, wait two minutes and [add the controller](/account/controllers/add). Give it a name and a player name. The +player name is used in-game and the name is jus used for knowing which controller is which. + +You're getting presented with a code. The code consists of upper- and lowercase letters and colored bars under these. A +long bar (or uppercase letter) stands for along press and a lowercase letter (short bar) stands, respectively, for a +short press. If everything worked, the controller should be connected.