This commit is contained in:
Jon Staab
2024-08-26 14:43:43 -07:00
parent 644c32dd09
commit 88318e9753
36 changed files with 370 additions and 311 deletions
+7 -5
View File
@@ -1,7 +1,7 @@
<script lang="ts">
import "@src/app.css"
import {onMount} from "svelte"
import {get, derived} from 'svelte/store'
import {get} from "svelte/store"
import {page} from "$app/stores"
import {goto} from "$app/navigation"
import {browser} from "$app/environment"
@@ -70,8 +70,8 @@
forward: ($psd: PublishStatusDataByUrlById) => {
const data = []
for (const [id, itemsByUrl] of Object.entries($psd)) {
for (const [url, item] of Object.entries(itemsByUrl)) {
for (const itemsByUrl of Object.values($psd)) {
for (const item of Object.values(itemsByUrl)) {
data.push(item)
}
}
@@ -94,7 +94,8 @@
keyPath: "key",
store: adapter({
store: freshness,
forward: ($freshness: Record<string, number>) => Object.entries($freshness).map(([key, ts]) => ({key, ts})),
forward: ($freshness: Record<string, number>) =>
Object.entries($freshness).map(([key, ts]) => ({key, ts})),
backward: (data: any[]) => {
const result: Record<string, number> = {}
@@ -110,7 +111,8 @@
keyPath: "id",
store: adapter({
store: plaintext,
forward: ($plaintext: Record<string, string>) => Object.entries($plaintext).map(([id, plaintext]) => ({id, plaintext})),
forward: ($plaintext: Record<string, string>) =>
Object.entries($plaintext).map(([id, plaintext]) => ({id, plaintext})),
backward: (data: any[]) => {
const result: Record<string, string> = {}
+2 -2
View File
@@ -1,6 +1,6 @@
<script lang="ts">
import {onMount} from 'svelte'
import {onMount} from "svelte"
import {goto} from "$app/navigation"
onMount(() => goto('/home'))
onMount(() => goto("/home"))
</script>
+1 -1
View File
@@ -57,7 +57,7 @@
{#if $userMembership?.noms.has(group.nom)}
<div class="center absolute flex w-full">
<div
class="tooltip relative left-8 w-5 h-5 top-[38px] rounded-full bg-primary"
class="tooltip relative left-8 top-[38px] h-5 w-5 rounded-full bg-primary"
data-tip="You are already a member of this space.">
<Icon icon="check-circle" class="scale-110" />
</div>
+3 -7
View File
@@ -3,10 +3,8 @@
import Icon from "@lib/components/Icon.svelte"
import Button from "@lib/components/Button.svelte"
const hash = import.meta.env.VITE_BUILD_HASH
const nprofile =
"nprofile1qqsf03c2gsmx5ef4c9zmxvlew04gdh7u94afnknp33qvv3c94kvwxgspz4mhxue69uhhyetvv9ujuerpd46hxtnfduhsz9rhwden5te0wfjkcctev93xcefwdaexwtcpzdmhxue69uhhqatjwpkx2urpvuhx2ue0vamm57"
const hodlbodPubkey = "97c70a44366a6535c145b333f973ea86dfdc2d7a99da618c40c64705ad98e322"
</script>
<div class="hero min-h-screen bg-base-200">
@@ -15,14 +13,12 @@
<p class="text-center text-2xl">Thanks for using</p>
<h1 class="mb-4 text-center text-5xl font-bold uppercase">Flotilla</h1>
<div class="grid grid-cols-1 gap-8 lg:grid-cols-2">
<div class="card2 shadow-2xl flex flex-col gap-2 text-center">
<div class="card2 flex flex-col gap-2 text-center shadow-2xl">
<h3 class="text-2xl sm:h-12">Support development</h3>
<p class="sm:h-16">Funds will be used to support development.</p>
<Button class="btn btn-primary">
Zap the Developer
</Button>
<Button class="btn btn-primary">Zap the Developer</Button>
</div>
<div class="card2 shadow-2xl flex flex-col gap-2 text-center">
<div class="card2 flex flex-col gap-2 text-center shadow-2xl">
<h3 class="text-2xl sm:h-12">Get in touch</h3>
<p class="sm:h-16">Having problems? Let us know by filing an issue.</p>
<Link
+7 -9
View File
@@ -1,12 +1,10 @@
<script lang="ts">
import {onMount} from 'svelte'
import {readable} from 'svelte/store'
import {displayRelayUrl, isShareableRelayUrl} from '@welshman/util'
import type {SignedEvent} from '@welshman/util'
import {onMount} from "svelte"
import {readable} from "svelte/store"
import {displayRelayUrl, isShareableRelayUrl} from "@welshman/util"
import type {SignedEvent} from "@welshman/util"
import Button from "@lib/components/Button.svelte"
import Link from "@lib/components/Link.svelte"
import Icon from "@lib/components/Icon.svelte"
import {clip} from "@app/toast"
import {DEFAULT_RELAYS, INDEXER_RELAYS} from "@app/base"
import {searchRelays, subscribe, loadRelay} from "@app/state"
@@ -20,12 +18,12 @@
onMount(() => {
const sub = subscribe({
filters: [{kinds: [30166], '#N': ['29']}],
filters: [{kinds: [30166], "#N": ["29"]}],
relays: [...INDEXER_RELAYS, ...DEFAULT_RELAYS],
})
sub.emitter.on('event', (url: string, event: SignedEvent) => {
const d = event.tags.find(t => t[0] === 'd')?.[1] || ""
sub.emitter.on("event", (url: string, event: SignedEvent) => {
const d = event.tags.find(t => t[0] === "d")?.[1] || ""
if (isShareableRelayUrl(d)) {
loadRelay(d)
@@ -8,7 +8,7 @@
</script>
<script lang="ts">
import {onMount} from 'svelte'
import {onMount} from "svelte"
import {page} from "$app/stores"
import {sortBy, now} from "@welshman/lib"
import type {TrustedEvent} from "@welshman/util"
@@ -61,7 +61,7 @@
onMount(() => {
const sub = subscribe({
filters: [{'#h': [nom], since: now() - 30}],
filters: [{"#h": [nom], since: now() - 30}],
relays: $userRelayUrlsByNom.get(nom)!,
})
@@ -70,7 +70,7 @@
</script>
<div class="relative flex h-screen flex-col">
<div class="relative z-feature mx-2 pt-4 rounded-xl">
<div class="relative z-feature mx-2 rounded-xl pt-4">
<div class="flex min-h-12 items-center gap-4 rounded-xl bg-base-100 px-4 shadow-xl">
<div class="flex items-center gap-2">
<Icon icon="hashtag" />
@@ -78,7 +78,7 @@
</div>
</div>
</div>
<div class="flex flex-grow flex-col-reverse overflow-auto -mt-2 py-2">
<div class="-mt-2 flex flex-grow flex-col-reverse overflow-auto py-2">
{#each elements as { type, id, value, showPubkey } (id)}
{#if type === "date"}
<div class="flex items-center gap-2 p-2 text-xs opacity-50">