修复UI问题:禁用正在使用供应商的编辑按钮
- 为正在使用中的供应商禁用编辑按钮,避免编辑活跃配置 - 添加edit-btn的disabled样式,保持界面一致性 - 防止用户编辑正在使用的settings.json导致配置冲突
This commit is contained in:
@@ -174,11 +174,16 @@
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.edit-btn:hover {
|
||||
.edit-btn:hover:not(:disabled) {
|
||||
background: #3498db;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.edit-btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.delete-btn {
|
||||
padding: 0.375rem 0.75rem;
|
||||
border: 1px solid #e74c3c;
|
||||
|
||||
@@ -92,6 +92,7 @@ const ProviderList: React.FC<ProviderListProps> = ({
|
||||
<button
|
||||
className="edit-btn"
|
||||
onClick={() => onEdit(provider.id)}
|
||||
disabled={isCurrent}
|
||||
>
|
||||
编辑
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user