Only show attach button if user is admin
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m4s

This commit is contained in:
2026-03-09 18:11:03 +00:00
parent 33d72fd20a
commit 604576b46a

View File

@@ -2,9 +2,11 @@
import { ref, computed, watch, nextTick, onMounted, onUnmounted } from "vue";
import Button from "@/components/input/Button.vue";
import { useMessagesStore } from "@/stores/messages";
import { useAuthStore } from "@/stores/auth";
import Header from "@/components/text/Header.vue";
const messagesStore = useMessagesStore();
const authStore = useAuthStore();
const messages = computed(() => messagesStore.messages);
const messageInput = ref("");
const messagesContainer = ref(null);
@@ -80,7 +82,7 @@ onUnmounted(() => {
@change="onFileSelected" />
<div class="flex gap-2">
<Button @click="sendMessage">Send</Button>
<Button @click="fileInput.click()">Attach</Button>
<Button v-if="authStore.user.admin" @click="fileInput.click()">Attach</Button>
</div>
</div>
</template>