when publishing to a single relay, display its name.

This commit is contained in:
fiatjaf 2023-05-12 08:56:51 -03:00
parent faaac70c1a
commit 5ca790bb5d
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -1,7 +1,6 @@
<script>
import {onMount} from "svelte"
import {nip19} from "nostr-tools"
import {quantify} from "hurdak/lib/hurdak"
import {last, reject, pluck, propEq} from "ramda"
import {fly} from "svelte/transition"
import {writable} from "svelte/store"
@ -122,7 +121,13 @@
on:click={() => {
showSettings = true
}}>
<span>Publishing to {quantify($relays.length, "relay")}</span>
<span>
Publishing to {#if $relays?.length === 1}
{last($relays[0].url.split("//"))}
{:else}
{$relays.length} relays
{/if}
</span>
<i class="fa fa-edit" />
</small>
</div>