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 showBackground = state.featureSwitches.featureSwitchBackgroundSelection
|
||||
let showFilters = state.featureSwitches.featureSwitchFilter
|
||||
</script>
|
||||
|
||||
<div class:h-0={!onlyLink} class:h-full={onlyLink} class="overflow-hidden">
|
||||
|
@ -75,10 +77,12 @@
|
|||
<ThemeIntroPanel {state} />
|
||||
</Page>
|
||||
|
||||
<FilterPage {onlyLink} {state} />
|
||||
|
||||
<RasterLayerOverview {onlyLink} {state} />
|
||||
|
||||
{#if $showFilters}
|
||||
<FilterPage {onlyLink} {state} />
|
||||
{/if}
|
||||
{#if $showBackground}
|
||||
<RasterLayerOverview {onlyLink} {state} />
|
||||
{/if}
|
||||
<Page {onlyLink} shown={pg.share}>
|
||||
<svelte:fragment slot="header">
|
||||
<Share />
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
import SidebarUnit from "../Base/SidebarUnit.svelte"
|
||||
import Squares2x2 from "@babeard/svelte-heroicons/mini/Squares2x2"
|
||||
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 { AndroidPolyfill } from "../../Logic/Web/AndroidPolyfill"
|
||||
import Forgejo from "../../assets/svg/Forgejo.svelte"
|
||||
|
@ -74,7 +74,7 @@
|
|||
let usersettingslayer = new LayerConfig(<LayerConfigJson>usersettings, "usersettings", true)
|
||||
|
||||
let featureSwitches = state.featureSwitches
|
||||
let showHome = featureSwitches?.featureSwitchBackToThemeOverview
|
||||
let showHome = featureSwitches?.featureSwitchBackToThemeOverview ?? new ImmutableStore(true)
|
||||
let pg = state.guistate.pageStates
|
||||
export let onlyLink: boolean
|
||||
const t = Translations.t.general.menu
|
||||
|
@ -218,11 +218,12 @@
|
|||
<Tr t={Translations.t.general.menu.aboutMapComplete} />
|
||||
</h3>
|
||||
|
||||
{#if $showHome}
|
||||
<a class="flex" href={($isAndroid ? "https://mapcomplete.org" : ".") + "/studio.html"}>
|
||||
<Pencil class="mr-2 h-6 w-6" />
|
||||
<Tr t={Translations.t.general.morescreen.createYourOwnTheme} />
|
||||
</a>
|
||||
|
||||
{/if}
|
||||
<a class="flex" href="mailto:info@mapcomplete.org">
|
||||
<EnvelopeOpen class="h-6 w-6" />
|
||||
<Tr t={Translations.t.general.attribution.emailCreators} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue