fix: projects fix in permissions
This commit is contained in:
@@ -359,7 +359,7 @@ export function PermissionModal({
|
||||
onClick={() => handleToggleProject(key, project.id)}
|
||||
>
|
||||
<Avatar className="h-6 w-6 shrink-0">
|
||||
<AvatarImage src={project.username ? undefined : undefined} />
|
||||
<AvatarImage src={project.username ? `https://t.me/i/userpic/320/${project.username}.jpg` : undefined} />
|
||||
<AvatarFallback className="text-xs">
|
||||
{project.title.charAt(0).toUpperCase()}
|
||||
</AvatarFallback>
|
||||
@@ -400,19 +400,19 @@ export function PermissionModal({
|
||||
className={cn("gap-1 text-xs", isDisabled && "opacity-50")}
|
||||
>
|
||||
<Avatar className="h-4 w-4">
|
||||
<AvatarImage src={project?.username ? `https://t.me/i/userpic/320/${project.username}.jpg` : undefined} />
|
||||
<AvatarFallback className="text-[10px]">
|
||||
{project?.title.charAt(0).toUpperCase() || "?"}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<span className="truncate max-w-[150px]">{project?.title || "Unknown"}</span>
|
||||
<X
|
||||
<span
|
||||
className={cn(
|
||||
"h-3 w-3 ml-1",
|
||||
isDisabled
|
||||
? "cursor-not-allowed text-muted-foreground/50"
|
||||
: "cursor-pointer hover:text-destructive"
|
||||
"h-3 w-3 ml-1 cursor-pointer hover:text-destructive",
|
||||
isDisabled && "cursor-not-allowed text-muted-foreground/50"
|
||||
)}
|
||||
onClick={() => {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
if (isDisabled) return;
|
||||
setPermissions((prev) => {
|
||||
const existing = prev.find((p) => p.key === key);
|
||||
@@ -426,7 +426,9 @@ export function PermissionModal({
|
||||
);
|
||||
});
|
||||
}}
|
||||
/>
|
||||
>
|
||||
<X className="h-3 w-3" />
|
||||
</span>
|
||||
</Badge>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user