forked from coracle/flotilla
Get rid of profile detail, redirect externally
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
$: className = `text-left ${$$props.class}`
|
||||
</script>
|
||||
|
||||
{#if type === 'submit'}
|
||||
{#if type === "submit"}
|
||||
<button {...$$props} {type} class={className}>
|
||||
<slot />
|
||||
</button>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<slot name="input" />
|
||||
</div>
|
||||
{#if $$slots.info}
|
||||
<p class="col-span-2 text-sm flex-end">
|
||||
<p class="flex-end col-span-2 text-sm">
|
||||
<slot name="info" />
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
import {NodeViewWrapper} from "svelte-tiptap"
|
||||
import {displayProfile} from "@welshman/util"
|
||||
import {deriveProfile} from "@welshman/app"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ProfileDetail from "@app/components/ProfileDetail.svelte"
|
||||
import {pushDrawer} from "@app/modal"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import {pubkeyLink} from "@app/state"
|
||||
|
||||
export let node: NodeViewProps["node"]
|
||||
export let selected: NodeViewProps["selected"]
|
||||
|
||||
const onClick = () => pushDrawer(ProfileDetail, {pubkey: node.attrs.pubkey})
|
||||
|
||||
$: profile = deriveProfile(node.attrs.pubkey, node.attrs.relays)
|
||||
</script>
|
||||
|
||||
<NodeViewWrapper class="inline">
|
||||
<Button on:click={onClick} class={cx("link-content", {"link-content-selected": selected})}>
|
||||
<Link
|
||||
external
|
||||
href={pubkeyLink(node.attrs.pubkey, node.attrs.relays)}
|
||||
class={cx("link-content", {"link-content-selected": selected})}>
|
||||
@{displayProfile($profile)}
|
||||
</Button>
|
||||
</Link>
|
||||
</NodeViewWrapper>
|
||||
|
||||
Reference in New Issue
Block a user