forked from MapComplete/MapComplete
UX: enable menu drawer on index page, slightly reorder index page
This commit is contained in:
parent
b71f07974e
commit
383eebfdca
10 changed files with 280 additions and 263 deletions
|
|
@ -3,29 +3,30 @@
|
|||
import { Stores } from "../../Logic/UIEventSource"
|
||||
import Tr from "../Base/Tr.svelte"
|
||||
import Translations from "../i18n/Translations"
|
||||
import type { SpecialVisualizationState } from "../SpecialVisualization"
|
||||
import ThemeViewState from "../../Models/ThemeViewState"
|
||||
|
||||
/**
|
||||
* Shows _all_ disabled questions
|
||||
*/
|
||||
export let state: ThemeViewState
|
||||
let layers = state.theme.layers.filter((l) => l.isNormal())
|
||||
let layers = state.theme?.layers?.filter((l) => l.isNormal())
|
||||
|
||||
let allDisabled = Stores.concat<string>(
|
||||
layers.map((l) => state.userRelatedState.getThemeDisabled(state.theme.id, l.id))
|
||||
layers?.map((l) => state.userRelatedState.getThemeDisabled(state.theme.id, l.id)) ?? []
|
||||
).map((l) => [].concat(...l))
|
||||
const t = Translations.t.general.questions
|
||||
</script>
|
||||
|
||||
<h3>
|
||||
<Tr t={t.disabledTitle} />
|
||||
</h3>
|
||||
{#if $allDisabled.length === 0}
|
||||
<Tr t={t.noneDisabled} />
|
||||
{:else}
|
||||
<Tr t={t.disabledIntro} />
|
||||
{#each layers as layer (layer.id)}
|
||||
<DisabledQuestionsLayer {state} {layer} />
|
||||
{/each}
|
||||
{#if state.theme}
|
||||
<h3>
|
||||
<Tr t={t.disabledTitle} />
|
||||
</h3>
|
||||
{#if $allDisabled.length === 0}
|
||||
<Tr t={t.noneDisabled} />
|
||||
{:else}
|
||||
<Tr t={t.disabledIntro} />
|
||||
{#each layers as layer (layer.id)}
|
||||
<DisabledQuestionsLayer {state} {layer} />
|
||||
{/each}
|
||||
{/if}
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue