Fix: special loginbutton now actually works

This commit is contained in:
Pieter Vander Vennet 2024-05-21 01:49:52 +02:00
parent 67f248b416
commit 6a4def67ca
2 changed files with 5 additions and 1 deletions

View file

@ -6,6 +6,10 @@
export let osmConnection: OsmConnection
export let clss: string | undefined = undefined
if(osmConnection === undefined){
console.error("No osmConnection passed into loginButton")
}
</script>
<button class={clss} on:click={() => osmConnection.AttemptLogin()} style="margin-left: 0">

View file

@ -1747,7 +1747,7 @@ console.log(">>> ",helpTexts.join("\n\n"))
): BaseUIElement {
return new Toggle(
undefined,
new SvelteUIElement(LoginButton),
new SvelteUIElement(LoginButton, {osmConnection: state.osmConnection}),
state.osmConnection.isLoggedIn
)
}