diff --git a/UI/Base/ModalRight.svelte b/UI/Base/ModalRight.svelte index 9ba2f4ec5..6decdfd67 100644 --- a/UI/Base/ModalRight.svelte +++ b/UI/Base/ModalRight.svelte @@ -8,7 +8,7 @@ const dispatch = createEventDispatcher<{ close }>(); -
+
dispatch("close")}> diff --git a/UI/BigComponents/Geosearch.svelte b/UI/BigComponents/Geosearch.svelte index aa639a044..12980f5ae 100644 --- a/UI/BigComponents/Geosearch.svelte +++ b/UI/BigComponents/Geosearch.svelte @@ -43,7 +43,7 @@ } const result = await Geocoding.Search(searchContents, bounds.data); if (result.length == 0) { - feedback = Translations.t.search.nothing.txt; + feedback = Translations.t.general.search.nothing.txt; return; } const poi = result[0]; @@ -61,7 +61,7 @@ } } catch (e) { console.error(e); - feedback = Translations.t.search.error.txt; + feedback = Translations.t.general.search.error.txt; } finally { isRunning = false; } @@ -70,7 +70,7 @@
-
+ {#if isRunning} {Translations.t.general.search.searching} @@ -81,6 +81,7 @@ {:else } keypr.key === "Enter" ? performSearch() : undefined} diff --git a/UI/BigComponents/PdfExportGui.ts b/UI/BigComponents/PdfExportGui.ts index dd280e692..95cc929b0 100644 --- a/UI/BigComponents/PdfExportGui.ts +++ b/UI/BigComponents/PdfExportGui.ts @@ -1,21 +1,20 @@ import Combine from "../Base/Combine" -import { FlowPanelFactory, FlowStep } from "../ImportFlow/FlowStep" -import { ImmutableStore, Store, UIEventSource } from "../../Logic/UIEventSource" -import { InputElement } from "../Input/InputElement" -import { SvgToPdf, SvgToPdfOptions } from "../../Utils/svgToPdf" -import { FixedInputElement } from "../Input/FixedInputElement" -import { FixedUiElement } from "../Base/FixedUiElement" +import {FlowPanelFactory, FlowStep} from "../ImportFlow/FlowStep" +import {ImmutableStore, Store, UIEventSource} from "../../Logic/UIEventSource" +import {InputElement} from "../Input/InputElement" +import {SvgToPdf, SvgToPdfOptions} from "../../Utils/svgToPdf" +import {FixedInputElement} from "../Input/FixedInputElement" +import {FixedUiElement} from "../Base/FixedUiElement" import FileSelectorButton from "../Input/FileSelectorButton" import InputElementMap from "../Input/InputElementMap" -import { RadioButton } from "../Input/RadioButton" -import { Utils } from "../../Utils" -import { VariableUiElement } from "../Base/VariableUIElement" +import {RadioButton} from "../Input/RadioButton" +import {Utils} from "../../Utils" +import {VariableUiElement} from "../Base/VariableUIElement" import Loading from "../Base/Loading" import BaseUIElement from "../BaseUIElement" import Img from "../Base/Img" import Title from "../Base/Title" -import { CheckBox } from "../Input/Checkboxes" -import SearchAndGo from "./SearchAndGo" +import {CheckBox} from "../Input/Checkboxes" import Toggle from "../Input/Toggle" import List from "../Base/List" import LeftIndex from "../Base/LeftIndex" @@ -24,7 +23,7 @@ import Toggleable from "../Base/Toggleable" import Lazy from "../Base/Lazy" import LinkToWeblate from "../Base/LinkToWeblate" import Link from "../Base/Link" -import { AllLanguagesSelector } from "../Popup/AllLanguagesSelector" +import {AllLanguagesSelector} from "../Popup/AllLanguagesSelector" class SelectTemplate extends Combine implements FlowStep<{ title: string; pages: string[] }> { readonly IsValid: Store @@ -158,7 +157,7 @@ class SelectPdfOptions false ) const locationInput = Minimap.createMiniMap().SetClass("block w-full") - const searchField = new SearchAndGo({ leafletMap: locationInput.leafletMap }) + const searchField = undefined // new SearchAndGo({ leafletMap: locationInput.leafletMap }) const selectLocation = new Combine([ new Toggle( new Combine([new Title("Select override location"), searchField]).SetClass("flex"), diff --git a/UI/BigComponents/SearchAndGo.ts b/UI/BigComponents/SearchAndGo.ts deleted file mode 100644 index f6063c860..000000000 --- a/UI/BigComponents/SearchAndGo.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { Store, UIEventSource } from "../../Logic/UIEventSource" -import { Translation } from "../i18n/Translation" -import Svg from "../../Svg" -import { TextField } from "../Input/TextField" -import { Geocoding } from "../../Logic/Osm/Geocoding" -import Translations from "../i18n/Translations" -import Hash from "../../Logic/Web/Hash" -import Combine from "../Base/Combine" -import Locale from "../i18n/Locale" -import { BBox } from "../../Logic/BBox" - -export default class SearchAndGo extends Combine { - private readonly _searchField: TextField - constructor(state: { - leafletMap: UIEventSource - selectedElement?: UIEventSource - bounds?: Store - }) { - const goButton = Svg.search_ui().SetClass("w-8 h-8 full-rounded border-black float-right") - - const placeholder = new UIEventSource(Translations.t.general.search.search) - const searchField = new TextField({ - placeholder: placeholder.map( - (tr) => tr.textFor(Locale.language.data), - [Locale.language] - ), - value: new UIEventSource(""), - inputStyle: - " background: transparent;\n" + - " border: none;\n" + - " font-size: large;\n" + - " width: 100%;\n" + - " height: 100%;\n" + - " box-sizing: border-box;\n" + - " color: var(--foreground-color);", - }) - - searchField.SetClass("relative float-left mt-0 ml-2") - searchField.SetStyle("width: calc(100% - 3em);height: 100%") - - super([searchField, goButton]) - - this.SetClass("block h-8") - this.SetStyle( - "background: var(--background-color); color: var(--foreground-color); pointer-evetns:all;" - ) - - // Triggered by 'enter' or onclick - async function runSearch() { - const searchString = searchField.GetValue().data - if (searchString === undefined || searchString === "") { - return - } - searchField.GetValue().setData("") - placeholder.setData(Translations.t.general.search.searching) - try { - const result = await Geocoding.Search(searchString, state.bounds.data) - - console.log("Search result", result) - if (result.length == 0) { - placeholder.setData(Translations.t.general.search.nothing) - return - } - - const poi = result[0] - const bb = poi.boundingbox - const bounds: [[number, number], [number, number]] = [ - [bb[0], bb[2]], - [bb[1], bb[3]], - ] - state.selectedElement?.setData(undefined) - Hash.hash.setData(poi.osm_type + "/" + poi.osm_id) - state.leafletMap.data.fitBounds(bounds) - placeholder.setData(Translations.t.general.search.search) - } catch (e) { - searchField.GetValue().setData("") - placeholder.setData(Translations.t.general.search.error) - } - } - - searchField.enterPressed.addCallback(runSearch) - this._searchField = searchField - goButton.onClick(runSearch) - } - - focus() { - this._searchField.focus() - } -} diff --git a/UI/BigComponents/SelectedElementView.svelte b/UI/BigComponents/SelectedElementView.svelte index 5a5b732fc..3632741ab 100644 --- a/UI/BigComponents/SelectedElementView.svelte +++ b/UI/BigComponents/SelectedElementView.svelte @@ -32,7 +32,7 @@ {#if _tags._deleted === "yes"} {:else} -
+
diff --git a/UI/Popup/AllTagsPanel.svelte b/UI/Popup/AllTagsPanel.svelte index 6baa5009b..c178563f3 100644 --- a/UI/Popup/AllTagsPanel.svelte +++ b/UI/Popup/AllTagsPanel.svelte @@ -57,7 +57,7 @@ onDestroy(allTags.addCallbackAndRunD(allTags => { _allTags = allTags; })); - const tagsTable = new Table(["Key", "Value"], _allTags).SetClass("zebra-table"); + const tagsTable = new Table(["Key", "Value"], _allTags).SetClass("zebra-table break-all");
diff --git a/UI/ThemeViewGUI.svelte b/UI/ThemeViewGUI.svelte index 676ce6eed..7c304d1e7 100644 --- a/UI/ThemeViewGUI.svelte +++ b/UI/ThemeViewGUI.svelte @@ -134,7 +134,7 @@ v !== undefined && selectedLayer.data !== undefined && !selectedLayer.data.popupInFloatover,[ selectedLayer] )}> {selectedElement.setData(undefined)}}> - + diff --git a/css/index-tailwind-output.css b/css/index-tailwind-output.css index 74a5c95b0..af9897acb 100644 --- a/css/index-tailwind-output.css +++ b/css/index-tailwind-output.css @@ -1171,10 +1171,6 @@ video { flex-shrink: 0; } -.flex-grow { - flex-grow: 1; -} - .grow { flex-grow: 1; } @@ -1301,12 +1297,6 @@ video { row-gap: 0.25rem; } -.space-x-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(0.5rem * var(--tw-space-x-reverse)); - margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); -} - .self-end { align-self: flex-end; } @@ -1323,8 +1313,8 @@ video { overflow: hidden; } -.overflow-scroll { - overflow: scroll; +.overflow-y-auto { + overflow-y: auto; } .truncate { @@ -1374,10 +1364,6 @@ video { border-radius: 0.375rem; } -.rounded-2xl { - border-radius: 1rem; -} - .rounded-sm { border-radius: 0.125rem; } @@ -1407,8 +1393,8 @@ video { border-bottom-width: 1px; } -.border-solid { - border-style: solid; +.border-b-2 { + border-bottom-width: 2px; } .border-dashed { @@ -1600,14 +1586,14 @@ video { padding-left: 0.75rem; } -.pl-1 { - padding-left: 0.25rem; -} - .pr-0 { padding-right: 0px; } +.pl-1 { + padding-left: 0.25rem; +} + .pr-1 { padding-right: 0.25rem; } @@ -1773,6 +1759,12 @@ video { filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); } +.drop-shadow-2xl { + --tw-drop-shadow: drop-shadow(0 25px 25px rgb(0 0 0 / 0.15)); + -webkit-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + .grayscale { --tw-grayscale: grayscale(100%); -webkit-filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); @@ -2128,7 +2120,7 @@ li::marker { } .shadow { - box-shadow: 0 0 10px var(--shadow-color); + box-shadow: 0 0 20px var(--shadow-color); } .title-font span { @@ -2378,10 +2370,6 @@ input { max-width: 36rem; } - .sm\:flex-row { - flex-direction: row; - } - .sm\:items-stretch { align-items: stretch; } diff --git a/index.css b/index.css index 61ef17031..f3fe601b0 100644 --- a/index.css +++ b/index.css @@ -344,7 +344,7 @@ li::marker { } .shadow { - box-shadow: 0 0 10px var(--shadow-color); + box-shadow: 0 0 20px var(--shadow-color); } .title-font span { diff --git a/package.json b/package.json index c2ec8251c..564140159 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapcomplete", - "version": "0.30.2", + "version": "0.30.3", "repository": "https://github.com/pietervdvn/MapComplete", "description": "A small website to edit OSM easily", "bugs": "https://github.com/pietervdvn/MapComplete/issues",