mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
Simplify Codex takeover notice copy and match hint styling
Restyle the proxy-takeover notice in the Codex editor from the boxed Alert to the amber inline-hint style used by the endpoint hints, and drop implementation jargon (127.0.0.1 / PROXY_MANAGED) that users could not interpret. The notice and the auth/config hints now simply state that the form shows the stored provider config rather than the proxy-managed live config. i18n synced across en/zh/ja/zh-TW.
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Info } from "lucide-react";
|
||||
import { CodexAuthSection, CodexConfigSection } from "./CodexConfigSections";
|
||||
import { CodexCommonConfigModal } from "./CodexCommonConfigModal";
|
||||
import { Alert, AlertDescription } from "@/components/ui/alert";
|
||||
|
||||
interface CodexConfigEditorProps {
|
||||
authValue: string;
|
||||
@@ -74,12 +72,11 @@ const CodexConfigEditor: React.FC<CodexConfigEditorProps> = ({
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
{isProxyTakeover && (
|
||||
<Alert>
|
||||
<Info className="h-4 w-4" />
|
||||
<AlertDescription>
|
||||
<div className="p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-700 rounded-lg">
|
||||
<p className="text-xs text-amber-600 dark:text-amber-400">
|
||||
{t("codexConfig.proxyTakeoverStorageNotice")}
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Auth JSON Section */}
|
||||
|
||||
@@ -1104,11 +1104,11 @@
|
||||
"authJson": "auth.json (JSON) *",
|
||||
"authJsonPlaceholder": "{\n \"OPENAI_API_KEY\": \"sk-your-api-key-here\"\n}",
|
||||
"authJsonHint": "Codex auth.json configuration content",
|
||||
"authJsonStorageHint": "Proxy takeover is showing provider-stored auth, not the live ~/.codex/auth.json; OAuth access tokens remain in the live auth.json.",
|
||||
"authJsonStorageHint": "Proxy takeover is showing the stored auth, not the live auth.json.",
|
||||
"configToml": "config.toml (TOML)",
|
||||
"configTomlHint": "Codex config.toml configuration content",
|
||||
"configTomlStorageHint": "Proxy takeover is showing the provider upstream config; the live config.toml is temporarily managed with the local proxy URL and PROXY_MANAGED.",
|
||||
"proxyTakeoverStorageNotice": "This app is under proxy takeover. You are editing the provider's stored config; the live config is temporarily managed by the proxy, so this form does not need to show 127.0.0.1 or PROXY_MANAGED.",
|
||||
"configTomlStorageHint": "Proxy takeover is showing the stored config, not the live config.toml.",
|
||||
"proxyTakeoverStorageNotice": "💡 This app is under proxy takeover. You are editing the stored provider config; the live config is already temporarily managed by the proxy.",
|
||||
"writeCommonConfig": "Write Common Config",
|
||||
"editCommonConfig": "Edit Common Config",
|
||||
"editCommonConfigTitle": "Edit Codex Common Config Snippet",
|
||||
|
||||
@@ -1104,11 +1104,11 @@
|
||||
"authJson": "auth.json (JSON) *",
|
||||
"authJsonPlaceholder": "{\n \"OPENAI_API_KEY\": \"sk-your-api-key-here\"\n}",
|
||||
"authJsonHint": "Codex の auth.json 設定内容",
|
||||
"authJsonStorageHint": "プロキシ引き継ぎ中は、live の ~/.codex/auth.json ではなくプロバイダー保存 auth を表示しています。OAuth アクセストークンは live auth.json に保持されます。",
|
||||
"authJsonStorageHint": "プロキシ引き継ぎ中は保存済みの auth を表示しており、実際の auth.json ではありません。",
|
||||
"configToml": "config.toml (TOML)",
|
||||
"configTomlHint": "Codex の config.toml 設定内容",
|
||||
"configTomlStorageHint": "プロキシ引き継ぎ中はプロバイダーの upstream config を表示しています。live config.toml は一時的にローカルプロキシ URL と PROXY_MANAGED で管理されます。",
|
||||
"proxyTakeoverStorageNotice": "このアプリはプロキシ引き継ぎ中です。ここで編集しているのはプロバイダーの保存設定で、実際の live 設定は一時的にプロキシが管理します。このフォームに 127.0.0.1 や PROXY_MANAGED が表示される必要はありません。",
|
||||
"configTomlStorageHint": "プロキシ引き継ぎ中は保存済みの config を表示しており、実際の config.toml ではありません。",
|
||||
"proxyTakeoverStorageNotice": "💡 このアプリはプロキシ引き継ぎ中です。ここで編集しているのは保存済みのプロバイダー設定で、実際の live 設定はすでにプロキシが一時的に引き継いでいます。",
|
||||
"writeCommonConfig": "共通設定を書き込む",
|
||||
"editCommonConfig": "共通設定を編集",
|
||||
"editCommonConfigTitle": "Codex 共通設定スニペットを編集",
|
||||
|
||||
@@ -1076,11 +1076,11 @@
|
||||
"authJson": "auth.json (JSON) *",
|
||||
"authJsonPlaceholder": "{\n \"OPENAI_API_KEY\": \"sk-your-api-key-here\"\n}",
|
||||
"authJsonHint": "Codex auth.json 設定內容",
|
||||
"authJsonStorageHint": "代理接管中顯示的是供應商儲存 auth,不是即時 ~/.codex/auth.json;OAuth Access Token 會保留在 live auth.json 中。",
|
||||
"authJsonStorageHint": "代理接管中顯示的是儲存的 auth 配置,不是即時 auth.json",
|
||||
"configToml": "config.toml (TOML)",
|
||||
"configTomlHint": "Codex config.toml 設定內容",
|
||||
"configTomlStorageHint": "代理接管中顯示的是供應商上游 config;即時 config.toml 會由代理暫時寫為本機位址和 PROXY_MANAGED。",
|
||||
"proxyTakeoverStorageNotice": "目前應用處於代理接管狀態。這裡編輯的是供應商儲存配置,真實 live 配置會由代理暫時接管;儲存不需要這裡顯示 127.0.0.1 或 PROXY_MANAGED。",
|
||||
"configTomlStorageHint": "代理接管中顯示的是儲存的 config 配置,不是即時 config.toml",
|
||||
"proxyTakeoverStorageNotice": "💡 目前應用處於代理接管狀態。這裡編輯的是儲存的供應商配置,真實 live 配置已由代理暫時接管",
|
||||
"writeCommonConfig": "寫入通用設定",
|
||||
"editCommonConfig": "編輯通用設定",
|
||||
"editCommonConfigTitle": "編輯 Codex 通用設定片段",
|
||||
|
||||
@@ -1104,11 +1104,11 @@
|
||||
"authJson": "auth.json (JSON) *",
|
||||
"authJsonPlaceholder": "{\n \"OPENAI_API_KEY\": \"sk-your-api-key-here\"\n}",
|
||||
"authJsonHint": "Codex auth.json 配置内容",
|
||||
"authJsonStorageHint": "代理接管中显示的是供应商存储 auth,不是实时 ~/.codex/auth.json;OAuth Access Token 会保留在 live auth.json 中。",
|
||||
"authJsonStorageHint": "代理接管中显示的是存储的 auth 配置,不是实时 auth.json",
|
||||
"configToml": "config.toml (TOML)",
|
||||
"configTomlHint": "Codex config.toml 配置内容",
|
||||
"configTomlStorageHint": "代理接管中显示的是供应商上游 config;实时 config.toml 会由代理临时写为本地地址和 PROXY_MANAGED。",
|
||||
"proxyTakeoverStorageNotice": "当前应用处于代理接管状态。这里编辑的是供应商存储配置,真实 live 配置会由代理临时接管;保存不会要求这里显示 127.0.0.1 或 PROXY_MANAGED。",
|
||||
"configTomlStorageHint": "代理接管中显示的是存储的 config 配置,不是实时 config.toml",
|
||||
"proxyTakeoverStorageNotice": "💡 当前应用处于代理接管状态。这里编辑的是存储的供应商配置,真实 live 配置已由代理临时接管",
|
||||
"writeCommonConfig": "写入通用配置",
|
||||
"editCommonConfig": "编辑通用配置",
|
||||
"editCommonConfigTitle": "编辑 Codex 通用配置片段",
|
||||
|
||||
Reference in New Issue
Block a user