Avoid showing auth error before join dialog
This commit is contained in:
parent
774e2da463
commit
9cb5e54aeb
1 changed files with 13 additions and 11 deletions
|
|
@ -41,11 +41,8 @@
|
||||||
// Direct links skip Discover — prompt to join when relay is not in the user's space list.
|
// Direct links skip Discover — prompt to join when relay is not in the user's space list.
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if ($modal) return
|
if ($modal) return
|
||||||
if ($authError) return showAuthError()
|
|
||||||
if ($relaysPendingTrust.includes(url)) return showPendingTrust()
|
|
||||||
if ($userSpaceUrls.includes(url)) return
|
|
||||||
if (joinPrompted.has(url)) return
|
|
||||||
|
|
||||||
|
if (!$userSpaceUrls.includes(url) && !joinPrompted.has(url)) {
|
||||||
if (spacesLoaded) {
|
if (spacesLoaded) {
|
||||||
joinPrompted.add(url)
|
joinPrompted.add(url)
|
||||||
pushModal(SpaceJoin, {url})
|
pushModal(SpaceJoin, {url})
|
||||||
|
|
@ -54,6 +51,11 @@
|
||||||
spacesLoaded = true
|
spacesLoaded = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
} else if ($authError) {
|
||||||
|
showAuthError()
|
||||||
|
} else if ($relaysPendingTrust.includes(url)) {
|
||||||
|
showPendingTrust()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue