From 1e77d8253558b5457f879fbe0e1a687e9ce8c0a8 Mon Sep 17 00:00:00 2001 From: Baobhan Sith <80159437+Heavrnl@users.noreply.github.com> Date: Fri, 25 Apr 2025 00:59:15 +0800 Subject: [PATCH] update --- .../src/components/LayoutConfigurator.vue | 4 ++-- .../src/components/LayoutNodeEditor.vue | 16 +++++++------- .../src/components/TerminalTabBar.vue | 2 +- packages/frontend/src/locales/en.json | 21 ++++++++++++++++++- packages/frontend/src/locales/zh.json | 18 +++++++++++++++- 5 files changed, 48 insertions(+), 13 deletions(-) diff --git a/packages/frontend/src/components/LayoutConfigurator.vue b/packages/frontend/src/components/LayoutConfigurator.vue index 4df234c..f5d98c6 100644 --- a/packages/frontend/src/components/LayoutConfigurator.vue +++ b/packages/frontend/src/components/LayoutConfigurator.vue @@ -191,7 +191,7 @@ const saveLayout = async () => { // Make async } catch (error) { console.error('[LayoutConfigurator] Error saving layout:', error); // Optionally notify the user about the error - alert(t('layoutConfigurator.saveError', '保存布局时出错,请稍后再试。')); + alert(t('layoutConfigurator.saveError', '保存布局时出错,请稍后再试。')); // Keep default text for now } }; @@ -277,7 +277,7 @@ function findAndRemoveNode(node: LayoutNode | null, parentNodeId: string | undef const handleNodeRemove = (payload: { parentNodeId: string | undefined; nodeIndex: number }) => { console.log('[LayoutConfigurator] Received node remove request:', payload); if (payload.parentNodeId === undefined && payload.nodeIndex === 0) { - if (confirm(t('layoutConfigurator.confirmClearLayout', '确定要清空整个布局吗?所有面板将返回可用列表。'))) { + if (confirm(t('layoutConfigurator.confirmClearLayout', '确定要清空整个布局吗?所有面板将返回可用列表。'))) { // Keep default text for now // Add all panes from the tree back to available list before clearing - REMOVED, no longer needed // const usedInTree = getMainLayoutUsedPaneNames(localLayoutTree.value); // usedInTree.forEach(paneName => addPaneToAvailableList(paneName)); diff --git a/packages/frontend/src/components/LayoutNodeEditor.vue b/packages/frontend/src/components/LayoutNodeEditor.vue index 49de16c..7d38541 100644 --- a/packages/frontend/src/components/LayoutNodeEditor.vue +++ b/packages/frontend/src/components/LayoutNodeEditor.vue @@ -132,19 +132,19 @@ const handleChildRemove = (payload: { parentNodeId: string | undefined; nodeInde
- {{ node.type === 'pane' ? (props.paneLabels[node.component!] || node.component) : `容器 (${node.direction === 'horizontal' ? '水平' : '垂直'})` }} + {{ node.type === 'pane' ? (props.paneLabels[node.component!] || node.component) : t('layoutNodeEditor.containerLabel', { direction: node.direction === 'horizontal' ? t('layoutNodeEditor.horizontal') : t('layoutNodeEditor.vertical') }) }}
- - - -
@@ -165,8 +165,8 @@ const handleChildRemove = (payload: { parentNodeId: string | undefined; nodeInde >