mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 19:37:36 +08:00
feat(web): Add centered empty state messages to pipeline extension dialogs (#1784)
* Initial plan * feat: add empty state messages in pipeline extension dialogs Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> * fix: center empty state messages in dialog content area Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com>
This commit is contained in:
@@ -331,7 +331,14 @@ export default function PipelineExtension({
|
|||||||
<DialogTitle>{t('pipelines.extensions.selectPlugins')}</DialogTitle>
|
<DialogTitle>{t('pipelines.extensions.selectPlugins')}</DialogTitle>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="flex-1 overflow-y-auto space-y-2 pr-2">
|
<div className="flex-1 overflow-y-auto space-y-2 pr-2">
|
||||||
{allPlugins.map((plugin) => {
|
{allPlugins.length === 0 ? (
|
||||||
|
<div className="flex h-full items-center justify-center">
|
||||||
|
<p className="text-sm text-muted-foreground">
|
||||||
|
{t('pipelines.extensions.noPluginsInstalled')}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
allPlugins.map((plugin) => {
|
||||||
const pluginId = getPluginId(plugin);
|
const pluginId = getPluginId(plugin);
|
||||||
const metadata = plugin.manifest.manifest.metadata;
|
const metadata = plugin.manifest.manifest.metadata;
|
||||||
const isSelected = tempSelectedPluginIds.includes(pluginId);
|
const isSelected = tempSelectedPluginIds.includes(pluginId);
|
||||||
@@ -372,7 +379,8 @@ export default function PipelineExtension({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button
|
<Button
|
||||||
@@ -397,8 +405,17 @@ export default function PipelineExtension({
|
|||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="flex-1 overflow-y-auto space-y-2 pr-2">
|
<div className="flex-1 overflow-y-auto space-y-2 pr-2">
|
||||||
{allMCPServers.map((server) => {
|
{allMCPServers.length === 0 ? (
|
||||||
const isSelected = tempSelectedMCPIds.includes(server.uuid || '');
|
<div className="flex h-full items-center justify-center">
|
||||||
|
<p className="text-sm text-muted-foreground">
|
||||||
|
{t('pipelines.extensions.noMCPServersConfigured')}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
allMCPServers.map((server) => {
|
||||||
|
const isSelected = tempSelectedMCPIds.includes(
|
||||||
|
server.uuid || '',
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={server.uuid}
|
key={server.uuid}
|
||||||
@@ -436,7 +453,8 @@ export default function PipelineExtension({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button variant="outline" onClick={() => setMcpDialogOpen(false)}>
|
<Button variant="outline" onClick={() => setMcpDialogOpen(false)}>
|
||||||
|
|||||||
@@ -482,6 +482,8 @@ const enUS = {
|
|||||||
addMCPServer: 'Add MCP Server',
|
addMCPServer: 'Add MCP Server',
|
||||||
selectMCPServers: 'Select MCP Servers',
|
selectMCPServers: 'Select MCP Servers',
|
||||||
toolCount: '{{count}} tools',
|
toolCount: '{{count}} tools',
|
||||||
|
noPluginsInstalled: 'No installed plugins',
|
||||||
|
noMCPServersConfigured: 'No configured MCP servers',
|
||||||
},
|
},
|
||||||
debugDialog: {
|
debugDialog: {
|
||||||
title: 'Pipeline Chat',
|
title: 'Pipeline Chat',
|
||||||
|
|||||||
@@ -485,6 +485,8 @@ const jaJP = {
|
|||||||
addMCPServer: 'MCPサーバーを追加',
|
addMCPServer: 'MCPサーバーを追加',
|
||||||
selectMCPServers: 'MCPサーバーを選択',
|
selectMCPServers: 'MCPサーバーを選択',
|
||||||
toolCount: '{{count}}個のツール',
|
toolCount: '{{count}}個のツール',
|
||||||
|
noPluginsInstalled: 'インストールされているプラグインがありません',
|
||||||
|
noMCPServersConfigured: '設定されているMCPサーバーがありません',
|
||||||
},
|
},
|
||||||
debugDialog: {
|
debugDialog: {
|
||||||
title: 'パイプラインのチャット',
|
title: 'パイプラインのチャット',
|
||||||
|
|||||||
@@ -464,6 +464,8 @@ const zhHans = {
|
|||||||
addMCPServer: '添加 MCP 服务器',
|
addMCPServer: '添加 MCP 服务器',
|
||||||
selectMCPServers: '选择 MCP 服务器',
|
selectMCPServers: '选择 MCP 服务器',
|
||||||
toolCount: '{{count}} 个工具',
|
toolCount: '{{count}} 个工具',
|
||||||
|
noPluginsInstalled: '无已安装的插件',
|
||||||
|
noMCPServersConfigured: '无已配置的 MCP 服务器',
|
||||||
},
|
},
|
||||||
debugDialog: {
|
debugDialog: {
|
||||||
title: '流水线对话',
|
title: '流水线对话',
|
||||||
|
|||||||
@@ -462,6 +462,8 @@ const zhHant = {
|
|||||||
addMCPServer: '新增 MCP 伺服器',
|
addMCPServer: '新增 MCP 伺服器',
|
||||||
selectMCPServers: '選擇 MCP 伺服器',
|
selectMCPServers: '選擇 MCP 伺服器',
|
||||||
toolCount: '{{count}} 個工具',
|
toolCount: '{{count}} 個工具',
|
||||||
|
noPluginsInstalled: '無已安裝的插件',
|
||||||
|
noMCPServersConfigured: '無已配置的 MCP 伺服器',
|
||||||
},
|
},
|
||||||
debugDialog: {
|
debugDialog: {
|
||||||
title: '流程線對話',
|
title: '流程線對話',
|
||||||
|
|||||||
Reference in New Issue
Block a user