forked from MapComplete/MapComplete
Fix: special loginbutton now actually works
This commit is contained in:
parent
67f248b416
commit
6a4def67ca
2 changed files with 5 additions and 1 deletions
|
@ -6,6 +6,10 @@
|
||||||
|
|
||||||
export let osmConnection: OsmConnection
|
export let osmConnection: OsmConnection
|
||||||
export let clss: string | undefined = undefined
|
export let clss: string | undefined = undefined
|
||||||
|
|
||||||
|
if(osmConnection === undefined){
|
||||||
|
console.error("No osmConnection passed into loginButton")
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<button class={clss} on:click={() => osmConnection.AttemptLogin()} style="margin-left: 0">
|
<button class={clss} on:click={() => osmConnection.AttemptLogin()} style="margin-left: 0">
|
||||||
|
|
|
@ -1747,7 +1747,7 @@ console.log(">>> ",helpTexts.join("\n\n"))
|
||||||
): BaseUIElement {
|
): BaseUIElement {
|
||||||
return new Toggle(
|
return new Toggle(
|
||||||
undefined,
|
undefined,
|
||||||
new SvelteUIElement(LoginButton),
|
new SvelteUIElement(LoginButton, {osmConnection: state.osmConnection}),
|
||||||
state.osmConnection.isLoggedIn
|
state.osmConnection.isLoggedIn
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue