mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-18 19:23:40 +00:00
Move relay modal to nested modal
This commit is contained in:
parent
1ae66cbc88
commit
3e66ae08fc
@ -234,12 +234,6 @@
|
||||
<NoteCreate pubkey={$modal.pubkey} />
|
||||
{:else if $modal.type === 'relay/add'}
|
||||
<AddRelay />
|
||||
{:else if $modal.type === 'relay/list'}
|
||||
<Content>
|
||||
{#each $modal.relays as relay}
|
||||
<RelayCard theme="black" showControls {relay} />
|
||||
{/each}
|
||||
</Content>
|
||||
{:else if $modal.type === 'signUp'}
|
||||
<SignUp />
|
||||
{:else if $modal.type === 'room/edit'}
|
||||
|
@ -10,6 +10,9 @@
|
||||
import {Tags, findRootId, findReplyId, displayPerson, isLike} from "src/util/nostr"
|
||||
import {extractUrls} from "src/util/html"
|
||||
import ImageCircle from 'src/partials/ImageCircle.svelte'
|
||||
import Content from 'src/partials/Content.svelte'
|
||||
import RelayCard from 'src/views/relays/RelayCard.svelte'
|
||||
import Modal from 'src/partials/Modal.svelte'
|
||||
import Preview from 'src/partials/Preview.svelte'
|
||||
import Anchor from 'src/partials/Anchor.svelte'
|
||||
import {toast, modal} from "src/app/ui"
|
||||
@ -38,6 +41,7 @@
|
||||
let replyMentions = getDefaultReplyMentions()
|
||||
let replyContainer = null
|
||||
let visibleNotes = []
|
||||
let showRelays = false
|
||||
|
||||
const {profile} = user
|
||||
const links = extractUrls(note.content)
|
||||
@ -85,10 +89,6 @@
|
||||
modal.set({type: 'note/detail', note: {id: findRootId(note)}, relays})
|
||||
}
|
||||
|
||||
const showActiveRelays = () => {
|
||||
modal.set({type: 'relay/list', relays: [{url: note.seen_on}]})
|
||||
}
|
||||
|
||||
const react = async content => {
|
||||
if (!$profile) {
|
||||
return navigate('/login')
|
||||
@ -285,7 +285,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="cursor-pointer flex gap-1 items-center" on:click={showActiveRelays}>
|
||||
class="cursor-pointer flex gap-1 items-center" on:click={() => { showRelays = true }}>
|
||||
<i class="fa fa-server" />
|
||||
<div
|
||||
class="h-1 w-1 rounded-full"
|
||||
@ -342,4 +342,12 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if showRelays}
|
||||
<Modal nested onEscape={() => { showRelays = false }}>
|
||||
<Content>
|
||||
<RelayCard theme="black" showControls relay={{url: note.seen_on}} />
|
||||
</Content>
|
||||
</Modal>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user