Hide edit buttons when not logged in, css tweaks

This commit is contained in:
Pieter Vander Vennet 2020-07-13 16:18:04 +02:00
parent bedb55e25f
commit ff1690e307
11 changed files with 50 additions and 29 deletions

View file

@ -21,6 +21,7 @@ import {VariableUiElement} from "./UI/Base/VariableUIElement";
import {SearchAndGo} from "./UI/SearchAndGo";
import {CollapseButton} from "./UI/Base/CollapseButton";
import {AllKnownLayouts} from "./Customizations/AllKnownLayouts";
import {All} from "./Customizations/Layouts/All";
@ -50,6 +51,23 @@ if (location.hostname === "localhost" || location.hostname === "127.0.0.1") {
let defaultQuest = "buurtnatuur"
for (const k in AllKnownLayouts.allSets) {
const layout = AllKnownLayouts.allSets[k];
const possibleParts = layout.locationContains ?? [];
console.log(layout.locationContains)
for (const locationMatch of possibleParts) {
if(locationMatch === ""){
continue
}
console.log(layout.name," -> ", locationMatch, window.location.href.indexOf(locationMatch))
if(window.location.href.toLowerCase().indexOf(locationMatch.toLowerCase()) >= 0){
defaultQuest = layout.name;
console.log("Detected a default by URL: ", layout.name, "matches", locationMatch)
}
}
}
if (window.location.search) {
const params = window.location.search.substr(1).split("&");
const paramDict: any = {};