diff --git a/packages/backend/src/database/schema.ts b/packages/backend/src/database/schema.ts index aeeda7b..3ca3925 100644 --- a/packages/backend/src/database/schema.ts +++ b/packages/backend/src/database/schema.ts @@ -190,7 +190,6 @@ CREATE TABLE IF NOT EXISTS quick_command_tag_associations ( ); `; -// --- End Quick Command Tags --- // 从 database.ts 移动过来的,保持一致性 diff --git a/packages/backend/src/notifications/notification.controller.ts b/packages/backend/src/notifications/notification.controller.ts index f6e9e50..11a3d19 100644 --- a/packages/backend/src/notifications/notification.controller.ts +++ b/packages/backend/src/notifications/notification.controller.ts @@ -216,4 +216,4 @@ export class NotificationController { res.status(500).json({ message: i18next.t('notificationController.errorTriggerTest'), error: error.message }); } }; -} // End of class NotificationController +} diff --git a/packages/frontend/src/composables/useWebSocketConnection.ts b/packages/frontend/src/composables/useWebSocketConnection.ts index 291ed28..3eb3706 100644 --- a/packages/frontend/src/composables/useWebSocketConnection.ts +++ b/packages/frontend/src/composables/useWebSocketConnection.ts @@ -39,7 +39,7 @@ export function createWebSocketConnectionManager( let reconnectTimeoutId: ReturnType | null = null; // 重连定时器 ID let lastUrl = ''; // 保存上次连接的 URL let intentionalDisconnect = false; // 标记是否为用户主动断开 - // --- End Instance State --- + /** * 安全地获取状态文本的辅助函数 diff --git a/packages/frontend/src/features/appearance/config/default-themes.ts b/packages/frontend/src/features/appearance/config/default-themes.ts index 9730c79..d3b676e 100644 --- a/packages/frontend/src/features/appearance/config/default-themes.ts +++ b/packages/frontend/src/features/appearance/config/default-themes.ts @@ -42,7 +42,6 @@ export const defaultUiTheme: Record = { '--button-bg-color': '#A06CD5', // 现代紫色 - 激活 (基础) '--button-text-color': '#ffffff', '--button-hover-bg-color': '#8E44AD', // 现代紫色 - 悬停 (稍暗) - // Added new variables '--icon-color': 'var(--text-color-secondary)', // 图标颜色 '--icon-hover-color': 'var(--link-hover-color)', // 图标悬停颜色 (自动更新) '--split-line-color': 'var(--border-color)', /* 分割线颜色 */ @@ -50,7 +49,6 @@ export const defaultUiTheme: Record = { '--input-focus-border-color': 'var(--link-active-color)', /* 输入框聚焦边框颜色 (自动更新) */ '--input-focus-glow': 'var(--link-active-color)', /* 输入框聚焦光晕值 (自动更新) */ '--overlay-bg-color': 'rgba(0, 0, 0, 0.6)', /* Added Overlay Background - 恢复 rgba 以支持透明度 */ - // End added variables '--font-family-sans-serif': 'sans-serif', '--base-padding': '1rem', '--base-margin': '0.5rem', diff --git a/packages/frontend/src/stores/fileEditor.store.ts b/packages/frontend/src/stores/fileEditor.store.ts index b7d912f..be03293 100644 --- a/packages/frontend/src/stores/fileEditor.store.ts +++ b/packages/frontend/src/stores/fileEditor.store.ts @@ -96,7 +96,7 @@ const decodeRawContent = (rawContentBase64: string, encoding: string): string => return `// Error decoding content: ${error.message}`; // 返回错误信息 } }; -// --- End Helper Functions --- + export const useFileEditorStore = defineStore('fileEditor', () => { const { t } = useI18n(); diff --git a/packages/frontend/src/stores/quickCommands.store.ts b/packages/frontend/src/stores/quickCommands.store.ts index e755888..9ed2e54 100644 --- a/packages/frontend/src/stores/quickCommands.store.ts +++ b/packages/frontend/src/stores/quickCommands.store.ts @@ -462,7 +462,6 @@ export const useQuickCommandsStore = defineStore('quickCommands', () => { } }); console.log(`[Store] Manually updated tagIds for ${updatedCount} commands in local state.`); - // --- End manual state update --- // Optionally, still fetch for full consistency, but UI should update based on manual change first. // clearQuickCommandsCache(); diff --git a/packages/frontend/src/views/ConnectionsView.vue b/packages/frontend/src/views/ConnectionsView.vue index 4a713c1..45bb5ca 100644 --- a/packages/frontend/src/views/ConnectionsView.vue +++ b/packages/frontend/src/views/ConnectionsView.vue @@ -72,7 +72,8 @@ const filteredAndSortedConnections = computed(() => { const usernameMatch = conn.username?.toLowerCase().includes(query); const hostMatch = conn.host?.toLowerCase().includes(query); const portMatch = conn.port?.toString().includes(query); - return nameMatch || usernameMatch || hostMatch || portMatch; + const notesMatch = conn.notes?.toLowerCase().includes(query); // 添加对备注的搜索 + return nameMatch || usernameMatch || hostMatch || portMatch || notesMatch; }); } @@ -267,7 +268,6 @@ const handleBatchEditSaved = async () => { const handleBatchEditFormClose = () => { showBatchEditForm.value = false; }; -// --- End Batch Edit Functions --- // --- Test Connection Logic --- interface ConnectionTestState { @@ -408,7 +408,37 @@ const getTruncatedNotes = (notes: string | null | undefined): string => { return notes.substring(0, maxLength) + '...'; }; -// --- End Test Connection Logic --- + + +// --- Connect All Filtered Connections --- +const isConnectingAll = ref(false); + +const handleConnectAllFilteredConnections = async () => { + if (isConnectingAll.value || isLoadingConnections.value) return; + + const sshConnectionsToConnect = filteredAndSortedConnections.value.filter(conn => conn.type === 'SSH'); + if (sshConnectionsToConnect.length === 0) { + console.warn(t('connections.messages.noSshConnectionsToConnectAll', '没有可连接的 SSH 筛选结果。')); + // Optionally, use a UI notification if available in your project + // e.g., uiNotificationsStore.addNotification({ message: t('connections.messages.noSshConnectionsToConnectAll'), type: 'info' }); + return; + } + + isConnectingAll.value = true; + try { + for (const conn of sshConnectionsToConnect) { + connectTo(conn); + // Consider a small delay if you want to visually see connections initiating one by one, + // or if connectTo triggers operations that might benefit from not being fired too rapidly. + // await new Promise(resolve => setTimeout(resolve, 200)); // Example delay + } + } catch (error) { + console.error("Error connecting to all filtered SSH connections:", error); + // uiNotificationsStore.addNotification({ message: t('connections.errors.connectAllSshFailed', '连接全部 SSH 操作失败。'), type: 'error' }); + } finally { + isConnectingAll.value = false; + } +}; @@ -499,6 +529,16 @@ const getTruncatedNotes = (notes: string | null | undefined): string => { + + diff --git a/packages/frontend/src/views/LoginView.vue b/packages/frontend/src/views/LoginView.vue index 919ba32..845e817 100644 --- a/packages/frontend/src/views/LoginView.vue +++ b/packages/frontend/src/views/LoginView.vue @@ -51,7 +51,6 @@ const resetCaptchaWidget = () => { // Reset reCAPTCHA v2 if it exists recaptchaWidget.value?.reset(); }; -// --- End CAPTCHA Event Handlers --- // 处理登录或 2FA 验证提交 @@ -67,8 +66,6 @@ const handleSubmit = async () => { return; // Stop submission if CAPTCHA is required but not completed } } - // --- End CAPTCHA Check --- - // --- End CAPTCHA Check --- try { if (loginRequires2FA.value) {