forked from coracle/flotilla
Add key signup, improve message listening
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<script lang="ts">
|
||||
import {sleep} from '@welshman/lib'
|
||||
|
||||
export let delay = 1
|
||||
</script>
|
||||
|
||||
{#await sleep(delay)}
|
||||
<!-- pass -->
|
||||
{:then}
|
||||
<slot />
|
||||
{/await}
|
||||
@@ -11,7 +11,7 @@
|
||||
transition:fade
|
||||
on:click={onClose} />
|
||||
<div
|
||||
class="card2 bg-alt absolute max-h-[90vh] w-[90vw] overflow-auto text-base-content sm:w-[520px]"
|
||||
class="relative card2 bg-alt absolute max-h-[90vh] w-[90vw] overflow-auto text-base-content sm:w-[520px]"
|
||||
transition:fly={{duration: 300}}>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
transition:fade
|
||||
on:click={onClose} />
|
||||
<div
|
||||
class="menu absolute bottom-0 right-0 top-0 w-80 overflow-auto bg-base-200 text-base-content lg:w-96"
|
||||
class="absolute bottom-0 right-0 top-0 w-80 overflow-auto bg-base-200 text-base-content lg:w-96"
|
||||
transition:slide={{axis: "x", duration: 300}}>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,42 @@
|
||||
<script lang="ts">
|
||||
import Profile from "@app/components/Profile.svelte"
|
||||
import {displayPubkey, getPubkeyTagValues, getListTags} from "@welshman/util"
|
||||
import {
|
||||
userFollows,
|
||||
deriveUserWotScore,
|
||||
deriveProfile,
|
||||
deriveHandleForPubkey,
|
||||
displayHandle,
|
||||
deriveProfileDisplay,
|
||||
} from "@welshman/app"
|
||||
import Avatar from "@lib/components/Avatar.svelte"
|
||||
import WotScore from "@lib/components/WotScore.svelte"
|
||||
import ProfileDetail from "@app/components/ProfileDetail.svelte"
|
||||
import {pushDrawer} from "@app/modal"
|
||||
|
||||
export let value
|
||||
|
||||
const pubkey = value
|
||||
const profile = deriveProfile(pubkey)
|
||||
const profileDisplay = deriveProfileDisplay(pubkey)
|
||||
const handle = deriveHandleForPubkey(pubkey)
|
||||
const score = deriveUserWotScore(pubkey)
|
||||
|
||||
$: following = getPubkeyTagValues(getListTags($userFollows)).includes(pubkey)
|
||||
</script>
|
||||
|
||||
<Profile pubkey={value} />
|
||||
<div class="flex max-w-full gap-3">
|
||||
<div class="py-1">
|
||||
<Avatar src={$profile?.picture} size={10} />
|
||||
</div>
|
||||
<div class="flex min-w-0 flex-col">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="text-bold overflow-hidden text-ellipsis">
|
||||
{$profileDisplay}
|
||||
</div>
|
||||
<WotScore score={$score} active={following} />
|
||||
</div>
|
||||
<div class="overflow-hidden text-ellipsis text-sm opacity-75">
|
||||
{$handle ? displayHandle($handle) : displayPubkey(pubkey)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,6 +13,7 @@ export function slideAndFade(
|
||||
node: any,
|
||||
{delay = 0, duration = 400, easing = cubicOut, axis = "y"} = {},
|
||||
) {
|
||||
console.log('slideAndFade')
|
||||
const style = getComputedStyle(node)
|
||||
const primary_property = axis === "y" ? "height" : "width"
|
||||
const primary_property_value = parseFloat(style[primary_property])
|
||||
@@ -46,3 +47,6 @@ export function slideAndFade(
|
||||
`border-${secondary_properties[1]}-width: ${t * border_width_end_value}px;`,
|
||||
}
|
||||
}
|
||||
|
||||
export const conditionalTransition = (condition: any, transition: any) =>
|
||||
(node: any, args?: any) => condition ? transtion(node, args) : null
|
||||
|
||||
Reference in New Issue
Block a user