Merge branch 'master' into develop

This commit is contained in:
Pieter Vander Vennet 2025-08-26 02:48:27 +02:00
commit cce74fc40a
36 changed files with 597 additions and 244 deletions

View file

@ -3,9 +3,13 @@
import { fade } from "svelte/transition"
import { OsmConnection } from "../../Logic/Osm/OsmConnection"
import { onDestroy } from "svelte"
import If from "../Base/If.svelte"
import type { Store } from "../../Logic/UIEventSource"
import Translations from "../i18n/Translations"
import Tr from "../Base/Tr.svelte"
let open = false
export let state: { osmConnection: OsmConnection }
export let state: { osmConnection: OsmConnection, featureSwitches: { featureSwitchEnableLogin: Store<boolean> } }
let userdetails = state.osmConnection.userDetails
let username = userdetails.mapD((ud) => ud.name, onDestroy)
username.addCallbackAndRunD((ud) => {
@ -18,25 +22,28 @@
})
</script>
<Popover
class="mt-4 hidden sm:block"
defaultClass="py-2 px-3 w-fit "
trigger="null"
placement="bottom"
transition={(e) => fade(e, { duration: 150 })}
bind:open
>
{#if $username !== undefined}
<div style="width: max-content" class="flex items-center">
{#if $userdetails.img}
<img src={$userdetails.img} alt="avatar" class="mr-4 h-10 w-10 rounded-full" />
{/if}
<div>
<div>Welcome back</div>
<div class="normal-background" style="width: max-content">
<b>{$username}</b>
<If condition={state.featureSwitches.featureSwitchEnableLogin}>
<Popover
class="mt-4 hidden sm:block"
defaultClass="py-2 px-3 w-fit "
trigger="null"
placement="bottom"
transition={(e) => fade(e, { duration: 150 })}
bind:open
>
{#if $username !== undefined}
<div style="width: max-content" class="flex items-center">
{#if $userdetails.img}
<img src={$userdetails.img} alt="avatar" class="mr-4 h-10 w-10 rounded-full" />
{/if}
<div>
<Tr t={Translations.t.general.welcomeBack}/>
<div class="normal-background" style="width: max-content">
<b>{$username}</b>
</div>
</div>
</div>
</div>
{/if}
</Popover>
{/if}
</Popover>
</If>

View file

@ -56,9 +56,6 @@
if (schema.type === "boolean") {
rendervalue = undefined
}
if (schema.hints.typehint === "tag" || schema.hints.typehint === "simple_tag") {
rendervalue = "{tags()}"
}
let helperArgs = schema.hints.typehelper?.split(",")
let inline = schema.hints.inline !== undefined