重大功能改进:添加禁止 Claude Code 签名功能并重构代码

新增功能:
- 在添加供应商和编辑供应商窗口都增加"禁止 Claude Code 签名"选择框
- 自动同步 JSON 配置中的 includeCoAuthoredBy 字段
- 支持双向同步:手动编辑 JSON 时选择框状态自动更新

代码优化:
- 提取通用函数到 providerConfigUtils.ts 工具文件
- 重构代码避免重复,提高可维护性
- 保持原有自动提取官网地址功能

UI改进:
- 优化选择框与标签的对齐样式
- 统一两个窗口的交互体验
This commit is contained in:
farion1231
2025-08-07 23:05:11 +08:00
parent b0d4537398
commit 100b3f6e21
4 changed files with 162 additions and 21 deletions

View File

@@ -149,4 +149,34 @@
color: #7f8c8d;
font-size: 0.8rem;
line-height: 1.3;
}
/* 添加标签和选择框的样式 */
.label-with-checkbox {
display: flex;
justify-content: space-between;
align-items: baseline;
margin-bottom: 0.5rem;
}
.label-with-checkbox label:first-child {
margin-bottom: 0;
}
.checkbox-label {
display: flex;
align-items: center;
gap: 0.3rem;
font-size: 0.85rem;
color: #666;
font-weight: normal;
margin-bottom: 0;
cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
width: auto;
margin: 2px;
cursor: pointer;
transform: translateY(2px);
}