diff --git a/web/src/app/home/add-extension/page.tsx b/web/src/app/home/add-extension/page.tsx index d4d2e7bf..cda161e5 100644 --- a/web/src/app/home/add-extension/page.tsx +++ b/web/src/app/home/add-extension/page.tsx @@ -116,61 +116,63 @@ function AddExtensionContent() { }); } + const extensionActions = ( + <> + + + + + + + + navigate('/home/skills?action=create')}> + {t('skills.createManually')} + + navigate('/home/skills?action=upload')}> + {t('skills.uploadZip')} + + navigate('/home/skills?action=github')}> + {t('skills.importFromGithub')} + + + + + + + + + + navigate('/home/add-plugin?action=github')}> + {t('plugins.installFromGithub')} + + navigate('/home/add-plugin?action=upload')}> + {t('plugins.uploadLocal')} + + + + + ); + return ( <>
-
- - - - - - - - navigate('/home/skills?action=create')}> - {t('skills.createManually')} - - navigate('/home/skills?action=upload')}> - {t('skills.uploadZip')} - - navigate('/home/skills?action=github')}> - {t('skills.importFromGithub')} - - - - - - - - - - navigate('/home/add-plugin?action=github')}> - {t('plugins.installFromGithub')} - - navigate('/home/add-plugin?action=upload')}> - {t('plugins.uploadLocal')} - - - -
-
- +
diff --git a/web/src/app/home/plugins/components/plugin-market/PluginMarketComponent.tsx b/web/src/app/home/plugins/components/plugin-market/PluginMarketComponent.tsx index 974f4d7d..09fd60eb 100644 --- a/web/src/app/home/plugins/components/plugin-market/PluginMarketComponent.tsx +++ b/web/src/app/home/plugins/components/plugin-market/PluginMarketComponent.tsx @@ -50,8 +50,10 @@ interface SortOption { // 内部组件,用于处理搜索参数 function MarketPageContent({ installPlugin, + headerActions, }: { installPlugin: (plugin: PluginV4) => void; + headerActions?: React.ReactNode; }) { const { t } = useTranslation(); const [searchParams] = useSearchParams(); @@ -572,9 +574,9 @@ function MarketPageContent({
{/* Fixed header with search and sort controls */}
- {/* Search box */} + {/* Search box and actions */}
-
+
- + {headerActions && ( +
+ {headerActions} +
+ )}
- {/* Sort and more filters */} -
+ {/* Sort, filters and tags in one row */} +
{/* Sort dropdown */} -
+
{t('market.sortBy')}: @@ -623,7 +629,7 @@ function MarketPageContent({ -
-
- {/* Quick tag filter buttons */} -
- - {availableTags.map((tag) => { - const selected = selectedTags.includes(tag.tag); - return ( - - ); - })} + {/* Separator */} +
+ + {/* Quick tag filter buttons */} +
+ + {availableTags.map((tag) => { + const selected = selectedTags.includes(tag.tag); + return ( + + ); + })} +
{/* Search results stats */} @@ -799,8 +808,10 @@ function MarketPageContent({ // 主组件,包装在 Suspense 中 export default function MarketPage({ installPlugin, + headerActions, }: { installPlugin: (plugin: PluginV4) => void; + headerActions?: React.ReactNode; }) { return ( } > - + ); }