feat: add prettier formatter and MIT license
- Add prettier dev dependency for code formatting - Create MIT LICENSE file - Format TypeScript files with prettier - Update provider order in README (Qwen coder first) - Update add provider screenshot with new UI
This commit is contained in:
@@ -171,7 +171,8 @@ const ProviderForm: React.FC<ProviderFormProps> = ({
|
||||
selectedPreset !== null || hasApiKeyField(formData.settingsConfig);
|
||||
|
||||
// 判断当前选中的预设是否是官方
|
||||
const isOfficialPreset = selectedPreset !== null &&
|
||||
const isOfficialPreset =
|
||||
selectedPreset !== null &&
|
||||
providerPresets[selectedPreset]?.isOfficial === true;
|
||||
|
||||
// 初始时从配置中同步 API Key(编辑模式)
|
||||
@@ -270,17 +271,22 @@ const ProviderForm: React.FC<ProviderFormProps> = ({
|
||||
id="apiKey"
|
||||
value={apiKey}
|
||||
onChange={(e) => handleApiKeyChange(e.target.value)}
|
||||
placeholder={isOfficialPreset
|
||||
? "官方登录无需填写 API Key,直接保存即可"
|
||||
: "只需要填这里,下方配置会自动填充"
|
||||
placeholder={
|
||||
isOfficialPreset
|
||||
? "官方登录无需填写 API Key,直接保存即可"
|
||||
: "只需要填这里,下方配置会自动填充"
|
||||
}
|
||||
disabled={isOfficialPreset}
|
||||
autoComplete="off"
|
||||
style={isOfficialPreset ? {
|
||||
backgroundColor: '#f5f5f5',
|
||||
cursor: 'not-allowed',
|
||||
color: '#999'
|
||||
} : {}}
|
||||
style={
|
||||
isOfficialPreset
|
||||
? {
|
||||
backgroundColor: "#f5f5f5",
|
||||
cursor: "not-allowed",
|
||||
color: "#999",
|
||||
}
|
||||
: {}
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user