Invite and Session API/Services; Home view; Sidebar Items; Modals

This commit is contained in:
Aslan 2026-01-10 19:24:10 -05:00
parent 280158470a
commit e36587b99d
80 changed files with 1343 additions and 71 deletions

View file

@ -1,5 +1,4 @@
import { createEffect, createMemo, type Component } from "solid-js";
import { CommunityView } from "../CommunityView";
import { dispatch, state } from "../../store/state";
import { CommunityActionTypes, ICommunity } from "../../store/community";
import { ChannelActionTypes } from "../../store/channel";
@ -23,7 +22,7 @@ const ChannelView: Component = () => {
const communityInfo = createMemo<ICommunity | undefined>(() => {
const activeCommunityId = state.community.active;
return state.community.communities[activeCommunityId];
return state.community.communities[activeCommunityId ?? 0];
});
createEffect(() => {
@ -63,21 +62,18 @@ const ChannelView: Component = () => {
};
return (
<div class="flex flex-row bg-stone-900 w-80 shadow-panel z-20">
<CommunityView />
<div class="h-full w-full relative">
<CommunityBar
id={communityInfo()?.id}
name={communityInfo()?.name}
description={communityInfo()?.description}
avatar={
"https://img.daisyui.com/images/profile/demo/yellingcat@192.webp"
}
/>
<ul class="h-full list flex flex-col p-2 gap-1 pt-18 overflow-y-auto scrollbar-thin scrollbar-thumb-gray-500 scrollbar-track-gray-800">
{channelIds().map(mapChannel)}
</ul>
</div>
<div class="bg-stone-900 w-80 shadow-panel z-20 h-full relative">
<CommunityBar
id={communityInfo()?.id}
name={communityInfo()?.name}
description={communityInfo()?.description}
avatar={
"https://img.daisyui.com/images/profile/demo/yellingcat@192.webp"
}
/>
<ul class="h-full list flex flex-col p-2 gap-1 pt-18 overflow-y-auto scrollbar-thin scrollbar-thumb-gray-500 scrollbar-track-gray-800">
{channelIds().map(mapChannel)}
</ul>
</div>
);
};