forked from coracle/flotilla
Convert to simple relay-based groups from nip29
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user