Initial commit on branch: Rewrite config.tmpl as svelte component(s)

This commit is contained in:
Christoph Kluge
2022-08-26 11:45:14 +02:00
parent a0dafbac99
commit 7bfdc83779
13 changed files with 547 additions and 4 deletions

View File

@@ -0,0 +1,29 @@
<script>
import { onMount } from 'svelte'
import { Card, CardBody, CardTitle } from 'sveltestrap'
let scrambled
onMount(() => {
scrambled = window.localStorage.getItem("cc-scramble-names") != null
})
function handleScramble() {
if (!scrambled) {
scrambled = true
window.localStorage.setItem("cc-scramble-names", "true")
} else {
scrambled = false
window.localStorage.removeItem("cc-scramble-names")
}
}
</script>
<Card class="h-100">
<CardBody>
<CardTitle class="mb-3">Scramble Names / Presentation Mode</CardTitle>
<input type="checkbox" id="scramble-names-checkbox" style="margin-right: 1em;" on:click={handleScramble} bind:checked={scrambled}/>
Active?
</CardBody>
</Card>