forked from coracle/flotilla
Remove connection toast now that we have a cta surfaced
This commit is contained in:
+2
-1
@@ -10,7 +10,8 @@
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"lint": "prettier --check src && eslint src",
|
||||
"format": "prettier --write src",
|
||||
"format": "git diff head --name-only --diff-filter d | grep -E '(js|ts|svelte)$' | xargs -r prettier --write",
|
||||
"format:all": "prettier --write src",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,25 +1,16 @@
|
||||
<script lang="ts">
|
||||
import type {Snippet} from "svelte"
|
||||
import {onMount} from "svelte"
|
||||
import {page} from "$app/stores"
|
||||
import {sleep, once} from "@welshman/lib"
|
||||
import {displayRelayUrl} from "@welshman/util"
|
||||
import {SocketStatus} from "@welshman/net"
|
||||
import {once} from "@welshman/lib"
|
||||
import Page from "@lib/components/Page.svelte"
|
||||
import Dialog from "@lib/components/Dialog.svelte"
|
||||
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
|
||||
import MenuSpace from "@app/components/MenuSpace.svelte"
|
||||
import SpaceAuthError from "@app/components/SpaceAuthError.svelte"
|
||||
import SpaceTrustRelay from "@app/components/SpaceTrustRelay.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {
|
||||
decodeRelay,
|
||||
deriveRelayAuthError,
|
||||
relaysPendingTrust,
|
||||
deriveSocket,
|
||||
} from "@app/core/state"
|
||||
import {decodeRelay, deriveRelayAuthError, relaysPendingTrust} from "@app/core/state"
|
||||
import {notifications} from "@app/util/notifications"
|
||||
|
||||
type Props = {
|
||||
@@ -30,8 +21,6 @@
|
||||
|
||||
const url = decodeRelay($page.params.relay!)
|
||||
|
||||
const socket = deriveSocket(url)
|
||||
|
||||
const authError = deriveRelayAuthError(url)
|
||||
|
||||
const showAuthError = once(() => pushModal(SpaceAuthError, {url, error: $authError}))
|
||||
@@ -49,17 +38,6 @@
|
||||
showAuthError()
|
||||
}
|
||||
})
|
||||
|
||||
onMount(() => {
|
||||
sleep(2000).then(() => {
|
||||
if ($socket.status !== SocketStatus.Open) {
|
||||
pushToast({
|
||||
theme: "error",
|
||||
message: `Failed to connect to ${displayRelayUrl(url)}`,
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<SecondaryNav>
|
||||
|
||||
Reference in New Issue
Block a user