fix: load mutual friends button and mutual opt-out status in friend list

This commit is contained in:
pa
2026-03-27 12:20:49 +09:00
parent b3b1d68cc9
commit f71ac77377
8 changed files with 94 additions and 21 deletions
+16 -2
View File
@@ -1,4 +1,4 @@
import { ArrowUpDown, User, UserMinus } from 'lucide-vue-next';
import { ArrowUpDown, EyeOff, User, UserMinus } from 'lucide-vue-next';
import {
Avatar,
AvatarFallback,
@@ -391,7 +391,21 @@ export const createColumns = ({
},
cell: ({ row }) => {
const count = row.original?.$mutualCount;
return count ? <span>{count}</span> : null;
const optedOut = row.original?.$mutualOptedOut;
if (!count && !optedOut) return null;
return (
<span class="inline-flex items-center gap-1">
{count || null}
{optedOut ? (
<TooltipWrapper
side="top"
content={t('table.friendList.mutualOptedOut')}
>
<EyeOff class="h-3.5 w-3.5 text-muted-foreground" />
</TooltipWrapper>
) : null}
</span>
);
}
},
{