From 0fb469c9b0638dfcd4b6731347558434946ac229 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Tue, 19 May 2026 08:31:40 +0200 Subject: [PATCH] =?UTF-8?q?KI-AGENT:=20Chatr=C3=A4ume=20sortieren=20und=20?= =?UTF-8?q?Matrix-Setup=20verschieben?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/components/MainNav.vue | 10 +- frontend/pages/communication/chat.vue | 147 +++++++++++++++----------- 2 files changed, 88 insertions(+), 69 deletions(-) diff --git a/frontend/components/MainNav.vue b/frontend/components/MainNav.vue index 2a8d034..a857111 100644 --- a/frontend/components/MainNav.vue +++ b/frontend/components/MainNav.vue @@ -80,11 +80,6 @@ const links = computed(() => { to: "/communication/chat", icon: "i-heroicons-chat-bubble-left-right" }, - { - label: "Matrix-Setup", - to: "/communication", - icon: "i-heroicons-cog-6-tooth" - }, featureEnabled("helpdesk") ? { label: "Helpdesk", to: "/helpdesk", @@ -332,6 +327,11 @@ const links = computed(() => { to: "/settings/tenant", icon: "i-heroicons-building-office", } : null, + { + label: "Matrix-Setup", + to: "/communication", + icon: "i-heroicons-chat-bubble-left-right", + }, featureEnabled("export") ? { label: "Export", to: "/export", diff --git a/frontend/pages/communication/chat.vue b/frontend/pages/communication/chat.vue index 8ad0ae6..f9eb212 100644 --- a/frontend/pages/communication/chat.vue +++ b/frontend/pages/communication/chat.vue @@ -112,6 +112,10 @@ const roomCreateKeyPreview = computed(() => normalizeRoomKey(roomCreateForm.value.key || roomCreateForm.value.name) ) +const sortRoomsByName = (roomList) => [...roomList].sort((first, second) => + String(first.name || "").localeCompare(String(second.name || ""), "de", { sensitivity: "base" }) +) + const rooms = computed(() => { const baseRooms = matrixRooms.value .filter((room) => !["project", "direct"].includes(room.type)) @@ -138,9 +142,31 @@ const rooms = computed(() => { provisionEndpoint: `/api/communication/matrix/direct-rooms/${encodeURIComponent(room.userId)}/provision` })) - return [...baseRooms, ...projectRooms, ...directRooms] + return [ + ...sortRoomsByName(baseRooms), + ...sortRoomsByName(projectRooms), + ...sortRoomsByName(directRooms) + ] }) +const groupedRooms = computed(() => [ + { + key: "rooms", + label: "Räume", + rooms: rooms.value.filter((room) => room.group === "Räume") + }, + { + key: "projects", + label: "Projekte", + rooms: rooms.value.filter((room) => room.group === "Projekte") + }, + { + key: "direct", + label: "Direktnachrichten", + rooms: rooms.value.filter((room) => room.group === "Direkt") + } +].filter((group) => group.rooms.length > 0)) + const normalizeRoomKey = (value) => { const normalized = String(value || "") .toLowerCase() @@ -919,63 +945,63 @@ onBeforeUnmount(() => { -
-
+ - - -
- - Matrix-Setup - + + + + + {{ room.name }} + {{ room.description }} + + + lädt + + + aktiv + + + offen + + +
@@ -1020,13 +1046,6 @@ onBeforeUnmount(() => { :disabled="!canStartMatrixCall" @click="openMatrixCall('video')" /> - {
-