Update pomade version

This commit is contained in:
Jon Staab
2026-02-20 14:21:38 -08:00
parent b39775daef
commit 527ef59adc
11 changed files with 50 additions and 78 deletions
+2 -2
View File
@@ -51,7 +51,7 @@
return pushToast({
theme: "error",
message: `Failed to recover: ${request.messages[0]?.payload.message.toLowerCase()}`,
message: `Failed to recover: ${request.messages[0]?.res?.message.toLowerCase()}`,
})
}
@@ -62,7 +62,7 @@
return pushToast({
theme: "error",
message: `Failed to recover: ${result.messages[0]?.payload.message.toLowerCase()}`,
message: `Failed to recover: ${result.messages[0]?.res?.message.toLowerCase()}`,
})
}
+15 -24
View File
@@ -17,35 +17,28 @@
if (!isPomadeSession($session)) return
const client = new Client($session.clientOptions)
const result = await client.listSessions()
const pubkey = await client.getPubkey()
try {
const result = await client.listSessions()
const pubkey = await client.getPubkey()
if (result.ok) {
// Group sessions by client pubkey and collect peers
const sessionMap = new Map<string, SessionWithPeers>()
if (result.ok) {
// Group sessions by client pubkey and collect peers
const sessionMap = new Map<string, SessionWithPeers>()
for (const message of result.messages) {
if (!message.res?.items) continue
for (const message of result.messages) {
if (!message?.payload.items) continue
for (const item of message.res.items) {
const existing = sessionMap.get(item.client)
const peer = message.event.pubkey
for (const item of message.payload.items) {
const existing = sessionMap.get(item.client)
if (existing) {
existing.peers.push(peer)
} else if (item.client !== pubkey) {
sessionMap.set(item.client, {...item, peers: [peer]})
}
if (existing) {
existing.peers.push(message.url)
} else if (item.client !== pubkey) {
sessionMap.set(item.client, {...item, peers: [message.url]})
}
}
sessions = Array.from(sessionMap.values())
}
} finally {
client.stop()
sessions = Array.from(sessionMap.values())
}
}
@@ -71,8 +64,6 @@
message: "Failed to delete session",
})
}
client.stop()
} catch (e) {
console.error(e)
pushToast({
+7 -4
View File
@@ -2,6 +2,8 @@
import type {Profile} from "@welshman/util"
import {getTag, makeProfile} from "@welshman/util"
import {pubkey, profilesByPubkey} from "@welshman/app"
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
import Icon from "@lib/components/Icon.svelte"
import Button from "@lib/components/Button.svelte"
import ProfileEditForm from "@app/components/ProfileEditForm.svelte"
import {clearModals} from "@app/util/modal"
@@ -24,9 +26,10 @@
<ProfileEditForm {initialValues} {onsubmit}>
{#snippet footer()}
<div class="mt-4 flex flex-row items-center justify-between gap-4">
<Button class="btn btn-neutral" onclick={back}>Discard Changes</Button>
<Button type="submit" class="btn btn-primary">Save Changes</Button>
</div>
<Button class="btn btn-link" onclick={back}>
<Icon icon={AltArrowLeft} />
Go Back
</Button>
<Button type="submit" class="btn btn-primary">Save Changes</Button>
{/snippet}
</ProfileEditForm>
+4 -1
View File
@@ -10,6 +10,7 @@
import Button from "@lib/components/Button.svelte"
import Modal from "@lib/components/Modal.svelte"
import ModalBody from "@lib/components/ModalBody.svelte"
import ModalFooter from "@lib/components/ModalFooter.svelte"
import InputProfilePicture from "@app/components/InputProfilePicture.svelte"
import InfoHandle from "@app/components/InfoHandle.svelte"
import {pushModal} from "@app/util/modal"
@@ -123,5 +124,7 @@
</FieldInline>
{/if}
</ModalBody>
{@render footer()}
<ModalFooter>
{@render footer()}
</ModalFooter>
</Modal>
+2 -6
View File
@@ -39,8 +39,6 @@
loading = true
let client: Client | undefined = undefined
try {
const secret = getKey<string>("signup.secret")!
const {clientOptions, ...registerRes} = await Client.register(2, 3, secret)
@@ -52,12 +50,11 @@
})
}
client = new Client(clientOptions)
const client = new Client(clientOptions)
const setupRes = await client.setupRecovery(email, password)
if (!setupRes.ok) {
const message = setupRes.messages[0]?.payload.message || "Please try again."
const message = setupRes.messages[0]?.res?.message || "Please try again."
return pushToast({
theme: "error",
@@ -86,7 +83,6 @@
message: "Failed to register! Please try again.",
})
} finally {
client?.stop()
loading = false
}
}
+8 -11
View File
@@ -7,7 +7,6 @@
import Button from "@lib/components/Button.svelte"
import Modal from "@lib/components/Modal.svelte"
import ModalBody from "@lib/components/ModalBody.svelte"
import ModalFooter from "@lib/components/ModalFooter.svelte"
import ProfileEditForm from "@app/components/ProfileEditForm.svelte"
type Props = {
@@ -32,16 +31,14 @@
<ModalBody>
<ProfileEditForm isSignup {initialValues} {onsubmit}>
{#snippet footer()}
<ModalFooter>
<Button class="btn btn-link" onclick={back}>
<Icon icon={AltArrowLeft} />
Go back
</Button>
<Button class="btn btn-primary" type="submit">
Create Account
<Icon icon={AltArrowRight} />
</Button>
</ModalFooter>
<Button class="btn btn-link" onclick={back}>
<Icon icon={AltArrowLeft} />
Go back
</Button>
<Button class="btn btn-primary" type="submit">
Create Account
<Icon icon={AltArrowRight} />
</Button>
{/snippet}
</ProfileEditForm>
</ModalBody>
+1 -1
View File
@@ -289,7 +289,7 @@ export const deriveRelaySignedEvents = (url: string, filters: Filter[] = [{}]) =
// Context
pomadeContext.setSignerPubkeys(POMADE_SIGNERS)
pomadeContext.setSignerUrls(POMADE_SIGNERS)
pomadeContext.setArgonWorker(import("@pomade/core/argon-worker.js?worker"))
+1 -1
View File
@@ -86,7 +86,7 @@
Find communities all across the nostr network
{/snippet}
</PageHeader>
<div class="grid gap-3 sm:grid-cols-2">
<div class="grid gap-3 sm:grid-cols-2 card2 bg-alt">
<Button onclick={startJoin} class="w-full">
<CardButton class="btn-primary w-full">
{#snippet icon()}
+1 -19
View File
@@ -2,19 +2,14 @@
import {onMount} from "svelte"
import {goto} from "$app/navigation"
import AddCircle from "@assets/icons/add-circle.svg?dataurl"
import Compass from "@assets/icons/compass.svg?dataurl"
import ChatRound from "@assets/icons/chat-round.svg?dataurl"
import Icon from "@lib/components/Icon.svelte"
import Link from "@lib/components/Link.svelte"
import Button from "@lib/components/Button.svelte"
import CardButton from "@lib/components/CardButton.svelte"
import SpaceAdd from "@app/components/SpaceAdd.svelte"
import {pushModal} from "@app/util/modal"
import {goToSpace} from "@app/util/routes"
import {PLATFORM_NAME, PLATFORM_RELAYS} from "@app/core/state"
const addSpace = () => pushModal(SpaceAdd)
const openChat = () => goto("/chat")
onMount(async () => {
@@ -30,7 +25,7 @@
<h1 class="text-center text-5xl">Welcome to</h1>
<h1 class="mb-4 text-center text-5xl font-bold uppercase">{PLATFORM_NAME}</h1>
<div class="col-3">
<Button onclick={addSpace}>
<Link href="/discover">
<CardButton class="btn-neutral">
{#snippet icon()}
<Icon icon={AddCircle} size={7} />
@@ -42,19 +37,6 @@
<div>Use an invite link, or create your own space.</div>
{/snippet}
</CardButton>
</Button>
<Link href="/discover">
<CardButton class="btn-neutral">
{#snippet icon()}
<Icon icon={Compass} size={7} />
{/snippet}
{#snippet title()}
<div>Browse the network</div>
{/snippet}
{#snippet info()}
<div>Find communities on the nostr network.</div>
{/snippet}
</CardButton>
</Link>
<Button onclick={openChat}>
<CardButton class="btn-neutral">