forked from MapComplete/MapComplete
Review of many feature switches and iframe context; fix OH-vis when ranges are not given
This commit is contained in:
parent
ecfa7d3d1d
commit
afea9adacb
21 changed files with 157 additions and 88 deletions
|
|
@ -40,8 +40,8 @@ export default class CopyrightPanel extends Combine {
|
|||
const t = Translations.t.general.attribution
|
||||
const layoutToUse = state.layout
|
||||
|
||||
const iconAttributions: BaseUIElement[] = layoutToUse
|
||||
.getUsedImages()
|
||||
const iconAttributions: BaseUIElement[] = Utils.Dedup(layoutToUse
|
||||
.getUsedImages())
|
||||
.map(CopyrightPanel.IconAttribution)
|
||||
|
||||
let maintainer: BaseUIElement = undefined
|
||||
|
|
|
|||
|
|
@ -11,10 +11,9 @@
|
|||
export let state: SpecialVisualizationState
|
||||
let theme = state.layout?.id ?? ""
|
||||
let config: ExtraLinkConfig = state.layout.extraLink
|
||||
const isIframe = window !== window.top
|
||||
let basepath = window.location.host
|
||||
let showWelcomeMessageSwitch = state.featureSwitches.featureSwitchWelcomeMessage
|
||||
|
||||
const isIframe = Utils.isIframe
|
||||
const t = Translations.t.general
|
||||
const href = state.mapProperties.location.map(
|
||||
(loc) => {
|
||||
|
|
@ -36,7 +35,7 @@
|
|||
href={$href}
|
||||
target={config.newTab ? "_blank" : ""}
|
||||
rel="noopener"
|
||||
class="pointer-events-auto flex rounded-full border-black"
|
||||
class="button pointer-events-auto flex rounded-full border-black"
|
||||
>
|
||||
<Icon icon={config.icon} clss="w-6 h-6 m-2" />
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
import Location_refused from "../../assets/svg/Location_refused.svelte"
|
||||
import Location from "../../assets/svg/Location.svelte"
|
||||
import ChevronDoubleLeft from "@babeard/svelte-heroicons/mini/ChevronDoubleLeft"
|
||||
import Constants from "../../Models/Constants"
|
||||
|
||||
/**
|
||||
* The theme introduction panel
|
||||
|
|
@ -149,13 +150,20 @@
|
|||
{/if}
|
||||
</div>
|
||||
|
||||
<If condition={state.featureSwitches.featureSwitchBackToThemeOverview}>
|
||||
<div class="link-underline m-2 mx-4 flex w-full">
|
||||
<!-- bottom buttons, a bit hidden away: switch layout -->
|
||||
<a class="flex w-fit items-center justify-end" href={Utils.HomepageLink()}>
|
||||
<ChevronDoubleLeft class="h-4 w-4" />
|
||||
<Tr t={Translations.t.general.backToIndex} />
|
||||
</a>
|
||||
{#if Utils.isIframe}
|
||||
<div class="flex justify-end link-underline">
|
||||
<a href="https://mapcomplete.org" target="_blank">
|
||||
<Tr t={Translations.t.general.poweredByMapComplete}/>
|
||||
</a>
|
||||
</div>
|
||||
</If>
|
||||
{:else}
|
||||
<If condition={state.featureSwitches.featureSwitchBackToThemeOverview}>
|
||||
<div class="link-underline m-2 mx-4 flex w-full">
|
||||
<a class="flex w-fit items-center justify-end" href={Utils.HomepageLink()}>
|
||||
<ChevronDoubleLeft class="h-4 w-4" />
|
||||
<Tr t={Translations.t.general.backToIndex} />
|
||||
</a>
|
||||
</div>
|
||||
</If>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue