Fix usersettings which didn't load, add question category

This commit is contained in:
Pieter Vander Vennet 2024-07-23 22:13:32 +02:00
parent 4090a74932
commit 9e10c73791
2 changed files with 55 additions and 1 deletions

View file

@ -24,7 +24,10 @@
},
"minzoom": 6,
"=filter": [
"open_now"
"open_now",
"fetish",
"accepts_cash",
"accepts_cards"
],
"name": {
"en": "Erotic shops",
@ -42,6 +45,53 @@
"shop=erotic"
]
}
],
"tagRenderings+": [
{
"id": "fetish",
"multiAnswer": true,
"question": {
"en": "Does this shop offer fetish gear?"
},
"mappings": [
{
"if": "fetish:bdsm:soft=yes",
"ifnot": "fetish:bdsm:soft=no",
"then": {
"en": "This shop offers <b>soft BDSM-gear</b>, such as fluffy handcuffs, a 'fifty-shade-of-grey'-starterset, ..."
}
},
{
"if": "fetish:bdsm:specialized=yes",
"ifnot": "fetish:bdsm:specialized=no",
"then":{
"en": "This shop offers <b>specialized BDSM-gear</b>, such as spreader bars, supplies for needle play, medical bondage supplies, impact tools, shackles, metal colors, cuffs, nipple clamps, shibari accessories, ..."
}
},
{
"if": "fetish:pet_play=yes",
"ifnot": "fetish:pet_play=no",
"then": {
"en": "This shop offers <b>pet play</b> accessories, such as puppy masks, animal masks, pony play, tails, hoof shoes, ..."
}
},
{
"if": "fetish:leather=yes",
"ifnot": "fetish:leather=no",
"then": {
"en": "This shop offers <b>leather gear</b>, including pants and shirts usable in daily life up till leather harnesses"
}
},
{
"if": "fetish:uniform=yes",
"ifnot": "fetish:uniform=no",
"then": {
"en": "This shop offers <b>uniforms</b> for roleplay, such nurse uniforms, military uniforms, police, school girl, french maid, ..."
}
}
]
}
]
}
},

View file

@ -13,6 +13,7 @@
import type { MapProperties } from "../Models/MapProperties"
import Geosearch from "./BigComponents/Geosearch.svelte"
import Translations from "./i18n/Translations"
import usersettings from "../assets/generated/layers/usersettings.json"
import {
CogIcon,
EyeIcon,
@ -73,6 +74,7 @@
import AboutMapComplete from "./BigComponents/AboutMapComplete.svelte"
import HotkeyTable from "./BigComponents/HotkeyTable.svelte"
import SelectedElementPanel from "./Base/SelectedElementPanel.svelte"
import { LayerConfigJson } from "../Models/ThemeConfig/Json/LayerConfigJson"
export let state: ThemeViewState
let layout = state.layout
@ -121,6 +123,7 @@
let visualFeedback = state.visualFeedback
let viewport: UIEventSource<HTMLDivElement> = new UIEventSource<HTMLDivElement>(undefined)
let mapproperties: MapProperties = state.mapProperties
let usersettingslayer = new LayerConfig(<LayerConfigJson> usersettings, "usersettings", true)
state.mapProperties.installCustomKeyboardHandler(viewport)
let canZoomIn = mapproperties.maxzoom.map(
(mz) => mapproperties.zoom.data < mz,
@ -603,6 +606,7 @@
</div>
<SelectedElementView
highlightedRendering={state.guistate.highlightedUserSetting}
layer={usersettingslayer}
selectedElement={{
type: "Feature",
properties: { id: "settings" },