2024-10-08 22:37:11 +02:00
|
|
|
<script lang="ts">
|
|
|
|
|
import DisabledQuestionsLayer from "./DisabledQuestionsLayer.svelte"
|
|
|
|
|
import { Stores } from "../../Logic/UIEventSource"
|
2024-10-09 00:07:23 +02:00
|
|
|
import Tr from "../Base/Tr.svelte"
|
|
|
|
|
import Translations from "../i18n/Translations"
|
2024-10-08 22:37:11 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Shows _all_ disabled questions
|
|
|
|
|
*/
|
|
|
|
|
export let state
|
|
|
|
|
let layers = state.layout.layers.filter(l => l.isNormal())
|
|
|
|
|
|
|
|
|
|
let allDisabled = Stores.concat<string>(layers.map(l => state.userRelatedState.getThemeDisabled(state.layout.id, l.id))).map(l => [].concat(...l))
|
2024-10-09 00:07:23 +02:00
|
|
|
const t = Translations.t.general.questions
|
2024-10-08 22:37:11 +02:00
|
|
|
</script>
|
|
|
|
|
|
2024-10-09 00:07:23 +02:00
|
|
|
<h3>
|
|
|
|
|
<Tr t={t.disabledTitle} />
|
|
|
|
|
</h3>
|
2024-10-08 22:37:11 +02:00
|
|
|
{#if $allDisabled.length === 0}
|
2024-10-09 00:07:23 +02:00
|
|
|
<Tr t={t.noneDisabled} />
|
2024-10-08 22:37:11 +02:00
|
|
|
{:else}
|
2024-10-09 00:07:23 +02:00
|
|
|
<Tr t={t.disabledIntro} />
|
2024-10-08 22:37:11 +02:00
|
|
|
{#each layers as layer (layer.id)}
|
|
|
|
|
<DisabledQuestionsLayer {state} {layer} />
|
|
|
|
|
{/each}
|
|
|
|
|
{/if}
|