mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-04-02 22:17:30 +02:00
30 lines
821 B
Svelte
30 lines
821 B
Svelte
<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>
|