修复UI问题:禁用正在使用供应商的编辑按钮

- 为正在使用中的供应商禁用编辑按钮,避免编辑活跃配置
- 添加edit-btn的disabled样式,保持界面一致性
- 防止用户编辑正在使用的settings.json导致配置冲突
This commit is contained in:
farion1231
2025-08-08 15:29:28 +08:00
parent 72e34ab025
commit c5843ae849
2 changed files with 7 additions and 1 deletions

View File

@@ -174,11 +174,16 @@
transition: all 0.2s; transition: all 0.2s;
} }
.edit-btn:hover { .edit-btn:hover:not(:disabled) {
background: #3498db; background: #3498db;
color: white; color: white;
} }
.edit-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.delete-btn { .delete-btn {
padding: 0.375rem 0.75rem; padding: 0.375rem 0.75rem;
border: 1px solid #e74c3c; border: 1px solid #e74c3c;

View File

@@ -92,6 +92,7 @@ const ProviderList: React.FC<ProviderListProps> = ({
<button <button
className="edit-btn" className="edit-btn"
onClick={() => onEdit(provider.id)} onClick={() => onEdit(provider.id)}
disabled={isCurrent}
> >
</button> </button>