implement channels fully, implement servers fully, make dms impossible
to send if no longer friends, update overview information on invalidation (form response recieved, friends update)
This commit is contained in:
parent
92a95cb365
commit
7af96ca084
8 changed files with 245 additions and 104 deletions
|
|
@ -18,11 +18,13 @@
|
|||
|
||||
let {
|
||||
currentPage = $bindable<string | null>(),
|
||||
subPage = $bindable<string | null>(),
|
||||
data,
|
||||
user,
|
||||
...restProps
|
||||
}: {
|
||||
currentPage: string | null;
|
||||
subPage: string | null;
|
||||
data: OverviewData;
|
||||
user: SessionValidationResult['user'];
|
||||
} = $props();
|
||||
|
|
@ -254,6 +256,7 @@
|
|||
onclick={(e) => {
|
||||
e.preventDefault();
|
||||
currentPage = friend.id;
|
||||
subPage = null;
|
||||
}}
|
||||
user={friend}
|
||||
></User>
|
||||
|
|
@ -283,6 +286,7 @@
|
|||
onclick={(e) => {
|
||||
e.preventDefault();
|
||||
currentPage = group.id;
|
||||
subPage = null;
|
||||
}}
|
||||
href="##"
|
||||
>
|
||||
|
|
@ -309,24 +313,34 @@
|
|||
<Sidebar.MenuSub>
|
||||
{#each data.servers as server (server.id)}
|
||||
<Sidebar.MenuSubItem>
|
||||
<Sidebar.MenuSubButton>
|
||||
<a
|
||||
onclick={(e) => {
|
||||
e.preventDefault();
|
||||
currentPage = server.id;
|
||||
}}
|
||||
href="##"
|
||||
class="flex items-center gap-2"
|
||||
>
|
||||
<img
|
||||
src={'https://api.dicebear.com/7.x/pixel-art/svg?seed=' + server.name}
|
||||
alt={server.name}
|
||||
class="size-6 rounded-full"
|
||||
/>
|
||||
{server.name}
|
||||
</a>
|
||||
<Sidebar.MenuSubButton
|
||||
onclick={(e) => {
|
||||
e.preventDefault();
|
||||
currentPage = server.id;
|
||||
subPage = null;
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={'https://api.dicebear.com/7.x/pixel-art/svg?seed=' + server.name}
|
||||
alt={server.name}
|
||||
class="size-6 rounded-full"
|
||||
/>
|
||||
{server.name}
|
||||
</Sidebar.MenuSubButton>
|
||||
</Sidebar.MenuSubItem>
|
||||
{#each server.channels as channel (channel.id)}
|
||||
<a
|
||||
onclick={(e) => {
|
||||
e.preventDefault();
|
||||
currentPage = server.id;
|
||||
subPage = channel.id;
|
||||
}}
|
||||
href="##"
|
||||
class="flex items-center gap-2"
|
||||
>
|
||||
{channel.name}
|
||||
</a>
|
||||
{/each}
|
||||
{/each}
|
||||
</Sidebar.MenuSub>
|
||||
</Collapsible.Content>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue