Merge master

This commit is contained in:
Pieter Vander Vennet 2024-09-30 01:22:44 +02:00
commit adaedcba25
27 changed files with 674 additions and 433 deletions

View file

@ -49,6 +49,7 @@
import SidebarUnit from "../Base/SidebarUnit.svelte"
import Squares2x2 from "@babeard/svelte-heroicons/mini/Squares2x2"
import EnvelopeOpen from "@babeard/svelte-heroicons/mini/EnvelopeOpen"
import PanoramaxLink from "./PanoramaxLink.svelte"
export let state: ThemeViewState
let userdetails = state.osmConnection.userDetails
@ -232,6 +233,7 @@
<If condition={featureSwitches.featureSwitchEnableLogin}>
<OpenIdEditor mapProperties={state.mapProperties} />
<OpenJosm {state} />
<PanoramaxLink large={false} mapProperties={state.mapProperties} />
<MapillaryLink large={false} mapProperties={state.mapProperties} />
</If>

View file

@ -0,0 +1,40 @@
<script lang="ts">
import Translations from "../i18n/Translations"
import { Store } from "../../Logic/UIEventSource"
import Tr from "../Base/Tr.svelte"
import Mapillary_black from "../../assets/svg/Mapillary_black.svelte"
import { twMerge } from "tailwind-merge"
import { PanoramaxXYZ, Panoramax } from "panoramax-js/dist"
import Panoramax_bw from "../../assets/svg/Panoramax_bw.svelte"
import {default as Panoramax_svg} from "../../assets/svg/Panoramax.svelte"
/*
A subtleButton which opens panoramax in a new tab at the current location
*/
export let host: Panoramax = new PanoramaxXYZ()
export let mapProperties: {
readonly zoom: Store<number>
readonly location: Store<{ lon: number; lat: number }>
}
let location = mapProperties.location
let zoom = mapProperties.zoom
let href = location.mapD(location =>
host.createViewLink({
location,
zoom: zoom.data,
}), [zoom])
export let large: boolean = true
</script>
<a class="flex items-center" href={$href} target="_blank">
<Panoramax_svg class={twMerge("shrink-0", large ? "m-2 mr-4 h-12 w-12" : "h-5 w-5 pr-1")} />
{#if large}
<div class="flex flex-col">
<Tr t={Translations.t.general.attribution.openPanoramax} />
<Tr cls="subtle" t={Translations.t.general.attribution.panoramaxHelp} />
</div>
{:else}
<Tr t={Translations.t.general.attribution.openPanoramax} />
{/if}
</a>

View file

@ -16,7 +16,7 @@
let license: Store<LicenseInfo> = UIEventSource.FromPromise(
image.provider?.DownloadAttribution(image)
)
let icon = image.provider?.SourceIcon(image.id)
let icon = image.provider?.SourceIcon(image)
</script>
{#if $license !== undefined}

View file

@ -130,7 +130,7 @@
for (const f of features) {
bbox = bbox.unionWith(BBox.get(f))
}
mapProperties.maxbounds.set(bbox.pad(1.1))
mapProperties.maxbounds.set(bbox.pad(4))
})
)