forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
94c61744c0
commit
04c8ccb0d2
89 changed files with 2353 additions and 1390 deletions
|
|
@ -16,9 +16,8 @@
|
|||
function showFor(timeoutSeconds: number = 5) {
|
||||
open = true
|
||||
window.setTimeout(() => {
|
||||
open = false
|
||||
},
|
||||
timeoutSeconds * 1000)
|
||||
open = false
|
||||
}, timeoutSeconds * 1000)
|
||||
}
|
||||
|
||||
mapIsDragged.addCallback(() => {
|
||||
|
|
@ -28,27 +27,30 @@
|
|||
}
|
||||
})
|
||||
gpsState.requestMoment.stabilized(50).addCallback(() => {
|
||||
if(gpsState.gpsAvailable.data && gpsState.allowMoving.data){
|
||||
if (gpsState.gpsAvailable.data && gpsState.allowMoving.data) {
|
||||
return
|
||||
}
|
||||
showFor(5)
|
||||
})
|
||||
let explanation = gpsState.gpsStateExplanation
|
||||
onDestroy(
|
||||
explanation.stabilized(50).addCallbackD(
|
||||
expl => {
|
||||
if (expl) {
|
||||
showFor(5)
|
||||
} else {
|
||||
open = false
|
||||
}
|
||||
},
|
||||
),
|
||||
explanation.stabilized(50).addCallbackD((expl) => {
|
||||
if (expl) {
|
||||
showFor(5)
|
||||
} else {
|
||||
open = false
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
</script>
|
||||
|
||||
<Popover reference={undefined} trigger=null placement="left" transition={e => fade(e, {duration: 150})} bind:open>
|
||||
<Popover
|
||||
reference={undefined}
|
||||
trigger="null"
|
||||
placement="left"
|
||||
transition={(e) => fade(e, { duration: 150 })}
|
||||
bind:open
|
||||
>
|
||||
<div class="break-words" style="max-width: calc( 100vw - 8rem)">
|
||||
<Tr t={$explanation} />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<script lang="ts">
|
||||
|
||||
import { Popover } from "flowbite-svelte"
|
||||
import { fade } from "svelte/transition"
|
||||
import { OsmConnection } from "../../Logic/Osm/OsmConnection"
|
||||
|
|
@ -8,23 +7,28 @@
|
|||
export let state: { osmConnection: OsmConnection }
|
||||
let userdetails = state.osmConnection.userDetails
|
||||
|
||||
userdetails.addCallbackAndRunD(ud => {
|
||||
userdetails.addCallbackAndRunD((ud) => {
|
||||
if (ud) {
|
||||
open = true
|
||||
window.setTimeout(() => {
|
||||
open = false
|
||||
open = false
|
||||
}, 5000)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<Popover class="mt-4 z-50" defaultClass="py-2 px-3 w-fit " trigger=null placement="bottom"
|
||||
transition={e => fade(e, {duration: 150})} bind:open>
|
||||
<Popover
|
||||
class="z-50 mt-4"
|
||||
defaultClass="py-2 px-3 w-fit "
|
||||
trigger="null"
|
||||
placement="bottom"
|
||||
transition={(e) => fade(e, { duration: 150 })}
|
||||
bind:open
|
||||
>
|
||||
{#if $userdetails !== undefined}
|
||||
<div style="width: max-content" class="flex items-center">
|
||||
{#if $userdetails.img}
|
||||
<img src={$userdetails.img } alt="profile picture" class="w-8 h-8 rounded-full mr-4" />
|
||||
<img src={$userdetails.img} alt="profile picture" class="mr-4 h-8 w-8 rounded-full" />
|
||||
{/if}
|
||||
<div>
|
||||
<div>Welcome back</div>
|
||||
|
|
@ -35,4 +39,3 @@
|
|||
</div>
|
||||
{/if}
|
||||
</Popover>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue