From 488fd168738800ce59d9cf1029f904aef3e28787 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 24 Nov 2020 11:10:43 +0100 Subject: [PATCH] Small bug fixes --- Svg.ts | 2 +- UI/Popup/FeatureInfoBox.ts | 4 ++- UI/ShareButton.ts | 1 - .../bike_repair_station.json | 31 ++++++++++++++++++- assets/svg/share.svg | 2 +- assets/tagRenderings/icons.json | 2 +- css/fullscreenmessagebox.css | 8 ++++- css/tagrendering.css | 3 +- index.css | 12 +++---- 9 files changed, 51 insertions(+), 14 deletions(-) diff --git a/Svg.ts b/Svg.ts index 1af5428..1f72d01 100644 --- a/Svg.ts +++ b/Svg.ts @@ -194,7 +194,7 @@ export default class Svg { public static search_svg() { return new FixedUiElement(Svg.search);} public static search_ui() { return new FixedUiElement(Svg.search_img);} - public static share = " image/svg+xml " + public static share = " image/svg+xml " public static share_img = Img.AsImageElement(Svg.share) public static share_svg() { return new FixedUiElement(Svg.share);} public static share_ui() { return new FixedUiElement(Svg.share_img);} diff --git a/UI/Popup/FeatureInfoBox.ts b/UI/Popup/FeatureInfoBox.ts index a643627..0e148f6 100644 --- a/UI/Popup/FeatureInfoBox.ts +++ b/UI/Popup/FeatureInfoBox.ts @@ -6,6 +6,7 @@ import QuestionBox from "./QuestionBox"; import Combine from "../Base/Combine"; import TagRenderingAnswer from "./TagRenderingAnswer"; import State from "../../State"; +import {FixedUiElement} from "../Base/FixedUiElement"; export class FeatureInfoBox extends UIElement { private _tags: UIEventSource; @@ -46,7 +47,8 @@ export class FeatureInfoBox extends UIElement { .SetClass("featureinfobox-titlebar"), new Combine([ ...this._renderings, - this._questionBox + this._questionBox, + new FixedUiElement("").SetClass("featureinfobox-tail") ] ).SetClass("featureinfobox-content"), ]).SetClass("featureinfobox") diff --git a/UI/ShareButton.ts b/UI/ShareButton.ts index a97327d..9fadc94 100644 --- a/UI/ShareButton.ts +++ b/UI/ShareButton.ts @@ -22,7 +22,6 @@ export default class ShareButton extends UIElement{ super.InnerUpdate(htmlElement); const self= this; htmlElement.addEventListener('click', () => { - alert("URL:" + self._shareData.url) if (navigator.share) { navigator.share(self._shareData).then(() => { console.log('Thanks for sharing!'); diff --git a/assets/layers/bike_repair_station/bike_repair_station.json b/assets/layers/bike_repair_station/bike_repair_station.json index daa1e3d..431c664 100644 --- a/assets/layers/bike_repair_station/bike_repair_station.json +++ b/assets/layers/bike_repair_station/bike_repair_station.json @@ -95,7 +95,8 @@ "condition": "operator=De Fietsambassade Gent" }, "wikipedialink", - "osmlink" + "osmlink", + "sharelink" ], "tagRenderings": [ "images", @@ -174,6 +175,34 @@ } ] }, + { + "question": { + "nl": "Wanneer is dit fietsherstelpunt open?", + "en": "When is this bicycle repair point opened?" + }, + "render": "{opening_hours_table()}", + "freeform": { + "key": "opening_hours", + "type": "opening_hours" + }, + "mappings": [ + { + "if": "opening_hours=24/7", + "then": { + "nl": "Dag en nacht open", + "en": "Always opened" + } + }, + { + "if": "opening_hours=", + "then": { + "nl": "Dag en nacht open", + "en": "Always opened" + }, + "hideInAnswer": true + } + ] + }, { "question": { "en": "Does this bike repair station have a special tool to repair your bike chain?", diff --git a/assets/svg/share.svg b/assets/svg/share.svg index 1347e23..2b18300 100644 --- a/assets/svg/share.svg +++ b/assets/svg/share.svg @@ -30,7 +30,7 @@ + style="fill:none !important;stroke-width:2.43863511;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke:#000000" /> WP", + "render": "WP", "condition": "wikipedia~*" }, "phonelink": { diff --git a/css/fullscreenmessagebox.css b/css/fullscreenmessagebox.css index 97dc0d5..4f67377 100644 --- a/css/fullscreenmessagebox.css +++ b/css/fullscreenmessagebox.css @@ -8,7 +8,7 @@ } .fullscreenmessage-content .featureinfobox { - padding: 1em; + padding-top: 1em; position: relative; } @@ -34,6 +34,12 @@ } +.fullscreenmessage-content .featureinfobox-tail { + display: block; + height: 1em; +} + + .to-the-map span { font-size: xx-large; } diff --git a/css/tagrendering.css b/css/tagrendering.css index 76bbf92..f725660 100644 --- a/css/tagrendering.css +++ b/css/tagrendering.css @@ -28,10 +28,11 @@ } .featureinfobox-content { - display:block; + display: block; max-height: 75vh; overflow-y: auto; overflow-x: hidden; + padding-top: 1em; } @media only screen and (max-width: 600px), only screen and (max-height: 600px) { .featureinfobox-content { diff --git a/index.css b/index.css index 655a69a..f013127 100644 --- a/index.css +++ b/index.css @@ -521,16 +521,16 @@ a { width: 1.5em; padding: 0.5em; padding-left: 0.4em; - fill: var(--subtle-detail-color-contrast); - stroke: var(--subtle-detail-color-contrast); + fill: var(--subtle-detail-color-contrast) !important; + stroke: var(--subtle-detail-color-contrast) !important; } .share-button svg path{ - fill: var(--subtle-detail-color-contrast); - stroke: var(--subtle-detail-color-contrast); + fill: var(--subtle-detail-color-contrast) !important; + stroke: var(--subtle-detail-color-contrast) !important; } .share-button svg circle{ - fill: var(--subtle-detail-color-contrast); - stroke: var(--subtle-detail-color-contrast); + fill: var(--subtle-detail-color-contrast) !important; + stroke: var(--subtle-detail-color-contrast) !important; }