@@ -560,7 +559,7 @@ const getTruncatedNotes = (notes: string | null | undefined): string => {
-
{{ t('connections.notes.label', '备注:') }}
+
{{ t('connections.form.notes', '备注:') }}
{{ getTruncatedNotes(conn.notes) }}
@@ -619,7 +618,6 @@ const getTruncatedNotes = (notes: string | null | undefined): string => {
class="px-3 py-1.5 bg-transparent text-foreground border border-border rounded-md shadow-sm hover:bg-border focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition duration-150 ease-in-out text-sm font-medium h-9 flex items-center justify-center"
:disabled="isBatchEditMode"
:class="{ 'opacity-50 cursor-not-allowed': isBatchEditMode }"
- :title="isBatchEditMode ? t('connections.batchEdit.disabledInBatchMode', '批量模式下禁用') : t('connections.actions.edit', '编辑')"
>
{{ t('connections.actions.edit') }}
@@ -628,7 +626,6 @@ const getTruncatedNotes = (notes: string | null | undefined): string => {
class="px-4 py-2 bg-button text-button-text rounded-md shadow-sm hover:bg-button-hover focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition duration-150 ease-in-out text-sm font-medium h-9 flex items-center justify-center"
:disabled="isBatchEditMode"
:class="{ 'opacity-50 cursor-not-allowed': isBatchEditMode }"
- :title="isBatchEditMode ? t('connections.batchEdit.disabledInBatchMode', '批量模式下禁用') : t('connections.actions.connect', '连接')"
>
{{ t('connections.actions.connect') }}
From e9a6b0ffc957a334ced25f57b862e867cb6d772c Mon Sep 17 00:00:00 2001
From: Baobhan Sith <80159437+Heavrnl@users.noreply.github.com>
Date: Fri, 16 May 2025 13:55:02 +0800
Subject: [PATCH 4/8] Update ConnectionsView.vue
---
packages/frontend/src/views/ConnectionsView.vue | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/frontend/src/views/ConnectionsView.vue b/packages/frontend/src/views/ConnectionsView.vue
index 43ae18a..4a713c1 100644
--- a/packages/frontend/src/views/ConnectionsView.vue
+++ b/packages/frontend/src/views/ConnectionsView.vue
@@ -391,7 +391,7 @@ const getSingleTestButtonInfo = (connId: number | undefined, connType: string |
}
if (state?.status === 'testing') {
- return { textKey: 'connections.test.testingShort', iconClass: 'fas fa-spinner fa-spin', disabled: true, loading: true, title: t('connections.test.testingShort', '测试中') };
+ return { textKey: 'connections.actions.testing', iconClass: 'fas fa-spinner fa-spin', disabled: true, loading: true, title: t('connections.actions.testing', '测试中') };
}
if (state?.status === 'success' || state?.status === 'error') {
// 测试完成后,按钮恢复为初始“测试”状态
@@ -540,7 +540,7 @@ const getTruncatedNotes = (notes: string | null | undefined): string => {
:key="conn.id"
@click="handleConnectionClick(conn.id)"
:class="[
- 'flex items-start p-3 bg-header/50 border border-border/50 rounded transition duration-150 ease-in-out', // Changed: items-start, removed justify-between
+ 'flex items-center p-3 bg-header/50 border border-border/50 rounded transition duration-150 ease-in-out', // Changed: items-center, removed justify-between
{ 'ring-2 ring-primary ring-offset-1 ring-offset-background': isBatchEditMode && isConnectionSelectedForBatch(conn.id) },
{ 'cursor-pointer hover:bg-border/70': isBatchEditMode },
{ 'hover:bg-border/30': !isBatchEditMode }
@@ -610,8 +610,8 @@ const getTruncatedNotes = (notes: string | null | undefined): string => {
:class="{ 'opacity-50 cursor-not-allowed': isBatchEditMode || getSingleTestButtonInfo(conn.id, conn.type).disabled }"
:title="getSingleTestButtonInfo(conn.id, conn.type).title"
>
-
-
{{ t(getSingleTestButtonInfo(conn.id, conn.type).textKey) }}
+
+
{{ t(getSingleTestButtonInfo(conn.id, conn.type).textKey) }}
+
+