From 85057e65dcf9b414341ecc76e1f7319ef6427a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Mon, 24 Aug 2026 18:34:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(chat):=20=E4=BE=A7=E6=A0=8F=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=94=B9tab=E6=8C=89=E9=92=AE=E5=BC=8F(=E5=A5=BD?= =?UTF-8?q?=E5=8F=8B=E5=88=97=E8=A1=A8|=E7=BE=A4=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=B8=A6=E8=AE=A1=E6=95=B0,=E5=AF=B9=E9=BD=90=E4=BA=91?= =?UTF-8?q?=E5=AE=A2=E8=81=8A=E5=A4=A9=E7=AA=97=E5=8F=A3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- yunkes/src/components/ChatSidebar.vue | 53 ++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/yunkes/src/components/ChatSidebar.vue b/yunkes/src/components/ChatSidebar.vue index 3eb1af7..e109e1c 100644 --- a/yunkes/src/components/ChatSidebar.vue +++ b/yunkes/src/components/ChatSidebar.vue @@ -15,7 +15,7 @@ const emit = defineEmits<{ select: [ChatSession] }>() const sessions = ref([]) const loading = ref(false) const errorMsg = ref(null) -const filter = ref<'all' | 'friend' | 'group'>('all') +const filter = ref<'all' | 'friend' | 'group'>('friend') const keyword = ref('') async function load() { @@ -41,6 +41,9 @@ function sessionDisplayName(name: string | null | undefined): string { return name } +const friendCount = computed(() => sessions.value.filter(s => s.type === 'friend').length) +const groupCount = computed(() => sessions.value.filter(s => s.type === 'group').length) + const filtered = computed(() => sessions.value .filter((s) => (filter.value === 'all' ? true : s.type === filter.value)) @@ -61,11 +64,18 @@ watch(() => [props.ownerId, props.channel] as const, load, { immediate: true })