Small workaround for share api which does not share the hash
This commit is contained in:
parent
4700e71d2e
commit
02ce4e5d7e
6 changed files with 13 additions and 3 deletions
|
@ -85,6 +85,11 @@ export class InitUiElements {
|
||||||
throw "Incorrect layout"
|
throw "Incorrect layout"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const hashContent = QueryParameters.GetQueryParameter("hash_content", "", "A workaround for the share-api which doesn't share the hash...");
|
||||||
|
if((hashContent.data ?? "") !== ""){
|
||||||
|
window.location.hash = hashContent.data;
|
||||||
|
}
|
||||||
|
|
||||||
console.log("Using layout: ", layoutToUse.id, "LayoutFromBase64 is ", layoutFromBase64);
|
console.log("Using layout: ", layoutToUse.id, "LayoutFromBase64 is ", layoutFromBase64);
|
||||||
State.state = new State(layoutToUse);
|
State.state = new State(layoutToUse);
|
||||||
|
|
||||||
|
|
2
State.ts
2
State.ts
|
@ -23,7 +23,7 @@ export default class State {
|
||||||
// The singleton of the global state
|
// The singleton of the global state
|
||||||
public static state: State;
|
public static state: State;
|
||||||
|
|
||||||
public static vNumber = "0.2.2";
|
public static vNumber = "0.2.2a";
|
||||||
|
|
||||||
// The user journey states thresholds when a new feature gets unlocked
|
// The user journey states thresholds when a new feature gets unlocked
|
||||||
public static userJourney = {
|
public static userJourney = {
|
||||||
|
|
|
@ -12,6 +12,9 @@ export default class ShareButton extends UIElement{
|
||||||
super();
|
super();
|
||||||
this._embedded = embedded;
|
this._embedded = embedded;
|
||||||
this._shareData = shareData;
|
this._shareData = shareData;
|
||||||
|
if(this._shareData.url.indexOf("#")> 0){
|
||||||
|
this._shareData.url = this._shareData.url.replace("#","&hash_content=");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
InnerRender(): string {
|
InnerRender(): string {
|
||||||
|
|
|
@ -197,7 +197,8 @@
|
||||||
},
|
},
|
||||||
"phonelink",
|
"phonelink",
|
||||||
"wikipedialink",
|
"wikipedialink",
|
||||||
"osmlink"
|
"osmlink",
|
||||||
|
"sharelink"
|
||||||
],
|
],
|
||||||
"description": {
|
"description": {
|
||||||
"en": "A shop specifically selling bicycles or related items",
|
"en": "A shop specifically selling bicycles or related items",
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-bottom: 2px solid var(--foreground-color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.to-the-map span {
|
.to-the-map span {
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
border-bottom: 2px solid var(--foreground-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.featureinfobox-content {
|
.featureinfobox-content {
|
||||||
|
|
Loading…
Reference in a new issue