🐛 fix: align dashboard with secured APIs

This commit is contained in:
2026-08-13 03:29:33 +07:00
parent e90dc8382b
commit 3f09e330be
47 changed files with 1280 additions and 397 deletions
@@ -76,7 +76,7 @@ export function ConnectionInfoCell({ serverId, type }: ConnectionInfoCellProps)
aria-label="Copy connection string"
>
{copied ? (
<Check className="h-3 w-3 text-green-500" />
<Check className="h-3 w-3 text-success" />
) : (
<Copy className="h-3 w-3" />
)}
+27 -22
View File
@@ -11,14 +11,14 @@ type ServerTableProps =
| {
type: "normal";
servers: NormalServer[];
onEdit: (id: string) => void;
onDelete: (id: string) => void;
onEdit?: (id: string) => void;
onDelete?: (id: string) => void;
}
| {
type: "proxy";
servers: ReverseProxyServer[];
onEdit: (id: string) => void;
onDelete: (id: string) => void;
onEdit?: (id: string) => void;
onDelete?: (id: string) => void;
};
function RowActions({
@@ -29,27 +29,32 @@ function RowActions({
}: {
id: string;
kind: string;
onEdit: (id: string) => void;
onDelete: (id: string) => void;
onEdit?: (id: string) => void;
onDelete?: (id: string) => void;
}) {
if (!onEdit && !onDelete) return null;
return (
<TableActions>
<Button
variant="ghost"
size="icon"
onClick={() => onEdit(id)}
aria-label={`Edit ${kind} ${id}`}
>
<Pencil />
</Button>
<Button
variant="ghost"
size="icon"
onClick={() => onDelete(id)}
aria-label={`Delete ${kind} ${id}`}
>
<Trash2 />
</Button>
{onEdit && (
<Button
variant="ghost"
size="icon"
onClick={() => onEdit(id)}
aria-label={`Edit ${kind} ${id}`}
>
<Pencil />
</Button>
)}
{onDelete && (
<Button
variant="ghost"
size="icon"
onClick={() => onDelete(id)}
aria-label={`Delete ${kind} ${id}`}
>
<Trash2 />
</Button>
)}
</TableActions>
);
}