diff --git a/public/css/index-tailwind-output.css b/public/css/index-tailwind-output.css index 8612c8f83..504503242 100644 --- a/public/css/index-tailwind-output.css +++ b/public/css/index-tailwind-output.css @@ -3075,6 +3075,10 @@ input[type="range"].range-lg::-moz-range-thumb { border-width: 2px; } +.border-4 { + border-width: 4px; +} + .border-\[10px\] { border-width: 10px; } @@ -5527,7 +5531,7 @@ h2.group { .warning { /* The class to convey important information, but not as grave as 'alert' */ - background-color: var(--low-interaction-background); + background-color: var(--alert-color); color: var(--alert-foreground-color); font-weight: bold; border-radius: 1em; diff --git a/src/Logic/State/SearchState.ts b/src/Logic/State/SearchState.ts index fd004dfa3..4a45a892f 100644 --- a/src/Logic/State/SearchState.ts +++ b/src/Logic/State/SearchState.ts @@ -36,7 +36,7 @@ export default class SearchState { constructor(state: ThemeViewState) { this.state = state - + this.showSearchDrawer = state.guistate.pageStates.search this.searchTerm = QueryParameters.GetQueryParameter("q", "", "The term in the search field") this.locationSearchers = [ @@ -112,8 +112,6 @@ export default class SearchState { ) this.locationResults = new GeocodingFeatureSource(this.suggestions.stabilized(250)) - this.showSearchDrawer = new UIEventSource(false) - this.searchIsFocused.addCallbackAndRunD((sugg) => { if (sugg) { this.showSearchDrawer.set(true) diff --git a/src/Logic/Web/AndroidPolyfill.ts b/src/Logic/Web/AndroidPolyfill.ts index a81589283..4da7840de 100644 --- a/src/Logic/Web/AndroidPolyfill.ts +++ b/src/Logic/Web/AndroidPolyfill.ts @@ -113,6 +113,9 @@ export class AndroidPolyfill { DatabridgePluginSingleton.request<{ top: number, bottom: number }>({ key: "insets", }).then((result) => { + if(!result){ + return + } let v = result.value if(typeof v === "string"){ v = JSON.parse(v) diff --git a/src/Models/MenuState.ts b/src/Models/MenuState.ts index 70b658282..367dfd4a1 100644 --- a/src/Models/MenuState.ts +++ b/src/Models/MenuState.ts @@ -16,20 +16,21 @@ export type PageType = (typeof MenuState.pageNames)[number] */ export class MenuState { public static readonly pageNames = [ + "about_theme", + "background", "copyright", "copyright_icons", "community_index", - "hotkeys", - "privacy", - "filter", - "background", - "about_theme", "download", - "favourites", "failedImages", - "usersettings", - "share", + "favourites", + "filter", + "hotkeys", "menu", + "privacy", + "search", + "share", + "usersettings", ] as const /** @@ -172,6 +173,7 @@ export class MenuState { this._selectedElement.setData(undefined) return true } + } finally { this.isClosingAll = false } diff --git a/src/UI/Base/DrawerRight.svelte b/src/UI/Base/DrawerRight.svelte index cb835275f..b36fb4ef6 100644 --- a/src/UI/Base/DrawerRight.svelte +++ b/src/UI/Base/DrawerRight.svelte @@ -3,6 +3,8 @@ import { sineIn } from "svelte/easing" import { Store } from "../../Logic/UIEventSource.js" import { onMount } from "svelte" + import { AndroidPolyfill } from "../../Logic/Web/AndroidPolyfill" + import InsetSpacer from "./InsetSpacer.svelte" export let shown: Store let transitionParams = { @@ -16,11 +18,17 @@ hidden = !sh }) + // Does not need a 'top-inset-spacer' as the code below will apply the padding automatically let height = 0 - onMount(() => { + + function setHeight(){ let topbar = document.getElementById("top-bar") - height = topbar?.clientHeight ?? 0 - }) + height = (topbar?.clientHeight ?? 0) + AndroidPolyfill.getInsetSizes().top.data + } + + onMount(() => setHeight()) + AndroidPolyfill.getInsetSizes().top.addCallback(() => setHeight()) + +
+
-
+
+ +
diff --git a/src/UI/Base/FloatOver.svelte b/src/UI/Base/FloatOver.svelte index 406ddd11f..835727b36 100644 --- a/src/UI/Base/FloatOver.svelte +++ b/src/UI/Base/FloatOver.svelte @@ -1,36 +1,37 @@
{ console.log("OnClose") dispatch("close") }} - style="background-color: #00000088; z-index: 20" />
{ - console.log("Closing...") - dispatch("close") - }} + on:click={() => { dispatch("close") }} >
{}} > -
+
+
@@ -43,9 +44,9 @@
diff --git a/src/UI/Base/InsetSpacer.svelte b/src/UI/Base/InsetSpacer.svelte index 56e391936..694b2622c 100644 --- a/src/UI/Base/InsetSpacer.svelte +++ b/src/UI/Base/InsetSpacer.svelte @@ -1,8 +1,11 @@ -
+
diff --git a/src/UI/Base/Popup.svelte b/src/UI/Base/Popup.svelte index f5290107b..918e57f1a 100644 --- a/src/UI/Base/Popup.svelte +++ b/src/UI/Base/Popup.svelte @@ -1,6 +1,7 @@ {#if $$slots.header} diff --git a/src/UI/Base/SelectedElementPanel.svelte b/src/UI/Base/SelectedElementPanel.svelte index d570b741f..8bec15639 100644 --- a/src/UI/Base/SelectedElementPanel.svelte +++ b/src/UI/Base/SelectedElementPanel.svelte @@ -5,6 +5,8 @@ import SelectedElementTitle from "../BigComponents/SelectedElementTitle.svelte" import Loading from "./Loading.svelte" import { onDestroy } from "svelte" + import InsetSpacer from "./InsetSpacer.svelte" + import { AndroidPolyfill } from "../../Logic/Web/AndroidPolyfill" export let state: SpecialVisualizationState export let selected: Feature @@ -39,6 +41,7 @@ {:else}
+
diff --git a/src/UI/BigComponents/MenuDrawer.svelte b/src/UI/BigComponents/MenuDrawer.svelte index 82bb94d4d..964428ea8 100644 --- a/src/UI/BigComponents/MenuDrawer.svelte +++ b/src/UI/BigComponents/MenuDrawer.svelte @@ -10,7 +10,6 @@ import OpenIdEditor from "./OpenIdEditor.svelte" import OpenJosm from "../Base/OpenJosm.svelte" import MapillaryLink from "./MapillaryLink.svelte" - import UserRelatedState from "../../Logic/State/UserRelatedState" import ArrowDownTray from "@babeard/svelte-heroicons/mini/ArrowDownTray" import DownloadPanel from "../DownloadFlow/DownloadPanel.svelte" import Share from "@babeard/svelte-heroicons/solid/Share" @@ -25,20 +24,12 @@ import { UIEventSource } from "../../Logic/UIEventSource" import ChartBar from "@babeard/svelte-heroicons/solid/ChartBar" import QueueList from "@babeard/svelte-heroicons/solid/QueueList" - import { MenuState } from "../../Models/MenuState" - import { OsmConnection } from "../../Logic/Osm/OsmConnection" - import FeatureSwitchState from "../../Logic/State/FeatureSwitchState" - import ThemeConfig from "../../Models/ThemeConfig/ThemeConfig" - import type { MapProperties } from "../../Models/MapProperties" - import FavouritesFeatureSource from "../../Logic/FeatureSource/Sources/FavouritesFeatureSource" import Hotkeys from "../Base/Hotkeys" import MenuDrawerIndex from "./MenuDrawerIndex.svelte" import ThemeViewState from "../../Models/ThemeViewState" export let onlyLink: boolean export let state: ThemeViewState - let hotkeys = Hotkeys._docs - let userdetails = state.osmConnection.userDetails let theme = state.theme let featureSwitches = state.featureSwitches diff --git a/src/UI/BigComponents/MenuDrawerIndex.svelte b/src/UI/BigComponents/MenuDrawerIndex.svelte index 2fbcfa256..52bca91c8 100644 --- a/src/UI/BigComponents/MenuDrawerIndex.svelte +++ b/src/UI/BigComponents/MenuDrawerIndex.svelte @@ -333,8 +333,9 @@ Android {/if}
+ {#if onlyLink} + + {/if}
- {#if onlyLink} - - {/if} +
diff --git a/src/UI/BigComponents/SelectedElementView.svelte b/src/UI/BigComponents/SelectedElementView.svelte index 6240b7956..cd6f5a946 100644 --- a/src/UI/BigComponents/SelectedElementView.svelte +++ b/src/UI/BigComponents/SelectedElementView.svelte @@ -11,6 +11,8 @@ import BackButton from "../Base/BackButton.svelte" import TagRenderingEditableDynamic from "../Popup/TagRendering/TagRenderingEditableDynamic.svelte" import { LastClickFeatureSource } from "../../Logic/FeatureSource/Sources/LastClickFeatureSource" + import { AndroidPolyfill } from "../../Logic/Web/AndroidPolyfill" + import InsetSpacer from "../Base/InsetSpacer.svelte" export let state: SpecialVisualizationState export let selectedElement: Feature @@ -93,5 +95,7 @@ config.classes.join(" ")} /> {/each} + +
{/if} diff --git a/src/UI/Image/UploadingImageCounter.svelte b/src/UI/Image/UploadingImageCounter.svelte index d8d56ec12..49d72cf97 100644 --- a/src/UI/Image/UploadingImageCounter.svelte +++ b/src/UI/Image/UploadingImageCounter.svelte @@ -6,7 +6,7 @@ */ import type { SpecialVisualizationState } from "../SpecialVisualization" - import { Store } from "../../Logic/UIEventSource" + import { ImmutableStore, Store } from "../../Logic/UIEventSource" import type { NoteId, OsmTags, OsmId } from "../../Models/OsmFeature" import Translations from "../i18n/Translations" import Tr from "../Base/Tr.svelte" @@ -25,6 +25,9 @@ Number of images uploaded succesfully */ function getCount(input: Store): Store { + if(!input){ + return new ImmutableStore(0) + } if (featureId == "*") { return input.map((inp) => inp.length) } diff --git a/src/UI/Search/SearchResults.svelte b/src/UI/Search/SearchResults.svelte index 8e5d448bd..43d643ecc 100644 --- a/src/UI/Search/SearchResults.svelte +++ b/src/UI/Search/SearchResults.svelte @@ -17,6 +17,9 @@ import type { GeocodeResult } from "../../Logic/Search/GeocodingProvider" import { default as GeocodeResultSvelte } from "./GeocodeResult.svelte" + /** + * The big overview of all search bar results + */ export let state: WithSearchState let activeFilters: Store<(ActiveFilter & FilterSearchResult)[]> = state.layerState.activeFilters.map((fs) => diff --git a/src/UI/Studio/EditLayer.svelte b/src/UI/Studio/EditLayer.svelte index c561edfe1..a99eddd61 100644 --- a/src/UI/Studio/EditLayer.svelte +++ b/src/UI/Studio/EditLayer.svelte @@ -20,6 +20,7 @@ import DeleteButton from "./DeleteButton.svelte" import StudioHashSetter from "./StudioHashSetter" import TitledPanel from "../Base/TitledPanel.svelte" + import Popup from "../Base/Popup.svelte" const layerSchema: ConfigMeta[] = layerSchemaRaw diff --git a/src/UI/ThemeViewGUI.svelte b/src/UI/ThemeViewGUI.svelte index 65e22a932..9b89e409b 100644 --- a/src/UI/ThemeViewGUI.svelte +++ b/src/UI/ThemeViewGUI.svelte @@ -343,11 +343,13 @@
-
+
+ +
+ {}) { +export function dragDetection(htmlElement: HTMLElement, callback: () => void) { let isDown = false const threshold = 5 let start = null diff --git a/src/index.css b/src/index.css index 29f5405d5..3f5f17952 100644 --- a/src/index.css +++ b/src/index.css @@ -406,7 +406,7 @@ h2.group { .warning { /* The class to convey important information, but not as grave as 'alert' */ - background-color: var(--low-interaction-background); + background-color: var(--alert-color); color: var(--alert-foreground-color); font-weight: bold; border-radius: 1em; diff --git a/theme.html b/theme.html index 8d4fbce2f..ad6507306 100644 --- a/theme.html +++ b/theme.html @@ -74,7 +74,7 @@
-
+