diff --git a/src/app/components/ProfileLink.svelte b/src/app/components/ProfileLink.svelte index a63ff152..5279abae 100644 --- a/src/app/components/ProfileLink.svelte +++ b/src/app/components/ProfileLink.svelte @@ -1,5 +1,5 @@ - diff --git a/src/app/components/SpaceQuickLinks.svelte b/src/app/components/SpaceQuickLinks.svelte new file mode 100644 index 00000000..87b8db62 --- /dev/null +++ b/src/app/components/SpaceQuickLinks.svelte @@ -0,0 +1,109 @@ + + +
+

+ + Quick Links +

+
+ +
+ + Threads + {#if $notifications.has(threadsPath)} +
+
+ {/if} +
+ + +
+ + Calendar + {#if $notifications.has(calendarPath)} +
+
+ {/if} +
+ + {#if $userRooms.length + $otherRooms.length > 10} + + {/if} + {#each filteredRooms() as room (room)} + {@const roomPath = makeRoomPath(url, room)} + {@const channel = $channelsById.get(makeChannelId(url, room))} + +
+ {#if channel?.closed || channel?.private} + + {:else} + + {/if} + +
+ {#if $notifications.has(roomPath)} +
+ {/if} + + {/each} + {#if hasNip29($relay)} + + {/if} +
+
diff --git a/src/lib/components/SocketStatusIndicator.svelte b/src/lib/components/SocketStatusIndicator.svelte new file mode 100644 index 00000000..c2c11d7d --- /dev/null +++ b/src/lib/components/SocketStatusIndicator.svelte @@ -0,0 +1,38 @@ + + +{#if $socket.status === SocketStatus.Open} + {#if $socket.auth.status === AuthStatus.None} + Connected + {:else if $socket.auth.status === AuthStatus.Requested} + Authenticating + {:else if $socket.auth.status === AuthStatus.PendingSignature} + Authenticating + {:else if $socket.auth.status === AuthStatus.DeniedSignature} + Failed to Authenticate + {:else if $socket.auth.status === AuthStatus.PendingResponse} + Authenticating + {:else if $socket.auth.status === AuthStatus.Forbidden} + Access Denied + {:else if $socket.auth.status === AuthStatus.Ok} + Connected + {/if} +{:else if $socket.status === SocketStatus.Opening} + Connecting +{:else if $socket.status === SocketStatus.Closing} + Not Connected +{:else if $socket.status === SocketStatus.Closed} + Not Connected +{:else if $socket.status === SocketStatus.Error} + Failed to Connect +{/if} diff --git a/src/routes/spaces/[relay]/+page.svelte b/src/routes/spaces/[relay]/+page.svelte index c3ac265f..35250df8 100644 --- a/src/routes/spaces/[relay]/+page.svelte +++ b/src/routes/spaces/[relay]/+page.svelte @@ -1,67 +1,37 @@ @@ -106,7 +76,7 @@ -
+

@@ -115,72 +85,7 @@
-
-

- - Quick Links -

-
- -
- - Threads - {#if $notifications.has(threadsPath)} -
-
- {/if} -
- - -
- - Calendar - {#if $notifications.has(calendarPath)} -
-
- {/if} -
- - {#if $userRooms.length + $otherRooms.length > 10} - - {/if} - {#each filteredRooms() as room (room)} - {@const roomPath = makeRoomPath(url, room)} - {@const channel = $channelsById.get(makeChannelId(url, room))} - -
- {#if channel?.closed || channel?.private} - - {:else} - - {/if} - -
- {#if $notifications.has(roomPath)} -
-
- {/if} - - {/each} - {#if hasNip29($relay)} - - {/if} -
-
+
@@ -219,37 +124,14 @@ Relay Status
- {#if $socket.status === SocketStatus.Open} - {#if $socket.auth.status === AuthStatus.None} - Connected - {:else if $socket.auth.status === AuthStatus.Requested} - Authenticating - {:else if $socket.auth.status === AuthStatus.PendingSignature} - Authenticating - {:else if $socket.auth.status === AuthStatus.DeniedSignature} - Failed to Authenticate - {:else if $socket.auth.status === AuthStatus.PendingResponse} - Authenticating - {:else if $socket.auth.status === AuthStatus.Forbidden} - Access Denied - {:else if $socket.auth.status === AuthStatus.Ok} - Connected - {/if} - {:else if $socket.status === SocketStatus.Opening} - Connecting - {:else if $socket.status === SocketStatus.Closing} - Not Connected - {:else if $socket.status === SocketStatus.Closed} - Not Connected - {:else if $socket.status === SocketStatus.Error} - Failed to Connect - {/if} + {#if $relay?.profile} {@const {software, version, supported_nips, limitation} = $relay.profile}
{#if owner}
- Administrator: + Administrator:
{/if} {#if $relay?.profile?.contact}