diff --git a/src/components/common/FullScreenPanel.tsx b/src/components/common/FullScreenPanel.tsx index 9d16d87..b98d2e4 100644 --- a/src/components/common/FullScreenPanel.tsx +++ b/src/components/common/FullScreenPanel.tsx @@ -32,33 +32,39 @@ export const FullScreenPanel: React.FC = ({ > {/* Header */}
- -

{title}

+
+ +

{title}

+
{/* Content */} -
- {children} +
+
+ {children} +
{/* Footer */} {footer && (
- {footer} +
+ {footer} +
)}
, diff --git a/src/components/mcp/McpFormModal.tsx b/src/components/mcp/McpFormModal.tsx index 43d1421..b7af81d 100644 --- a/src/components/mcp/McpFormModal.tsx +++ b/src/components/mcp/McpFormModal.tsx @@ -409,241 +409,11 @@ const McpFormModal: React.FC = ({ return ( <> - - {/* 预设选择(仅新增时展示) */} - {!isEditing && ( -
- -
- - {mcpPresets.map((preset, idx) => { - const descriptionKey = `mcp.presets.${preset.id}.description`; - return ( - - ); - })} -
-
- )} - - {/* ID (标题) */} -
-
- - {!isEditing && idError && ( - - {idError} - - )} -
- handleIdChange(e.target.value)} - disabled={isEditing} - /> -
- - {/* Name */} -
- - setFormName(e.target.value)} - /> -
- - {/* 启用到哪些应用 */} -
- -
-
- - setEnabledApps({ ...enabledApps, claude: checked }) - } - /> - -
- -
- - setEnabledApps({ ...enabledApps, codex: checked }) - } - /> - -
- -
- - setEnabledApps({ ...enabledApps, gemini: checked }) - } - /> - -
-
-
- - {/* 可折叠的附加信息按钮 */} -
- -
- - {/* 附加信息区域(可折叠) */} - {showMetadata && ( - <> -
- - setFormDescription(e.target.value)} - /> -
- -
- - setFormTags(e.target.value)} - /> -
- -
- - setFormHomepage(e.target.value)} - /> -
- -
- - setFormDocs(e.target.value)} - /> -
- - )} - - {/* 配置输入框 */} -
-
- - {(isEditing || selectedPreset === -1) && ( - - )} -
- - {configError && ( -
- - {configError} -
- )} -
- -
+ = ({ ? t("common.save") : t("common.add")} + } + > +
+ {/* 预设选择(仅新增时展示) */} + {!isEditing && ( +
+ +
+ + {mcpPresets.map((preset, idx) => { + const descriptionKey = `mcp.presets.${preset.id}.description`; + return ( + + ); + })} +
+
+ )} + + {/* ID (标题) */} +
+
+ + {!isEditing && idError && ( + + {idError} + + )} +
+ handleIdChange(e.target.value)} + disabled={isEditing} + /> +
+ + {/* Name */} +
+ + setFormName(e.target.value)} + /> +
+ + {/* 启用到哪些应用 */} +
+ +
+
+ + setEnabledApps({ ...enabledApps, claude: checked }) + } + /> + +
+ +
+ + setEnabledApps({ ...enabledApps, codex: checked }) + } + /> + +
+ +
+ + setEnabledApps({ ...enabledApps, gemini: checked }) + } + /> + +
+
+
+ + {/* 可折叠的附加信息按钮 */} +
+ +
+ + {/* 附加信息区域(可折叠) */} + {showMetadata && ( + <> +
+ + setFormDescription(e.target.value)} + /> +
+ +
+ + setFormTags(e.target.value)} + /> +
+ +
+ + setFormHomepage(e.target.value)} + /> +
+ +
+ + setFormDocs(e.target.value)} + /> +
+ + )} + + {/* 配置输入框 */} +
+
+ + {(isEditing || selectedPreset === -1) && ( + + )} +
+ + {configError && ( +
+ + {configError} +
+ )} +
diff --git a/src/components/mcp/UnifiedMcpPanel.tsx b/src/components/mcp/UnifiedMcpPanel.tsx index 4ebfb48..b740753 100644 --- a/src/components/mcp/UnifiedMcpPanel.tsx +++ b/src/components/mcp/UnifiedMcpPanel.tsx @@ -115,9 +115,9 @@ const UnifiedMcpPanel = React.forwardRef< }; return ( -
+
{/* Info Section */} -
+
{t("mcp.serverCount", { count: serverEntries.length })} ·{" "} {t("mcp.unifiedPanel.apps.claude")}: {enabledCounts.claude} ·{" "} @@ -127,7 +127,7 @@ const UnifiedMcpPanel = React.forwardRef<
{/* Content - Scrollable */} -
+
{isLoading ? (
{t("mcp.loading")} @@ -233,112 +233,110 @@ const UnifiedMcpListItem: React.FC = ({ }; return ( -
-
- {/* 左侧:服务器信息 */} -
-
-

- {name} -

- {docsUrl && ( - - )} -
- {description && ( -

- {description} -

- )} - {!description && tags && tags.length > 0 && ( -

- {tags.join(", ")} -

+
+ {/* 左侧:服务器信息 */} +
+
+

+ {name} +

+ {docsUrl && ( + )}
+ {description && ( +

+ {description} +

+ )} + {!description && tags && tags.length > 0 && ( +

+ {tags.join(", ")} +

+ )} +
- {/* 中间:应用开关 */} -
-
- - - onToggleApp(id, "claude", checked) - } - /> -
- -
- - - onToggleApp(id, "codex", checked) - } - /> -
- -
- - - onToggleApp(id, "gemini", checked) - } - /> -
+ {/* 中间:应用开关 */} +
+
+ + + onToggleApp(id, "claude", checked) + } + />
- {/* 右侧:操作按钮 */} -
- - - + {t("mcp.unifiedPanel.apps.codex")} + + + onToggleApp(id, "codex", checked) + } + />
+ +
+ + + onToggleApp(id, "gemini", checked) + } + /> +
+
+ + {/* 右侧:操作按钮 */} +
+ + +
); diff --git a/src/components/prompts/PromptFormPanel.tsx b/src/components/prompts/PromptFormPanel.tsx index fe83615..be0ab4a 100644 --- a/src/components/prompts/PromptFormPanel.tsx +++ b/src/components/prompts/PromptFormPanel.tsx @@ -91,47 +91,11 @@ const PromptFormPanel: React.FC = ({ : t("prompts.addTitle", { appName }); return ( - -
- - setName(e.target.value)} - placeholder={t("prompts.namePlaceholder")} - className="mt-2" - /> -
- -
- - setDescription(e.target.value)} - placeholder={t("prompts.descriptionPlaceholder")} - className="mt-2" - /> -
- -
- - -
- -
+ = ({ > {saving ? t("common.saving") : t("common.save")} + } + > +
+
+ + setName(e.target.value)} + placeholder={t("prompts.namePlaceholder")} + className="mt-2" + /> +
+ +
+ + setDescription(e.target.value)} + placeholder={t("prompts.descriptionPlaceholder")} + className="mt-2" + /> +
+ +
+ + +
); diff --git a/src/components/prompts/PromptListItem.tsx b/src/components/prompts/PromptListItem.tsx index f80a178..b3ff132 100644 --- a/src/components/prompts/PromptListItem.tsx +++ b/src/components/prompts/PromptListItem.tsx @@ -25,7 +25,7 @@ const PromptListItem: React.FC = ({ const enabled = prompt.enabled === true; return ( -
+
{/* Toggle 开关 */}
diff --git a/src/components/providers/forms/BasicFormFields.tsx b/src/components/providers/forms/BasicFormFields.tsx index 91c19ed..3ba73f3 100644 --- a/src/components/providers/forms/BasicFormFields.tsx +++ b/src/components/providers/forms/BasicFormFields.tsx @@ -80,18 +80,11 @@ export function BasicFormFields({ form }: BasicFormFieldsProps) { -
-

- {t("providerIcon.selectIcon", { - defaultValue: "选择图标", - })} -

-

- {t("providerIcon.selectDescription", { - defaultValue: "为供应商选择一个图标", - })} -

-
+

+ {t("providerIcon.selectIcon", { + defaultValue: "选择图标", + })} +

diff --git a/src/components/providers/forms/ProviderForm.tsx b/src/components/providers/forms/ProviderForm.tsx index 11258c5..a38ed45 100644 --- a/src/components/providers/forms/ProviderForm.tsx +++ b/src/components/providers/forms/ProviderForm.tsx @@ -655,7 +655,7 @@ export function ProviderForm({
{/* 预设供应商选择(仅新增模式显示) */} {!initialData && ( diff --git a/src/components/settings/SettingsPage.tsx b/src/components/settings/SettingsPage.tsx index 654c266..58c87f8 100644 --- a/src/components/settings/SettingsPage.tsx +++ b/src/components/settings/SettingsPage.tsx @@ -168,7 +168,7 @@ export function SettingsPage({ const isBusy = useMemo(() => isLoading && !settings, [isLoading, settings]); return ( -
+
{isBusy ? (
diff --git a/src/components/skills/RepoManagerPanel.tsx b/src/components/skills/RepoManagerPanel.tsx index bb3a7b5..9cd46b5 100644 --- a/src/components/skills/RepoManagerPanel.tsx +++ b/src/components/skills/RepoManagerPanel.tsx @@ -93,7 +93,7 @@ export function RepoManagerPanel({ onClose={onClose} > {/* 添加仓库表单 */} -
+

添加技能仓库

@@ -156,7 +156,7 @@ export function RepoManagerPanel({ {t("skills.repo.list")} {repos.length === 0 ? ( -
+

{t("skills.repo.empty")}

@@ -166,7 +166,7 @@ export function RepoManagerPanel({ {repos.map((repo) => (
diff --git a/src/components/skills/SkillCard.tsx b/src/components/skills/SkillCard.tsx index 689a558..8fe8290 100644 --- a/src/components/skills/SkillCard.tsx +++ b/src/components/skills/SkillCard.tsx @@ -57,7 +57,7 @@ export function SkillCard({ skill, onInstall, onUninstall }: SkillCardProps) { skill.directory.trim().toLowerCase() !== skill.name.trim().toLowerCase(); return ( - +
diff --git a/src/components/skills/SkillsPage.tsx b/src/components/skills/SkillsPage.tsx index 0567647..62414cf 100644 --- a/src/components/skills/SkillsPage.tsx +++ b/src/components/skills/SkillsPage.tsx @@ -167,39 +167,41 @@ export const SkillsPage = forwardRef( {/* 顶部操作栏(固定区域)已移除,由 App.tsx 接管 */} {/* 技能网格(可滚动详情区域) */} -
- {loading ? ( -
- -
- ) : skills.length === 0 ? ( -
-

- {t("skills.empty")} -

-

- {t("skills.emptyDescription")} -

- -
- ) : ( -
- {skills.map((skill) => ( - - ))} -
- )} +
+
+ {loading ? ( +
+ +
+ ) : skills.length === 0 ? ( +
+

+ {t("skills.empty")} +

+

+ {t("skills.emptyDescription")} +

+ +
+ ) : ( +
+ {skills.map((skill) => ( + + ))} +
+ )} +
{/* 仓库管理面板 */}