import {UIElement} from "../UIElement"; import {UIEventSource} from "../../Logic/UIEventSource"; import {LayoutConfigJson} from "../../Customizations/JSON/LayoutConfigJson"; import Combine from "../Base/Combine"; import {VariableUiElement} from "../Base/VariableUIElement"; import UserDetails from "../../Logic/Osm/OsmConnection"; export default class SharePanel extends UIElement { private _config: UIEventSource; private _panel: UIElement; constructor(config: UIEventSource, liveUrl: UIEventSource, userDetails: UserDetails) { super(undefined); this._config = config; this._panel = new Combine([ "

Share

", "Share the following link with friends:
", new VariableUiElement(liveUrl.map(url => `${url}`)), "

Publish on some website

", "It is possible to load a JSON-file from the wide internet, but you'll need some (public CORS-enabled) server.", `Put the raw json online, and use ${window.location.host}?userlayout=https://.json`, "Please note: it used to be possible to load from the wiki - this is not possible anymore due to technical reasons.", "" ]); } InnerRender(): string { return this._panel.Render(); } }