Move layout around a bit more
This commit is contained in:
@@ -10,12 +10,13 @@
|
||||
export let depth = 0
|
||||
|
||||
const {id, identifier, kind, pubkey, relays} = value
|
||||
const idOrAddress = id || new Address(kind, pubkey, identifier).toString()
|
||||
const addr = new Address(kind, pubkey, identifier)
|
||||
const idOrAddress = id || addr.toString()
|
||||
const event = deriveEvent(idOrAddress, relays)
|
||||
const nevent = nip19.neventEncode({id, relays})
|
||||
const entity = id ? nip19.neventEncode({id, relays}) : addr.toNaddr()
|
||||
</script>
|
||||
|
||||
<Link external href={entityLink(nevent)} class="my-2 block max-w-full text-left">
|
||||
<Link external href={entityLink(entity)} class="my-2 block max-w-full text-left">
|
||||
{#if $event}
|
||||
<NoteCard event={$event} class="bg-alt rounded-box p-4">
|
||||
<slot name="note-content" event={$event} {depth} />
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div class="column menu gap-2">
|
||||
<Link href="/settings/relays">
|
||||
<CardButton>
|
||||
<div slot="icon"><Icon icon="remote-controller-minimalistic" size={7} /></div>
|
||||
<div slot="icon"><Icon icon="server" size={7} /></div>
|
||||
<div slot="title">Relays</div>
|
||||
<div slot="info">Control how Flotilla talks to the network</div>
|
||||
</CardButton>
|
||||
|
||||
@@ -21,37 +21,63 @@
|
||||
const showSettingsMenu = () => pushModal(MenuSettings)
|
||||
</script>
|
||||
|
||||
<div class="relative hidden w-14 flex-shrink-0 bg-base-100 pt-4 md:block">
|
||||
<div class="flex h-full flex-col justify-between">
|
||||
<div>
|
||||
<PrimaryNavItem href="/home/people" class="tooltip-right">
|
||||
<Avatar icon="home-smile" class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
{#each getMembershipUrls($userMembership) as url (url)}
|
||||
<PrimaryNavItem
|
||||
title={displayRelayUrl(url)}
|
||||
href={makeSpacePath(url)}
|
||||
class="tooltip-right">
|
||||
<SpaceAvatar {url} />
|
||||
{#if import.meta.env.VITE_PLATFORM_RELAY}
|
||||
<div class="relative hidden w-14 flex-shrink-0 bg-base-100 pt-4 md:block">
|
||||
<div class="flex h-full flex-col justify-between">
|
||||
<div>
|
||||
<PrimaryNavItem href="/home/people" class="tooltip-right">
|
||||
<Avatar icon="home-smile" class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
{/each}
|
||||
<PrimaryNavItem title="Add Space" on:click={addSpace} class="tooltip-right">
|
||||
<Avatar icon="add-circle" class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
<PrimaryNavItem title="Discover Spaces" href="/discover" class="tooltip-right">
|
||||
<Avatar icon="compass-big" class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
</div>
|
||||
<div>
|
||||
<PrimaryNavItem title="Profile" href="/settings/profile" class="tooltip-right">
|
||||
<Avatar src={$userProfile?.picture} class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
<PrimaryNavItem title="Settings" href="/settings/relays" class="tooltip-right">
|
||||
<Avatar icon="settings" class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
<PrimaryNavItem
|
||||
title={displayRelayUrl(import.meta.env.VITE_PLATFORM_RELAY)}
|
||||
href={makeSpacePath(import.meta.env.VITE_PLATFORM_RELAY)}
|
||||
class="tooltip-right">
|
||||
<SpaceAvatar url={import.meta.env.VITE_PLATFORM_RELAY} />
|
||||
</PrimaryNavItem>
|
||||
</div>
|
||||
<div>
|
||||
<PrimaryNavItem title="Profile" href="/settings/profile" class="tooltip-right">
|
||||
<Avatar src={$userProfile?.picture} class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
<PrimaryNavItem title="Settings" href="/settings/relays" class="tooltip-right">
|
||||
<Avatar icon="settings" class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="relative hidden w-14 flex-shrink-0 bg-base-100 pt-4 md:block">
|
||||
<div class="flex h-full flex-col justify-between">
|
||||
<div>
|
||||
<PrimaryNavItem href="/home/people" class="tooltip-right">
|
||||
<Avatar icon="home-smile" class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
{#each getMembershipUrls($userMembership) as url (url)}
|
||||
<PrimaryNavItem
|
||||
title={displayRelayUrl(url)}
|
||||
href={makeSpacePath(url)}
|
||||
class="tooltip-right">
|
||||
<SpaceAvatar {url} />
|
||||
</PrimaryNavItem>
|
||||
{/each}
|
||||
<PrimaryNavItem title="Add Space" on:click={addSpace} class="tooltip-right">
|
||||
<Avatar icon="add-circle" class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
<PrimaryNavItem title="Discover Spaces" href="/discover" class="tooltip-right">
|
||||
<Avatar icon="compass-big" class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
</div>
|
||||
<div>
|
||||
<PrimaryNavItem title="Profile" href="/settings/profile" class="tooltip-right">
|
||||
<Avatar src={$userProfile?.picture} class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
<PrimaryNavItem title="Settings" href="/settings/relays" class="tooltip-right">
|
||||
<Avatar icon="settings" class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<slot />
|
||||
|
||||
@@ -68,7 +94,7 @@
|
||||
<Avatar icon="settings" class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
</div>
|
||||
<PrimaryNavItem title="Settings" href="/settings/profile">
|
||||
<PrimaryNavItem noActive title="Settings" href="/settings/profile">
|
||||
<Avatar src={$userProfile?.picture} class="!h-10 !w-10" />
|
||||
</PrimaryNavItem>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="card2 card2-sm bg-alt column gap-2">
|
||||
<div class="flex items-center justify-between gap-4">
|
||||
<div class="ellipsize flex items-center gap-2">
|
||||
<Icon icon="remote-controller-minimalistic" />
|
||||
<Icon icon="server" />
|
||||
<p class="ellipsize">{displayRelayUrl(url)}</p>
|
||||
</div>
|
||||
<slot />
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<Field>
|
||||
<p slot="label">Relay</p>
|
||||
<label class="input input-bordered flex w-full items-center gap-2" slot="input">
|
||||
<Icon icon="remote-controller-minimalistic" />
|
||||
<Icon icon="server" />
|
||||
<input bind:value={relay} class="grow" type="text" />
|
||||
</label>
|
||||
<p slot="info">
|
||||
|
||||
Reference in New Issue
Block a user