Fix rendering of multianswers without explicit 'render'-field

This commit is contained in:
Pieter Vander Vennet 2021-01-06 01:11:07 +01:00
parent 52d9b2f452
commit a35b80afbb
11 changed files with 195 additions and 97 deletions

View file

@ -147,13 +147,15 @@ export default class ShareScreen extends UIElement {
const url = (currentLocation ?? new UIEventSource(undefined)).map(() => {
const host = window.location.host;
let literalText = `https://${host}/${layout.id.toLowerCase()}.html`
let path = window.location.pathname;
path = path.substr(0, path.lastIndexOf("/"));
let literalText = `https://${host}${path}/${layout.id.toLowerCase()}`
const parts = Utils.NoEmpty(Utils.NoNull(optionParts.map((eventSource) => eventSource.data)));
let hash = "";
if (layoutDefinition !== undefined) {
literalText = `https://${host}/index.html`
literalText = `https://${host}${path}/`
if (layout.id.startsWith("wiki:")) {
parts.push("userlayout=" + encodeURIComponent(layout.id))
} else {