Themes: add 'lock' and 'key' icon to toilets, fix #2094

This commit is contained in:
Pieter Vander Vennet 2024-08-25 00:03:44 +02:00
parent 1485ea9d36
commit 577b596e7a
3 changed files with 26 additions and 0 deletions

View file

@ -51,6 +51,23 @@
{
"if": "opening_hours~*",
"then": "icons.isOpen"
},
{
"if": {
"or": [
"access=no",
"access=private"
]
},
"then": "lock"
},
{
"if": "access=key",
"then": "key"
},
{
"if": "access=customers",
"then": "key:gray"
}
],
"location": [
@ -203,6 +220,7 @@
},
{
"if": "access=no",
"alsoShowIf": "access=private",
"then": {
"en": "Not accessible",
"de": "Der Zugang ist nicht erlaubt oder nicht möglich",

View file

@ -141,12 +141,14 @@ export default class Constants {
"help",
"help",
"home",
"key",
"invalid",
"invalid",
"link",
"location",
"location_empty",
"location_locked",
"lock",
"mastodon",
"not_found",
"note",

View file

@ -39,6 +39,8 @@
import Gear from "../../assets/svg/Gear.svelte"
import { DesktopComputerIcon, UserCircleIcon } from "@rgossiaux/svelte-heroicons/solid"
import Relocation from "../../assets/svg/Relocation.svelte"
import LockClosed from "@babeard/svelte-heroicons/solid/LockClosed"
import Key from "@babeard/svelte-heroicons/solid/Key"
/**
* Renders a single icon.
@ -146,6 +148,10 @@
<PencilIcon class={clss} {color} />
{:else if icon === "user_circle"}
<UserCircleIcon class={clss} {color} />
{:else if icon === "lock"}
<LockClosed class={clss} {color} />
{:else if icon === "key"}
<Key class={clss} {color} />
{:else if Utils.isEmoji(icon)}
<span style={`font-size: ${emojiHeight}; line-height: ${emojiHeight}`}>
{icon}