diff --git a/src/lib/components/chat/Controls/Controls.svelte b/src/lib/components/chat/Controls/Controls.svelte index 4ae63f77e..5b2a289e5 100644 --- a/src/lib/components/chat/Controls/Controls.svelte +++ b/src/lib/components/chat/Controls/Controls.svelte @@ -30,64 +30,70 @@ -
- {#if chatFiles.length > 0} - -
- {#each chatFiles as file, fileIdx} - { - // Remove the file from the chatFiles array + {#if $user.role === 'admin' || $user.permissions.chat?.controls} +
+ {#if chatFiles.length > 0} + +
+ {#each chatFiles as file, fileIdx} + { + // Remove the file from the chatFiles array - chatFiles.splice(fileIdx, 1); - chatFiles = chatFiles; - }} - on:click={() => { - console.log(file); - }} - /> - {/each} + chatFiles.splice(fileIdx, 1); + chatFiles = chatFiles; + }} + on:click={() => { + console.log(file); + }} + /> + {/each} +
+
+ +
+ {/if} + + +
+

- {/if} - -
- -
-
- -
- - -
-