diff --git a/src/lib/components/channel/Channel.svelte b/src/lib/components/channel/Channel.svelte
new file mode 100644
index 000000000..01e35b802
--- /dev/null
+++ b/src/lib/components/channel/Channel.svelte
@@ -0,0 +1,5 @@
+
+
+{id}
diff --git a/src/lib/components/channel/Messages.svelte b/src/lib/components/channel/Messages.svelte
new file mode 100644
index 000000000..8b23c18c5
--- /dev/null
+++ b/src/lib/components/channel/Messages.svelte
@@ -0,0 +1,63 @@
+
+
+
+
+ {#key channelId}
+
+ {#if messages.at(0)?.parentId !== null}
+
{
+ console.log('visible');
+ if (!messagesLoading) {
+ loadMoreMessages();
+ }
+ }}
+ >
+
+
+ {/if}
+
+ {#each messages as message, messageIdx (message.id)}
+
+ {/each}
+
+
+ {/key}
+
+
diff --git a/src/lib/components/channel/Messages/Message.svelte b/src/lib/components/channel/Messages/Message.svelte
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte
index e7a07f2f1..eb8f8f111 100644
--- a/src/lib/components/layout/Sidebar.svelte
+++ b/src/lib/components/layout/Sidebar.svelte
@@ -544,20 +544,24 @@
? 'opacity-20'
: ''}"
>
- {
- showCreateChannel = true;
- }}
- onAddLabel={$i18n.t('Create Channel')}
- >
- {#each $channels as channel}
-
- {/each}
-
+ {#if $user.role === 'admin' || $channels.length > 0}
+ {
+ showCreateChannel = true;
+ }
+ : null}
+ onAddLabel={$i18n.t('Create Channel')}
+ >
+ {#each $channels as channel}
+
+ {/each}
+
+ {/if}
0}
{
localStorage.setItem('showPinnedChat', e.detail);
diff --git a/src/lib/components/layout/Sidebar/ChannelItem.svelte b/src/lib/components/layout/Sidebar/ChannelItem.svelte
index 2ca788012..5f0ac85c9 100644
--- a/src/lib/components/layout/Sidebar/ChannelItem.svelte
+++ b/src/lib/components/layout/Sidebar/ChannelItem.svelte
@@ -5,7 +5,7 @@
const dispatch = createEventDispatcher();
- import { mobile, showSidebar } from '$lib/stores';
+ import { mobile, showSidebar, user } from '$lib/stores';
import EllipsisHorizontal from '$lib/components/icons/EllipsisHorizontal.svelte';
export let className = '';
@@ -50,14 +50,16 @@
-