refactor: remove required constraints and empty API key fields
- Remove 'required' attribute from Codex auth.json textarea - Remove conditional 'required' logic from API key input field - Clean up Codex Official preset by removing null OPENAI_API_KEY entry - Allow more flexible form validation while maintaining backend checks
This commit is contained in:
@@ -35,7 +35,6 @@ export const CodexAuthSection: React.FC<CodexAuthSectionProps> = ({
|
|||||||
onBlur={onBlur}
|
onBlur={onBlur}
|
||||||
placeholder={t("codexConfig.authJsonPlaceholder")}
|
placeholder={t("codexConfig.authJsonPlaceholder")}
|
||||||
rows={6}
|
rows={6}
|
||||||
required
|
|
||||||
className="w-full px-3 py-2 border border-border-default dark:bg-gray-800 dark:text-gray-100 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:focus:ring-blue-400/20 transition-colors resize-y min-h-[8rem]"
|
className="w-full px-3 py-2 border border-border-default dark:bg-gray-800 dark:text-gray-100 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:focus:ring-blue-400/20 transition-colors resize-y min-h-[8rem]"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
autoCorrect="off"
|
autoCorrect="off"
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ export function ApiKeySection({
|
|||||||
label={label}
|
label={label}
|
||||||
value={value}
|
value={value}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
required={category !== "official"}
|
|
||||||
placeholder={
|
placeholder={
|
||||||
category === "official"
|
category === "official"
|
||||||
? finalPlaceholder.official
|
? finalPlaceholder.official
|
||||||
|
|||||||
@@ -62,9 +62,7 @@ export const codexProviderPresets: CodexProviderPreset[] = [
|
|||||||
websiteUrl: "https://chatgpt.com/codex",
|
websiteUrl: "https://chatgpt.com/codex",
|
||||||
isOfficial: true,
|
isOfficial: true,
|
||||||
category: "official",
|
category: "official",
|
||||||
auth: {
|
auth: {},
|
||||||
OPENAI_API_KEY: null,
|
|
||||||
},
|
|
||||||
config: ``,
|
config: ``,
|
||||||
theme: {
|
theme: {
|
||||||
icon: "codex",
|
icon: "codex",
|
||||||
|
|||||||
Reference in New Issue
Block a user