Convert to simple relay-based groups from nip29

This commit is contained in:
Jon Staab
2024-09-11 10:48:34 -07:00
parent ed365f7e38
commit 4ad67921a0
20 changed files with 363 additions and 525 deletions
+5 -7
View File
@@ -1,14 +1,12 @@
<script lang="ts">
import {goto} from "$app/navigation"
import {displayRelayUrl} from "@welshman/util"
import Spinner from "@lib/components/Spinner.svelte"
import Button from "@lib/components/Button.svelte"
import Icon from "@lib/components/Icon.svelte"
import {deriveGroup} from "@app/state"
import {removeGroupMemberships} from "@app/commands"
import {removeSpaceMembership} from "@app/commands"
export let nom
const group = deriveGroup(nom)
export let url
const back = () => history.back()
@@ -16,7 +14,7 @@
loading = true
try {
await removeGroupMemberships([nom])
await removeSpaceMembership(url)
} finally {
loading = false
}
@@ -29,7 +27,7 @@
<form class="column gap-4" on:submit|preventDefault={exit}>
<h1 class="heading">
You are leaving <span class="text-primary">{$group?.name || "[no name]"}</span>
You are leaving <span class="text-primary">{displayRelayUrl(url)}</span>
</h1>
<p class="text-center">Are you sure you want to leave?</p>
<div class="flex flex-row items-center justify-between gap-4">