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:
farion1231
2025-09-21 10:16:20 +08:00
parent 54f1357bcc
commit 2147db6707

View File

@@ -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,