Chore: run prettier
This commit is contained in:
parent
147c3db957
commit
9661ade80c
19 changed files with 910 additions and 897 deletions
|
@ -14,7 +14,8 @@
|
|||
|
||||
<SubtleButton
|
||||
on:click={() => dispatch("click")}
|
||||
options={{ extraClasses: twMerge("flex items-center", clss) }}>
|
||||
options={{ extraClasses: twMerge("flex items-center", clss) }}
|
||||
>
|
||||
<ChevronLeftIcon class="h-12 w-12" slot="image" />
|
||||
<slot slot="message" />
|
||||
</SubtleButton>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<div bind:this={mainElem} class="absolute bottom-0 right-0 h-full w-full pointer-events-none">
|
||||
<div bind:this={mainElem} class="pointer-events-none absolute bottom-0 right-0 h-full w-full">
|
||||
<div id="hand-container">
|
||||
<img src="./assets/svg/hand.svg" />
|
||||
</div>
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
<button
|
||||
on:click={(e) => dispatch("click", e)}
|
||||
class={twJoin("pointer-events-auto m-0.5 h-fit w-fit rounded-full p-0.5 sm:p-1 md:m-1", cls)}>
|
||||
class={twJoin("pointer-events-auto m-0.5 h-fit w-fit rounded-full p-0.5 sm:p-1 md:m-1", cls)}
|
||||
>
|
||||
<slot />
|
||||
</button>
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
<SubtleButton
|
||||
on:click={() => dispatch("click")}
|
||||
options={{ extraClasses: twMerge("flex items-center", clss) }}>
|
||||
options={{ extraClasses: twMerge("flex items-center", clss) }}
|
||||
>
|
||||
<slot name="image" slot="image" />
|
||||
<div class="flex w-full items-center justify-between" slot="message">
|
||||
<slot />
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
<button
|
||||
class={twMerge(options.extraClasses, "secondary no-image-background")}
|
||||
on:click={(e) => dispatch("click", e)}>
|
||||
on:click={(e) => dispatch("click", e)}
|
||||
>
|
||||
<slot name="image">
|
||||
{#if imageUrl !== undefined}
|
||||
{#if typeof imageUrl === "string"}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<div class="tabbedgroup h-full flex w-full">
|
||||
<div class="tabbedgroup flex h-full w-full">
|
||||
<TabGroup
|
||||
class="flex h-full w-full flex-col"
|
||||
defaultIndex={1}
|
||||
|
@ -67,7 +67,7 @@
|
|||
</TabList>
|
||||
<slot name="post-tablist" />
|
||||
</div>
|
||||
<div class="normal-background overflow-y-auto h-full">
|
||||
<div class="normal-background h-full overflow-y-auto">
|
||||
<TabPanels class="tabpanels" defaultIndex={$tab}>
|
||||
<TabPanel class="tabpanel">
|
||||
<slot name="content0">
|
||||
|
@ -105,7 +105,6 @@
|
|||
height: calc(100% - 2rem);
|
||||
}
|
||||
|
||||
|
||||
:global(.tab) {
|
||||
margin: 0.25rem;
|
||||
padding: 0.25rem;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
import FeatureSourceMerger from "../../Logic/FeatureSource/Sources/FeatureSourceMerger"
|
||||
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
||||
import { Utils } from "../../Utils"
|
||||
import {createEventDispatcher} from "svelte";
|
||||
import { createEventDispatcher } from "svelte"
|
||||
|
||||
/**
|
||||
* An advanced location input, which has support to:
|
||||
|
@ -45,7 +45,7 @@
|
|||
lat: number
|
||||
}>(undefined)
|
||||
|
||||
const dispatch = createEventDispatcher<{click: {lon: number, lat: number}}>()
|
||||
const dispatch = createEventDispatcher<{ click: { lon: number; lat: number } }>()
|
||||
|
||||
const xyz = Tiles.embedded_tile(coordinate.lat, coordinate.lon, 16)
|
||||
const map: UIEventSource<MlMap> = new UIEventSource<MlMap>(undefined)
|
||||
|
@ -109,7 +109,7 @@
|
|||
|
||||
<LocationInput
|
||||
{map}
|
||||
on:click={data => dispatch("click", data)}
|
||||
on:click={(data) => dispatch("click", data)}
|
||||
mapProperties={initialMapProperties}
|
||||
value={preciseLocation}
|
||||
initialCoordinate={coordinate}
|
||||
|
|
|
@ -3,19 +3,17 @@
|
|||
* A mapcontrol button which allows the user to select a different background.
|
||||
* Even though the componenet is very small, it gets it's own class as it is often reused
|
||||
*/
|
||||
import {Square3Stack3dIcon} from "@babeard/svelte-heroicons/solid";
|
||||
import type {SpecialVisualizationState} from "../SpecialVisualization";
|
||||
import Translations from "../i18n/Translations";
|
||||
import MapControlButton from "../Base/MapControlButton.svelte";
|
||||
import Tr from "../Base/Tr.svelte";
|
||||
import { Square3Stack3dIcon } from "@babeard/svelte-heroicons/solid"
|
||||
import type { SpecialVisualizationState } from "../SpecialVisualization"
|
||||
import Translations from "../i18n/Translations"
|
||||
import MapControlButton from "../Base/MapControlButton.svelte"
|
||||
import Tr from "../Base/Tr.svelte"
|
||||
|
||||
export let state: SpecialVisualizationState
|
||||
export let hideTooltip = false
|
||||
</script>
|
||||
|
||||
<MapControlButton
|
||||
on:click={() => state.guistate.backgroundLayerSelectionIsOpened.setData(true)}
|
||||
>
|
||||
<MapControlButton on:click={() => state.guistate.backgroundLayerSelectionIsOpened.setData(true)}>
|
||||
<Square3Stack3dIcon class="h-6 w-6" />
|
||||
{#if !hideTooltip}
|
||||
<Tr cls="mx-2" t={Translations.t.general.backgroundSwitch} />
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts">
|
||||
import ThemeViewState from "../../Models/ThemeViewState";
|
||||
import Translations from "../i18n/Translations";
|
||||
import Tr from "../Base/Tr.svelte";
|
||||
import Loading from "../Base/Loading.svelte";
|
||||
import ThemeViewState from "../../Models/ThemeViewState"
|
||||
import Translations from "../i18n/Translations"
|
||||
import Tr from "../Base/Tr.svelte"
|
||||
import Loading from "../Base/Loading.svelte"
|
||||
|
||||
export let state: ThemeViewState
|
||||
/**
|
||||
|
@ -17,24 +17,25 @@
|
|||
currentState.data === ""
|
||||
const t = Translations.t.centerMessage
|
||||
</script>
|
||||
|
||||
{#if $currentState === "has-visible-features"}
|
||||
<!-- don't show anything -->
|
||||
{:else if $currentState === "zoom-to-low"}
|
||||
<div class="w-fit p-4 alert">
|
||||
<div class="alert w-fit p-4">
|
||||
<Tr t={t.zoomIn} />
|
||||
</div>
|
||||
{:else if $currentState === "all-filtered-away"}
|
||||
<div class="w-fit p-4 alert">
|
||||
<div class="alert w-fit p-4">
|
||||
<Tr t={t.allFilteredAway} />
|
||||
</div>
|
||||
{:else if $dataIsLoading}
|
||||
<div class="w-fit p-4 alert">
|
||||
<div class="alert w-fit p-4">
|
||||
<Loading>
|
||||
<Tr t={Translations.t.centerMessage.loadingData} />
|
||||
</Loading>
|
||||
</div>
|
||||
{:else if $currentState === "no-data"}
|
||||
<div class="w-fit p-4 alert">
|
||||
<div class="alert w-fit p-4">
|
||||
<Tr t={t.noData} />
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
import { UIEventSource } from "../../Logic/UIEventSource"
|
||||
import { SearchIcon } from "@rgossiaux/svelte-heroicons/solid"
|
||||
import { twJoin } from "tailwind-merge"
|
||||
import {Utils} from "../../Utils";
|
||||
import { Utils } from "../../Utils"
|
||||
|
||||
/**
|
||||
* The theme introduction panel
|
||||
|
@ -39,10 +39,8 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col justify-between h-full">
|
||||
|
||||
<div class="flex h-full flex-col justify-between">
|
||||
<div>
|
||||
|
||||
<!-- Intro, description, ... -->
|
||||
<Tr t={layout.description} />
|
||||
<Tr t={Translations.t.general.welcomeExplanation.general} />
|
||||
|
@ -54,7 +52,6 @@
|
|||
|
||||
<Tr t={layout.descriptionTail} />
|
||||
|
||||
|
||||
<!-- Buttons: open map, go to location, search -->
|
||||
<NextButton clss="primary w-full" on:click={() => state.guistate.themeIsOpened.setData(false)}>
|
||||
<div class="flex w-full justify-center text-2xl">
|
||||
|
@ -86,7 +83,8 @@
|
|||
</div>
|
||||
<button
|
||||
class={twJoin("flex items-center justify-between gap-x-2", !searchEnabled && "disabled")}
|
||||
on:click={() => triggerSearch.ping()}>
|
||||
on:click={() => triggerSearch.ping()}
|
||||
>
|
||||
<Tr t={Translations.t.general.search.searchShort} />
|
||||
<SearchIcon class="h-6 w-6" />
|
||||
</button>
|
||||
|
|
|
@ -127,7 +127,8 @@
|
|||
draggable="false"
|
||||
on:mousedown={click}
|
||||
src="./assets/svg/elevator.svg"
|
||||
style={`top: ${top}px;`} />
|
||||
style={`top: ${top}px;`}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
mapProperties: MapProperties
|
||||
) => void = undefined
|
||||
|
||||
const dispatch = createEventDispatcher<{ click: { lon: number, lat: number } }>()
|
||||
const dispatch = createEventDispatcher<{ click: { lon: number; lat: number } }>()
|
||||
|
||||
export let map: UIEventSource<MlMap> = new UIEventSource<MlMap>(undefined)
|
||||
let mla = new MapLibreAdaptor(map, mapProperties)
|
||||
mla.lastClickLocation.addCallbackAndRunD(lastClick => {
|
||||
mla.lastClickLocation.addCallbackAndRunD((lastClick) => {
|
||||
dispatch("click", lastClick)
|
||||
})
|
||||
mapProperties.location.syncWith(value)
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
import BackButton from "../../Base/BackButton.svelte"
|
||||
import ToSvelte from "../../Base/ToSvelte.svelte"
|
||||
import Svg from "../../../Svg"
|
||||
import OpenBackgroundSelectorButton from "../../BigComponents/OpenBackgroundSelectorButton.svelte";
|
||||
import OpenBackgroundSelectorButton from "../../BigComponents/OpenBackgroundSelectorButton.svelte"
|
||||
import { twJoin } from "tailwind-merge"
|
||||
|
||||
export let coordinate: { lon: number; lat: number }
|
||||
|
@ -310,7 +310,9 @@
|
|||
<div class="relative w-full p-1">
|
||||
<div class="h-96 max-h-screen w-full overflow-hidden rounded-xl">
|
||||
<NewPointLocationInput
|
||||
on:click={() => {preciseInputIsTapped = true}}
|
||||
on:click={() => {
|
||||
preciseInputIsTapped = true
|
||||
}}
|
||||
value={preciseCoordinate}
|
||||
snappedTo={snappedToObject}
|
||||
{state}
|
||||
|
@ -320,7 +322,12 @@
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div class={twJoin(!preciseInputIsTapped && "hidden", "absolute top-0 p-12 flex justify-center w-full")}>
|
||||
<div
|
||||
class={twJoin(
|
||||
!preciseInputIsTapped && "hidden",
|
||||
"absolute top-0 flex w-full justify-center p-12"
|
||||
)}
|
||||
>
|
||||
<NextButton on:click={confirm} clss="primary w-fit">
|
||||
<div class="flex w-full justify-end gap-x-2">
|
||||
<Tr t={Translations.t.general.add.confirmLocation} />
|
||||
|
|
|
@ -112,10 +112,13 @@
|
|||
<button
|
||||
slot="save-button"
|
||||
on:click={onDelete}
|
||||
class={twJoin((selectedTags === undefined && "disabled"), "primary flex bg-red-600")}
|
||||
class={twJoin(selectedTags === undefined && "disabled", "primary flex bg-red-600")}
|
||||
>
|
||||
<TrashIcon
|
||||
class={twJoin("ml-1 mr-2 h-6 w-6 rounded-full p-1", selectedTags !== undefined && "bg-red-600")}
|
||||
class={twJoin(
|
||||
"ml-1 mr-2 h-6 w-6 rounded-full p-1",
|
||||
selectedTags !== undefined && "bg-red-600"
|
||||
)}
|
||||
/>
|
||||
<Tr t={t.delete} />
|
||||
</button>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import NewPointLocationInput from "../../BigComponents/NewPointLocationInput.svelte"
|
||||
import LayerConfig from "../../../Models/ThemeConfig/LayerConfig"
|
||||
import { UIEventSource } from "../../../Logic/UIEventSource"
|
||||
import OpenBackgroundSelectorButton from "../../BigComponents/OpenBackgroundSelectorButton.svelte";
|
||||
import OpenBackgroundSelectorButton from "../../BigComponents/OpenBackgroundSelectorButton.svelte"
|
||||
|
||||
export let importFlow: PointImportFlowState
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
import { ImportFlowUtils } from "./ImportFlow"
|
||||
import { GeoOperations } from "../../../Logic/GeoOperations"
|
||||
import ConflateImportFlowState from "./ConflateImportFlowState"
|
||||
import OpenBackgroundSelectorButton from "../../BigComponents/OpenBackgroundSelectorButton.svelte";
|
||||
import OpenBackgroundSelectorButton from "../../BigComponents/OpenBackgroundSelectorButton.svelte"
|
||||
|
||||
export let importFlow: WayImportFlowState | ConflateImportFlowState
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
class={twJoin(`mapping-icon-${mapping.iconClass}`, "mr-1")}
|
||||
src={mapping.icon}
|
||||
aria-hidden="true"
|
||||
alt="" />
|
||||
alt=""
|
||||
/>
|
||||
<SpecialTranslation t={mapping.then} {tags} {state} {layer} feature={selectedElement} />
|
||||
</div>
|
||||
{:else if mapping.then !== undefined}
|
||||
|
|
|
@ -277,7 +277,8 @@
|
|||
<slot name="save-button" {selectedTags}>
|
||||
<button
|
||||
on:click={onSave}
|
||||
class={twJoin(selectedTags === undefined ? "disabled" : "button-shadow", "primary")}>
|
||||
class={twJoin(selectedTags === undefined ? "disabled" : "button-shadow", "primary")}
|
||||
>
|
||||
<Tr t={Translations.t.general.save} />
|
||||
</button>
|
||||
</slot>
|
||||
|
|
|
@ -48,9 +48,9 @@
|
|||
import { OpenJosm } from "./BigComponents/OpenJosm"
|
||||
import MapillaryLink from "./BigComponents/MapillaryLink.svelte"
|
||||
import OpenIdEditor from "./BigComponents/OpenIdEditor.svelte"
|
||||
import OpenBackgroundSelectorButton from "./BigComponents/OpenBackgroundSelectorButton.svelte";
|
||||
import Loading from "./Base/Loading.svelte";
|
||||
import StateIndicator from "./BigComponents/StateIndicator.svelte";
|
||||
import OpenBackgroundSelectorButton from "./BigComponents/OpenBackgroundSelectorButton.svelte"
|
||||
import Loading from "./Base/Loading.svelte"
|
||||
import StateIndicator from "./BigComponents/StateIndicator.svelte"
|
||||
|
||||
export let state: ThemeViewState
|
||||
let layout = state.layout
|
||||
|
@ -114,7 +114,6 @@
|
|||
<MaplibreMap map={maplibremap} />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pointer-events-none absolute top-0 left-0 w-full">
|
||||
<!-- Top components -->
|
||||
<If condition={state.featureSwitches.featureSwitchSearch}>
|
||||
|
@ -158,7 +157,8 @@
|
|||
<div class="alert w-fit">Testmode</div>
|
||||
</If>
|
||||
</div>
|
||||
<div class="flex justify-center w-full"> <!-- Flex and w-full are needed for the positioning -->
|
||||
<div class="flex w-full justify-center">
|
||||
<!-- Flex and w-full are needed for the positioning -->
|
||||
<!-- Centermessage -->
|
||||
<StateIndicator {state} />
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue