From dd8f5e549efd8b7c0212c5862bd67c2dbf1ca5af Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 31 Jul 2020 21:54:30 +0200 Subject: [PATCH] Small fixes --- Customizations/Layers/GhostBike.ts | 2 +- Logic/CustomLayersPanel.ts | 3 ++- Logic/Osm/OsmConnection.ts | 2 +- UI/ShareScreen.ts | 2 +- preferences.ts | 4 ++++ 5 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 preferences.ts diff --git a/Customizations/Layers/GhostBike.ts b/Customizations/Layers/GhostBike.ts index 05a6543..7619533 100644 --- a/Customizations/Layers/GhostBike.ts +++ b/Customizations/Layers/GhostBike.ts @@ -14,7 +14,7 @@ export class GhostBike extends LayerDefinition { " in the form of a white bicycle placed permanently near the accident location."; this.minzoom = 1; - + this.icon = "./assets/bike.svg" this.presets = [ { title: "Ghost bike", diff --git a/Logic/CustomLayersPanel.ts b/Logic/CustomLayersPanel.ts index ede6064..087b95e 100644 --- a/Logic/CustomLayersPanel.ts +++ b/Logic/CustomLayersPanel.ts @@ -39,7 +39,8 @@ export class CustomLayersPanel extends UIElement { if(layout.name === CustomLayout.NAME){ continue; } - if (layout.hideFromOverview && State.state.osmConnection.userDetails.data.name !== "Pieter Vander Vennet") { + if (layout.hideFromOverview && + State.state.osmConnection.userDetails.data.name !== "Pieter Vander Vennet") { continue } diff --git a/Logic/Osm/OsmConnection.ts b/Logic/Osm/OsmConnection.ts index 3411ba6..314b399 100644 --- a/Logic/Osm/OsmConnection.ts +++ b/Logic/Osm/OsmConnection.ts @@ -36,7 +36,7 @@ export class OsmConnection { const iframeMode = window !== window.top; - if (pwaStandAloneMode || iframeMode) { + if ( iframeMode) { // In standalone mode, we DON'T use single page login, as 'redirecting' opens a new window anyway... // Same for an iframe... this.auth = new osmAuth({ diff --git a/UI/ShareScreen.ts b/UI/ShareScreen.ts index 8b6e2b1..e132b94 100644 --- a/UI/ShareScreen.ts +++ b/UI/ShareScreen.ts @@ -96,7 +96,7 @@ export class ShareScreen extends UIElement { this._iframeCode = new VariableUiElement( url.map((url) => { return ` - <iframe src="${url}" title="${layout.name} with MapComplete"></iframe> + <iframe src="${url}" style="width:100%;height:100%" title="${layout.name} with MapComplete"></iframe> ` }) ); diff --git a/preferences.ts b/preferences.ts new file mode 100644 index 0000000..2691186 --- /dev/null +++ b/preferences.ts @@ -0,0 +1,4 @@ +import {OsmConnection} from "./Logic/Osm/OsmConnection"; + + +const connection = new OsmConnection(false, undefined);