fix: add warning tips when deleting ssh key

This commit is contained in:
jialin
2026-06-24 20:54:16 +08:00
committed by jialin
parent e79d5f8962
commit b05c510776
6 changed files with 27 additions and 2 deletions
+17 -2
View File
@@ -87,10 +87,25 @@ const GPUServicePublicKeys: React.FC = () => {
if (val === 'edit') {
handleEdit(row);
} else if (val === 'delete') {
handleDelete({ ...row, name: row.name as string });
handleDelete(
{ ...row, name: row.name as string },
{
tips: intl.formatMessage({
id: 'gpuservice.publicKey.delete.tips'
})
}
);
}
});
const handleDeleteByBatch = () => {
handleDeleteBatch({
tips: intl.formatMessage({
id: 'gpuservice.publicKey.delete.tips'
})
});
};
const renderEmpty = (type?: string) => {
if (type !== 'Table') return;
return (
@@ -130,7 +145,7 @@ const GPUServicePublicKeys: React.FC = () => {
})}
buttonText={intl.formatMessage({ id: 'gpuservice.publicKey.add' })}
handleSearch={handleSearch}
handleDeleteByBatch={handleDeleteBatch}
handleDeleteByBatch={handleDeleteByBatch}
handleClickPrimary={handleAdd}
handleInputChange={handleNameChange}
rowSelection={rowSelection}