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": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
"lint": "prettier --check src && eslint src",
|
"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"
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -1,25 +1,16 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type {Snippet} from "svelte"
|
import type {Snippet} from "svelte"
|
||||||
import {onMount} from "svelte"
|
|
||||||
import {page} from "$app/stores"
|
import {page} from "$app/stores"
|
||||||
import {sleep, once} from "@welshman/lib"
|
import {once} from "@welshman/lib"
|
||||||
import {displayRelayUrl} from "@welshman/util"
|
|
||||||
import {SocketStatus} from "@welshman/net"
|
|
||||||
import Page from "@lib/components/Page.svelte"
|
import Page from "@lib/components/Page.svelte"
|
||||||
import Dialog from "@lib/components/Dialog.svelte"
|
import Dialog from "@lib/components/Dialog.svelte"
|
||||||
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
|
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
|
||||||
import MenuSpace from "@app/components/MenuSpace.svelte"
|
import MenuSpace from "@app/components/MenuSpace.svelte"
|
||||||
import SpaceAuthError from "@app/components/SpaceAuthError.svelte"
|
import SpaceAuthError from "@app/components/SpaceAuthError.svelte"
|
||||||
import SpaceTrustRelay from "@app/components/SpaceTrustRelay.svelte"
|
import SpaceTrustRelay from "@app/components/SpaceTrustRelay.svelte"
|
||||||
import {pushToast} from "@app/util/toast"
|
|
||||||
import {pushModal} from "@app/util/modal"
|
import {pushModal} from "@app/util/modal"
|
||||||
import {setChecked} from "@app/util/notifications"
|
import {setChecked} from "@app/util/notifications"
|
||||||
import {
|
import {decodeRelay, deriveRelayAuthError, relaysPendingTrust} from "@app/core/state"
|
||||||
decodeRelay,
|
|
||||||
deriveRelayAuthError,
|
|
||||||
relaysPendingTrust,
|
|
||||||
deriveSocket,
|
|
||||||
} from "@app/core/state"
|
|
||||||
import {notifications} from "@app/util/notifications"
|
import {notifications} from "@app/util/notifications"
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -30,8 +21,6 @@
|
|||||||
|
|
||||||
const url = decodeRelay($page.params.relay!)
|
const url = decodeRelay($page.params.relay!)
|
||||||
|
|
||||||
const socket = deriveSocket(url)
|
|
||||||
|
|
||||||
const authError = deriveRelayAuthError(url)
|
const authError = deriveRelayAuthError(url)
|
||||||
|
|
||||||
const showAuthError = once(() => pushModal(SpaceAuthError, {url, error: $authError}))
|
const showAuthError = once(() => pushModal(SpaceAuthError, {url, error: $authError}))
|
||||||
@@ -49,17 +38,6 @@
|
|||||||
showAuthError()
|
showAuthError()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
sleep(2000).then(() => {
|
|
||||||
if ($socket.status !== SocketStatus.Open) {
|
|
||||||
pushToast({
|
|
||||||
theme: "error",
|
|
||||||
message: `Failed to connect to ${displayRelayUrl(url)}`,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<SecondaryNav>
|
<SecondaryNav>
|
||||||
|
|||||||
Reference in New Issue
Block a user