forked from coracle/flotilla
Rough out chat
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
<script lang="ts">
|
||||
import {derived} from "svelte/store"
|
||||
import type {Readable} from 'svelte/store'
|
||||
import {relaySearch, getRelayUrls, userRelaySelections, userInboxRelaySelections, getReadRelayUrls, getWriteRelayUrls} from "@welshman/app"
|
||||
import {
|
||||
getRelayUrls,
|
||||
userRelaySelections,
|
||||
userInboxRelaySelections,
|
||||
getReadRelayUrls,
|
||||
getWriteRelayUrls,
|
||||
} from "@welshman/app"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Collapse from "@lib/components/Collapse.svelte"
|
||||
import RelayItem from "@app/components/RelayItem.svelte"
|
||||
import RelayAdd from "@app/components/RelayAdd.svelte"
|
||||
import {pushModal} from '@app/modal'
|
||||
import {setRelayPolicy, setInboxRelayPolicy} from '@app/commands'
|
||||
import {pushModal} from "@app/modal"
|
||||
import {setRelayPolicy, setInboxRelayPolicy} from "@app/commands"
|
||||
|
||||
const readRelayUrls = derived(userRelaySelections, getReadRelayUrls)
|
||||
const writeRelayUrls = derived(userRelaySelections, getWriteRelayUrls)
|
||||
@@ -41,20 +46,20 @@
|
||||
|
||||
<div class="content column gap-4">
|
||||
<Collapse class="card2 bg-alt column gap-4">
|
||||
<h2 slot="title" class="text-xl flex items-center gap-3">
|
||||
<h2 slot="title" class="flex items-center gap-3 text-xl">
|
||||
<Icon icon="earth" />
|
||||
Broadcast Relays
|
||||
</h2>
|
||||
<p slot="description" class="text-sm">
|
||||
These relays will be advertised on your profile as places where you send your public
|
||||
notes. Be sure to select relays that will accept your notes, and which will let people
|
||||
who follow you read them.
|
||||
These relays will be advertised on your profile as places where you send your public notes. Be
|
||||
sure to select relays that will accept your notes, and which will let people who follow you
|
||||
read them.
|
||||
</p>
|
||||
<div class="column gap-2">
|
||||
{#each $writeRelayUrls.sort() as url (url)}
|
||||
<RelayItem {url}>
|
||||
<Button
|
||||
class="flex items-center tooltip"
|
||||
class="tooltip flex items-center"
|
||||
data-tip="Stop using this relay"
|
||||
on:click={() => removeWriteRelay(url)}>
|
||||
<Icon icon="close-circle" />
|
||||
@@ -70,20 +75,19 @@
|
||||
</div>
|
||||
</Collapse>
|
||||
<Collapse class="card2 bg-alt column gap-4">
|
||||
<h2 slot="title" class="text-xl flex items-center gap-3">
|
||||
<h2 slot="title" class="flex items-center gap-3 text-xl">
|
||||
<Icon icon="inbox" />
|
||||
Inbox Relays
|
||||
</h2>
|
||||
<p slot="description" class="text-sm">
|
||||
These relays will be advertised on your profile as places where other people should
|
||||
send notes intended for you. Be sure to select relays that will accept notes that
|
||||
tag you.
|
||||
These relays will be advertised on your profile as places where other people should send notes
|
||||
intended for you. Be sure to select relays that will accept notes that tag you.
|
||||
</p>
|
||||
<div class="column gap-2">
|
||||
{#each $readRelayUrls.sort() as url (url)}
|
||||
<RelayItem {url}>
|
||||
<Button
|
||||
class="flex items-center tooltip"
|
||||
class="tooltip flex items-center"
|
||||
data-tip="Stop using this relay"
|
||||
on:click={() => removeReadRelay(url)}>
|
||||
<Icon icon="close-circle" />
|
||||
@@ -99,20 +103,20 @@
|
||||
</div>
|
||||
</Collapse>
|
||||
<Collapse class="card2 bg-alt column gap-4">
|
||||
<h2 slot="title" class="text-xl flex items-center gap-3">
|
||||
<h2 slot="title" class="flex items-center gap-3 text-xl">
|
||||
<Icon icon="mailbox" />
|
||||
Messaging Relays
|
||||
</h2>
|
||||
<p slot="description" class="text-sm">
|
||||
These relays will be advertised on your profile as places you use to send and
|
||||
receive direct messages. Be sure to select relays that will accept your messages
|
||||
and messages from people you'd like to be in contact with.
|
||||
These relays will be advertised on your profile as places you use to send and receive direct
|
||||
messages. Be sure to select relays that will accept your messages and messages from people
|
||||
you'd like to be in contact with.
|
||||
</p>
|
||||
<div class="column gap-2">
|
||||
{#each $inboxRelayUrls.sort() as url (url)}
|
||||
<RelayItem {url}>
|
||||
<Button
|
||||
class="flex items-center tooltip"
|
||||
class="tooltip flex items-center"
|
||||
data-tip="Stop using this relay"
|
||||
on:click={() => removeInboxRelay(url)}>
|
||||
<Icon icon="close-circle" />
|
||||
|
||||
Reference in New Issue
Block a user