forked from coracle/flotilla
UI tweaks, fix some calendar stuff
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {page} from "$app/stores"
|
||||
import {goto} from "$app/navigation"
|
||||
import {displayRelayUrl} from '@welshman/util'
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
@@ -27,6 +28,8 @@
|
||||
let space = $page.params?.nrelay ? decodeNRelay($page.params?.nrelay) : undefined
|
||||
let showSettings = false
|
||||
|
||||
const assertNotNil = <T>(x: T) => x!
|
||||
|
||||
const resetSpace = () => {
|
||||
space = ""
|
||||
}
|
||||
@@ -60,10 +63,9 @@
|
||||
|
||||
<div class="column menu gap-2">
|
||||
{#if showSettings}
|
||||
<Button on:click={closeSettings} class="mb-4 flex items-center gap-2 text-lg">
|
||||
<Icon icon="alt-arrow-left" size={7} />
|
||||
Go Back
|
||||
</Button>
|
||||
<p class="mb-4 text-2xl text-center">
|
||||
Settings for <span class="text-primary">{displayRelayUrl(assertNotNil(space))}</span>
|
||||
</p>
|
||||
{#if getMembershipUrls($userMembership).includes(space || "")}
|
||||
<Button on:click={leaveSpace} class="btn btn-error">
|
||||
<Icon icon="exit" />
|
||||
@@ -75,11 +77,14 @@
|
||||
Join Space
|
||||
</Button>
|
||||
{/if}
|
||||
{:else if space}
|
||||
<Button on:click={resetSpace} class="mb-4 flex items-center gap-2 text-lg">
|
||||
<Button on:click={closeSettings} class="mt-4 flex items-center gap-2 text-lg">
|
||||
<Icon icon="alt-arrow-left" size={7} />
|
||||
Back to Spaces
|
||||
Go Back
|
||||
</Button>
|
||||
{:else if space}
|
||||
<p class="mb-4 text-2xl text-center">
|
||||
Actions for <span class="text-primary">{displayRelayUrl(space)}</span>
|
||||
</p>
|
||||
<div class="grid grid-cols-3 gap-2">
|
||||
<Link href={makeSpacePath(space)} class="btn btn-neutral">
|
||||
<Icon icon="chat-round" /> Chat
|
||||
@@ -112,6 +117,10 @@
|
||||
<Icon icon="settings" /> Space Settings
|
||||
</Button>
|
||||
</div>
|
||||
<Button on:click={resetSpace} class="mt-4 flex items-center gap-2 text-lg">
|
||||
<Icon icon="alt-arrow-left" size={7} />
|
||||
Back to Spaces
|
||||
</Button>
|
||||
{:else}
|
||||
{#each getMembershipUrls($userMembership) as url (url)}
|
||||
<Button on:click={() => setSpace(url)}>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<Button class="card2 bg-alt shadow-xl" on:click={onClick}>
|
||||
<Button class="card2 bg-alt shadow-xl flex flex-col" on:click={onClick}>
|
||||
<Profile {pubkey} />
|
||||
<ProfileInfo {pubkey} />
|
||||
{#if roots.length > 0}
|
||||
@@ -53,7 +53,7 @@
|
||||
{@const nevent = nip19.neventEncode({id: event.id, relays})}
|
||||
{@const following = getPubkeyTagValues(getListTags($userFollows)).includes(pubkey)}
|
||||
<div class="divider" />
|
||||
<button type="button" class="chat chat-start cursor-default" on:click|stopPropagation>
|
||||
<button type="button" class="chat chat-start cursor-default flex" on:click|stopPropagation>
|
||||
<div class="bg-alt col-4 chat-bubble text-left">
|
||||
<Content showEntire hideMedia={!following} {event} />
|
||||
<Link external href={entityLink(nevent)} class="row-2 group justify-end whitespace-nowrap">
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import {nip19} from "nostr-tools"
|
||||
import {ctx} from "@welshman/lib"
|
||||
import {repository} from "@welshman/app"
|
||||
import {getReplyFilters} from "@welshman/util"
|
||||
@@ -11,10 +10,6 @@
|
||||
import {entityLink} from "@app/state"
|
||||
|
||||
export let event
|
||||
|
||||
const replies = deriveEvents(repository, {filters: getReplyFilters([event], {})})
|
||||
const relays = ctx.app.router.Event(event).getUrls()
|
||||
const nevent = nip19.neventEncode({...event, relays})
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col items-end">
|
||||
@@ -23,10 +18,4 @@
|
||||
<Content {event} />
|
||||
</div>
|
||||
</NoteCard>
|
||||
<Link
|
||||
href={entityLink(nevent)}
|
||||
class="btn btn-neutral z-feature -mt-6 mr-4 flex items-center gap-2 rounded-full">
|
||||
<Icon icon="chat-round" />
|
||||
<span>{$replies.length}</span>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user