fix: update WSL config directory override description and fix formatting
- Clarify that WSL config directory is for WSL environments specifically - Explain that vendor data stays consistent with main environment - Add missing parentheses for proper conditional evaluation - Remove trailing commas from GitHub release URLs
This commit is contained in:
@@ -183,8 +183,8 @@ export default function SettingsModal({ onClose }: SettingsModalProps) {
|
|||||||
try {
|
try {
|
||||||
const currentResolved =
|
const currentResolved =
|
||||||
app === "claude"
|
app === "claude"
|
||||||
? settings.claudeConfigDir ?? resolvedClaudeDir
|
? (settings.claudeConfigDir ?? resolvedClaudeDir)
|
||||||
: settings.codexConfigDir ?? resolvedCodexDir;
|
: (settings.codexConfigDir ?? resolvedCodexDir);
|
||||||
|
|
||||||
const selected = await window.api.selectConfigDirectory(currentResolved);
|
const selected = await window.api.selectConfigDirectory(currentResolved);
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ export default function SettingsModal({ onClose }: SettingsModalProps) {
|
|||||||
// 如果未知或为空,回退到 releases 首页
|
// 如果未知或为空,回退到 releases 首页
|
||||||
if (!targetVersion || targetVersion === "未知") {
|
if (!targetVersion || targetVersion === "未知") {
|
||||||
await window.api.openExternal(
|
await window.api.openExternal(
|
||||||
"https://github.com/farion1231/cc-switch/releases",
|
"https://github.com/farion1231/cc-switch/releases"
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -255,7 +255,7 @@ export default function SettingsModal({ onClose }: SettingsModalProps) {
|
|||||||
? targetVersion
|
? targetVersion
|
||||||
: `v${targetVersion}`;
|
: `v${targetVersion}`;
|
||||||
await window.api.openExternal(
|
await window.api.openExternal(
|
||||||
`https://github.com/farion1231/cc-switch/releases/tag/${tag}`,
|
`https://github.com/farion1231/cc-switch/releases/tag/${tag}`
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("打开更新日志失败:", error);
|
console.error("打开更新日志失败:", error);
|
||||||
@@ -343,8 +343,8 @@ export default function SettingsModal({ onClose }: SettingsModalProps) {
|
|||||||
配置目录覆盖(高级)
|
配置目录覆盖(高级)
|
||||||
</h3>
|
</h3>
|
||||||
<p className="text-xs text-gray-500 dark:text-gray-400 mb-3 leading-relaxed">
|
<p className="text-xs text-gray-500 dark:text-gray-400 mb-3 leading-relaxed">
|
||||||
在 Windows WSL 等环境下,可手动指定 Claude Code 或 Codex 的配置目录。
|
在 WSL 等环境使用 Claude Code 或 Codex 的时候,可手动指定 WSL
|
||||||
留空则继续使用系统默认路径(macOS/Windows 会自动识别)。
|
里的配置目录,供应商数据与主环境保持一致。
|
||||||
</p>
|
</p>
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<div>
|
<div>
|
||||||
@@ -354,9 +354,7 @@ export default function SettingsModal({ onClose }: SettingsModalProps) {
|
|||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value={
|
value={settings.claudeConfigDir ?? resolvedClaudeDir ?? ""}
|
||||||
settings.claudeConfigDir ?? resolvedClaudeDir ?? ""
|
|
||||||
}
|
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
setSettings({
|
setSettings({
|
||||||
...settings,
|
...settings,
|
||||||
|
|||||||
Reference in New Issue
Block a user