forked from MapComplete/MapComplete
UX: hide buttons for 'background' and 'filter' from the menu if those are disabled by the feature switches
This commit is contained in:
parent
763e8f0616
commit
0afb38c064
2 changed files with 12 additions and 7 deletions
|
@ -51,6 +51,8 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let hotkeys = Hotkeys._docs
|
let hotkeys = Hotkeys._docs
|
||||||
|
let showBackground = state.featureSwitches.featureSwitchBackgroundSelection
|
||||||
|
let showFilters = state.featureSwitches.featureSwitchFilter
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class:h-0={!onlyLink} class:h-full={onlyLink} class="overflow-hidden">
|
<div class:h-0={!onlyLink} class:h-full={onlyLink} class="overflow-hidden">
|
||||||
|
@ -75,10 +77,12 @@
|
||||||
<ThemeIntroPanel {state} />
|
<ThemeIntroPanel {state} />
|
||||||
</Page>
|
</Page>
|
||||||
|
|
||||||
<FilterPage {onlyLink} {state} />
|
{#if $showFilters}
|
||||||
|
<FilterPage {onlyLink} {state} />
|
||||||
<RasterLayerOverview {onlyLink} {state} />
|
{/if}
|
||||||
|
{#if $showBackground}
|
||||||
|
<RasterLayerOverview {onlyLink} {state} />
|
||||||
|
{/if}
|
||||||
<Page {onlyLink} shown={pg.share}>
|
<Page {onlyLink} shown={pg.share}>
|
||||||
<svelte:fragment slot="header">
|
<svelte:fragment slot="header">
|
||||||
<Share />
|
<Share />
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
import SidebarUnit from "../Base/SidebarUnit.svelte"
|
import SidebarUnit from "../Base/SidebarUnit.svelte"
|
||||||
import Squares2x2 from "@babeard/svelte-heroicons/mini/Squares2x2"
|
import Squares2x2 from "@babeard/svelte-heroicons/mini/Squares2x2"
|
||||||
import EnvelopeOpen from "@babeard/svelte-heroicons/mini/EnvelopeOpen"
|
import EnvelopeOpen from "@babeard/svelte-heroicons/mini/EnvelopeOpen"
|
||||||
import { UIEventSource } from "../../Logic/UIEventSource"
|
import { ImmutableStore, UIEventSource } from "../../Logic/UIEventSource"
|
||||||
import MagnifyingGlassCircle from "@babeard/svelte-heroicons/mini/MagnifyingGlassCircle"
|
import MagnifyingGlassCircle from "@babeard/svelte-heroicons/mini/MagnifyingGlassCircle"
|
||||||
import { AndroidPolyfill } from "../../Logic/Web/AndroidPolyfill"
|
import { AndroidPolyfill } from "../../Logic/Web/AndroidPolyfill"
|
||||||
import Forgejo from "../../assets/svg/Forgejo.svelte"
|
import Forgejo from "../../assets/svg/Forgejo.svelte"
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
let usersettingslayer = new LayerConfig(<LayerConfigJson>usersettings, "usersettings", true)
|
let usersettingslayer = new LayerConfig(<LayerConfigJson>usersettings, "usersettings", true)
|
||||||
|
|
||||||
let featureSwitches = state.featureSwitches
|
let featureSwitches = state.featureSwitches
|
||||||
let showHome = featureSwitches?.featureSwitchBackToThemeOverview
|
let showHome = featureSwitches?.featureSwitchBackToThemeOverview ?? new ImmutableStore(true)
|
||||||
let pg = state.guistate.pageStates
|
let pg = state.guistate.pageStates
|
||||||
export let onlyLink: boolean
|
export let onlyLink: boolean
|
||||||
const t = Translations.t.general.menu
|
const t = Translations.t.general.menu
|
||||||
|
@ -218,11 +218,12 @@
|
||||||
<Tr t={Translations.t.general.menu.aboutMapComplete} />
|
<Tr t={Translations.t.general.menu.aboutMapComplete} />
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
{#if $showHome}
|
||||||
<a class="flex" href={($isAndroid ? "https://mapcomplete.org" : ".") + "/studio.html"}>
|
<a class="flex" href={($isAndroid ? "https://mapcomplete.org" : ".") + "/studio.html"}>
|
||||||
<Pencil class="mr-2 h-6 w-6" />
|
<Pencil class="mr-2 h-6 w-6" />
|
||||||
<Tr t={Translations.t.general.morescreen.createYourOwnTheme} />
|
<Tr t={Translations.t.general.morescreen.createYourOwnTheme} />
|
||||||
</a>
|
</a>
|
||||||
|
{/if}
|
||||||
<a class="flex" href="mailto:info@mapcomplete.org">
|
<a class="flex" href="mailto:info@mapcomplete.org">
|
||||||
<EnvelopeOpen class="h-6 w-6" />
|
<EnvelopeOpen class="h-6 w-6" />
|
||||||
<Tr t={Translations.t.general.attribution.emailCreators} />
|
<Tr t={Translations.t.general.attribution.emailCreators} />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue