update
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -132,19 +132,19 @@ const handleChildRemove = (payload: { parentNodeId: string | undefined; nodeInde
|
||||
<!-- 节点控制栏 -->
|
||||
<div class="node-controls">
|
||||
<span class="node-info">
|
||||
{{ 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') }) }}
|
||||
</span>
|
||||
<div class="node-actions">
|
||||
<button v-if="node.type === 'container'" @click="toggleDirection" title="切换方向" class="action-button">
|
||||
<button v-if="node.type === 'container'" @click="toggleDirection" :title="t('layoutNodeEditor.toggleDirection')" class="action-button">
|
||||
<i class="fas fa-sync-alt"></i>
|
||||
</button>
|
||||
<button v-if="node.type === 'container'" @click="addHorizontalContainer" title="添加水平容器" class="action-button">
|
||||
<button v-if="node.type === 'container'" @click="addHorizontalContainer" :title="t('layoutNodeEditor.addHorizontalContainer')" class="action-button">
|
||||
<i class="fas fa-columns"></i> H
|
||||
</button>
|
||||
<button v-if="node.type === 'container'" @click="addVerticalContainer" title="添加垂直容器" class="action-button">
|
||||
<button v-if="node.type === 'container'" @click="addVerticalContainer" :title="t('layoutNodeEditor.addVerticalContainer')" class="action-button">
|
||||
<i class="fas fa-bars"></i> V
|
||||
</button>
|
||||
<button @click="removeSelf" title="移除此节点" class="action-button remove-button">
|
||||
<button @click="removeSelf" :title="t('layoutNodeEditor.removeNode')" class="action-button remove-button">
|
||||
<i class="fas fa-trash-alt"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -165,8 +165,8 @@ const handleChildRemove = (payload: { parentNodeId: string | undefined; nodeInde
|
||||
>
|
||||
<template #item="{ element: childNode, index }">
|
||||
<div class="child-node-wrapper" :key="childNode.id">
|
||||
<i class="fas fa-grip-vertical drag-handle-node" title="拖拽调整顺序或移动"></i>
|
||||
|
||||
<i class="fas fa-grip-vertical drag-handle-node" :title="t('layoutNodeEditor.dragHandle')"></i>
|
||||
|
||||
<LayoutNodeEditor
|
||||
:node="childNode"
|
||||
:parent-node="node"
|
||||
@@ -180,7 +180,7 @@ const handleChildRemove = (payload: { parentNodeId: string | undefined; nodeInde
|
||||
<!-- 容器为空时的占位符 -->
|
||||
<template #footer>
|
||||
<div v-if="!childrenList || childrenList.length === 0" class="empty-container-placeholder">
|
||||
将面板或容器拖拽到此处
|
||||
{{ t('layoutNodeEditor.dropHere') }}
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
|
||||
@@ -182,7 +182,7 @@ const toggleButtonTitle = computed(() => {
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
<h3 class="text-lg font-semibold text-center mb-4">选择要连接的服务器</h3>
|
||||
<h3 class="text-lg font-semibold text-center mb-4">{{ t('terminalTabBar.selectServerTitle') }}</h3>
|
||||
<div class="flex-grow overflow-y-auto border border-border rounded">
|
||||
<WorkspaceConnectionListComponent
|
||||
@connect-request="handlePopupConnect"
|
||||
|
||||
Reference in New Issue
Block a user