feat/revoke-share #3
@@ -414,15 +414,21 @@ const AccountRow: React.FC<{
|
||||
};
|
||||
|
||||
const isBanned = account?.vacBanned || (account?.gameBans && account.gameBans > 0);
|
||||
const isShared = account?._id.startsWith('shared_');
|
||||
|
||||
// Refined Shared Logic:
|
||||
// 1. It was shared WITH you (starts with shared_)
|
||||
// 2. OR you are the owner but you have shared it with at least one person
|
||||
const isSharedWithYou = account?._id.startsWith('shared_');
|
||||
const hasSharedMembers = (account as any).sharedWith && (account as any).sharedWith.length > 0;
|
||||
const showCommunityIcon = isSharedWithYou || hasSharedMembers;
|
||||
|
||||
return (
|
||||
<TableRow sx={{ '&:hover': { background: 'action.hover' }, borderBottom: '1px solid', borderColor: 'divider' }}>
|
||||
<TableCell>
|
||||
<Box sx={{ position: 'relative' }}>
|
||||
<Avatar src={imgSrc} variant="square" sx={{ width: 32, height: 32, border: '1px solid', borderColor: 'divider' }} />
|
||||
{isShared && (
|
||||
<Tooltip title="Community Shared Account">
|
||||
{showCommunityIcon && (
|
||||
<Tooltip title={isSharedWithYou ? "Remote Shared Account" : "Actively Shared with Community"}>
|
||||
<PeopleIcon sx={{ position: 'absolute', bottom: -4, right: -4, fontSize: 14, color: 'primary.main', bgcolor: 'background.default', borderRadius: '50%', border: '1px solid', borderColor: 'divider', p: 0.2 }} />
|
||||
</Tooltip>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user