diff --git a/packages/frontend/src/components/settings/AboutSection.vue b/packages/frontend/src/components/settings/AboutSection.vue
new file mode 100644
index 0000000..b74f45d
--- /dev/null
+++ b/packages/frontend/src/components/settings/AboutSection.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/frontend/src/components/settings/AppearanceSection.vue b/packages/frontend/src/components/settings/AppearanceSection.vue
new file mode 100644
index 0000000..7c0dcd8
--- /dev/null
+++ b/packages/frontend/src/components/settings/AppearanceSection.vue
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
{{ $t('settings.appearance.title') }}
+
{{ $t('settings.appearance.description') }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/frontend/src/components/settings/CaptchaSettingsForm.vue b/packages/frontend/src/components/settings/CaptchaSettingsForm.vue
new file mode 100644
index 0000000..b6ef27f
--- /dev/null
+++ b/packages/frontend/src/components/settings/CaptchaSettingsForm.vue
@@ -0,0 +1,95 @@
+
+
+
{{ $t('settings.captcha.title') }}
+
{{ $t('settings.captcha.description') }}
+
+ {{ $t('common.loading') }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/frontend/src/components/settings/ChangePasswordForm.vue b/packages/frontend/src/components/settings/ChangePasswordForm.vue
new file mode 100644
index 0000000..7da55e7
--- /dev/null
+++ b/packages/frontend/src/components/settings/ChangePasswordForm.vue
@@ -0,0 +1,51 @@
+
+
+
{{ $t('settings.changePassword.title') }}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/frontend/src/components/settings/DataManagementSection.vue b/packages/frontend/src/components/settings/DataManagementSection.vue
new file mode 100644
index 0000000..abf9b1d
--- /dev/null
+++ b/packages/frontend/src/components/settings/DataManagementSection.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
{{ t('settings.exportConnections.title', '导出连接数据') }}
+
+ {{ t('settings.exportConnections.decryptKeyInfo', '解压密码为您的 data/.env 文件中的 ENCRYPTION_KEY。请妥善保管此文件。') }}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/frontend/src/components/settings/IpBlacklistSettings.vue b/packages/frontend/src/components/settings/IpBlacklistSettings.vue
new file mode 100644
index 0000000..565c30e
--- /dev/null
+++ b/packages/frontend/src/components/settings/IpBlacklistSettings.vue
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
{{ $t('settings.ipBlacklist.description') }}
+
+
+
+
+
{{ $t('settings.ipBlacklist.currentBannedTitle') }}
+
+
{{ ipBlacklist.error }}
+
+
{{ $t('settings.ipBlacklist.loadingList') }}
+
+
{{ $t('settings.ipBlacklist.noBannedIps') }}
+
+
+
+
{{ blacklistDeleteError }}
+
+
+
+ {{ $t('settings.ipBlacklist.disabledMessage', 'IP 黑名单功能当前已禁用。') }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/frontend/src/components/settings/IpWhitelistSettings.vue b/packages/frontend/src/components/settings/IpWhitelistSettings.vue
new file mode 100644
index 0000000..abcde1a
--- /dev/null
+++ b/packages/frontend/src/components/settings/IpWhitelistSettings.vue
@@ -0,0 +1,40 @@
+
+
+
{{ $t('settings.ipWhitelist.title') }}
+
{{ $t('settings.ipWhitelist.description') }}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/frontend/src/components/settings/PasskeyManagement.vue b/packages/frontend/src/components/settings/PasskeyManagement.vue
new file mode 100644
index 0000000..053c778
--- /dev/null
+++ b/packages/frontend/src/components/settings/PasskeyManagement.vue
@@ -0,0 +1,90 @@
+
+
+
{{ $t('settings.passkey.title') }}
+
{{ $t('settings.passkey.description') }}
+
+
{{ passkeyMessage }}
+
+
+
+
{{ $t('settings.passkey.registeredKeysTitle') }}
+
+ {{ $t('common.loading') }}
+
+
+
{{ $t('settings.passkey.noKeysRegistered') }}
+
{{ passkeyDeleteError }}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/frontend/src/components/settings/SystemSettingsSection.vue b/packages/frontend/src/components/settings/SystemSettingsSection.vue
new file mode 100644
index 0000000..2dcff47
--- /dev/null
+++ b/packages/frontend/src/components/settings/SystemSettingsSection.vue
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
{{ $t('settings.language.title') }}
+
+
+
+
+
+
{{ $t('settings.timezone.title') }}
+
+
+
+
+
+
{{ t('settings.statusMonitor.title') }}
+
+
+
+
+
+
{{ t('settings.docker.title') }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/frontend/src/components/settings/TwoFactorAuthSettings.vue b/packages/frontend/src/components/settings/TwoFactorAuthSettings.vue
new file mode 100644
index 0000000..181fa97
--- /dev/null
+++ b/packages/frontend/src/components/settings/TwoFactorAuthSettings.vue
@@ -0,0 +1,79 @@
+
+
+
{{ $t('settings.twoFactor.title') }}
+
+
{{ $t('settings.twoFactor.status.enabled') }}
+
+
+
+
{{ $t('settings.twoFactor.status.disabled') }}
+
+
+
+
{{ twoFactorMessage }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/frontend/src/components/settings/WorkspaceSettingsSection.vue b/packages/frontend/src/components/settings/WorkspaceSettingsSection.vue
new file mode 100644
index 0000000..3bb5327
--- /dev/null
+++ b/packages/frontend/src/components/settings/WorkspaceSettingsSection.vue
@@ -0,0 +1,251 @@
+
+
+
+
+
+
+
{{ $t('settings.popupEditor.title') }}
+
+
+
+
+
+
{{ $t('settings.shareEditorTabs.title') }}
+
+
+
+
+
+
{{ $t('settings.autoCopyOnSelect.title') }}
+
+
+
+
+
+
{{ $t('settings.workspace.sidebarPersistentTitle') }}
+
+
+
+
+
+
{{ $t('settings.commandInputSync.title', '命令输入同步') }}
+
+
+
+
+
+
{{ $t('settings.workspace.showConnectionTagsTitle', '显示连接标签') }}
+
+
+
+
+
+
{{ $t('settings.workspace.showQuickCommandTagsTitle', '显示快捷指令标签') }}
+
+
+
+
+
+
{{ t('settings.terminalScrollback.title', '终端回滚行数') }}
+
+
+
+
+
+
{{ $t('settings.workspace.fileManagerDeleteConfirmTitle', '文件管理器删除确认') }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/frontend/src/views/SettingsView.vue b/packages/frontend/src/views/SettingsView.vue
index a4bba59..0b51348 100644
--- a/packages/frontend/src/views/SettingsView.vue
+++ b/packages/frontend/src/views/SettingsView.vue
@@ -22,214 +22,16 @@
-
-
{{ $t('settings.changePassword.title') }}
-
-
+
-
-
{{ $t('settings.passkey.title') }}
-
{{ $t('settings.passkey.description') }}
-
-
{{ passkeyMessage }}
-
-
-
-
{{ $t('settings.passkey.registeredKeysTitle') }}
-
- {{ $t('common.loading') }}
-
-
-
{{ $t('settings.passkey.noKeysRegistered') }}
-
{{ passkeyDeleteError }}
-
-
+
-
-
{{ $t('settings.twoFactor.title') }}
-
-
{{ $t('settings.twoFactor.status.enabled') }}
-
-
-
-
{{ $t('settings.twoFactor.status.disabled') }}
-
-
-
-
{{ twoFactorMessage }}
-
+
-
-
{{ $t('settings.captcha.title') }}
-
{{ $t('settings.captcha.description') }}
-
- {{ $t('common.loading') }}
-
-
-
+
@@ -237,497 +39,30 @@
-
{{ $t('settings.ipWhitelist.description') }}
-
+
-
-
-
-
-
-
-
-
{{ $t('settings.ipBlacklist.description') }}
-
-
-
-
-
{{ $t('settings.ipBlacklist.currentBannedTitle') }}
-
-
{{ ipBlacklist.error }}
-
-
{{ $t('settings.ipBlacklist.loadingList') }}
-
-
{{ $t('settings.ipBlacklist.noBannedIps') }}
-
-
-
-
{{ blacklistDeleteError }}
-
-
-
- {{ $t('settings.ipBlacklist.disabledMessage', 'IP 黑名单功能当前已禁用。') }}
-
-
-
+
-
+
-
-
-
-
-
-
{{ $t('settings.popupEditor.title') }}
-
-
-
-
-
-
{{ $t('settings.shareEditorTabs.title') }}
-
-
-
-
-
-
{{ $t('settings.autoCopyOnSelect.title') }}
-
-
-
-
-
-
{{ $t('settings.workspace.sidebarPersistentTitle') }}
-
-
-
-
-
-
{{ $t('settings.commandInputSync.title', '命令输入同步') }}
-
-
-
-
-
-
{{ $t('settings.workspace.showConnectionTagsTitle', '显示连接标签') }}
-
-
-
-
-
-
{{ $t('settings.workspace.showQuickCommandTagsTitle', '显示快捷指令标签') }}
-
-
-
-
-
-
{{ t('settings.terminalScrollback.title', '终端回滚行数') }}
-
-
-
-
-
-
{{ $t('settings.workspace.fileManagerDeleteConfirmTitle', '文件管理器删除确认') }}
-
-
-
-
+
-
-
-
-
-
-
{{ $t('settings.language.title') }}
-
-
-
-
-
-
{{ $t('settings.timezone.title') }}
-
-
-
-
-
-
{{ t('settings.statusMonitor.title') }}
-
-
-
-
-
-
{{ t('settings.docker.title') }}
-
-
-
-
+
-
-
-
-
-
-
{{ t('settings.exportConnections.title', '导出连接数据') }}
-
- {{ t('settings.exportConnections.decryptKeyInfo', '解压密码为您的 data/.env 文件中的 ENCRYPTION_KEY。请妥善保管此文件。') }}
-
-
-
-
-
+
-
-
-
-
-
-
{{ $t('settings.appearance.title') }}
-
{{ $t('settings.appearance.description') }}
-
-
-
-
+
@@ -742,205 +77,23 @@ import { useSettingsStore } from '../stores/settings.store';
import { useAppearanceStore } from '../stores/appearance.store'; // 导入外观 store
import { useI18n } from 'vue-i18n';
import { storeToRefs } from 'pinia';
-import { useChangePassword } from '../composables/settings/useChangePassword';
-import { usePasskeyManagement } from '../composables/settings/usePasskeyManagement';
-import { useTwoFactorAuth } from '../composables/settings/useTwoFactorAuth';
-import { useCaptchaSettings, type CaptchaProvider, type UpdateCaptchaSettingsDto } from '../composables/settings/useCaptchaSettings'; // Import Captcha composable
-import { useIpWhitelist } from '../composables/settings/useIpWhitelist'; // Import IP Whitelist composable
-import { useIpBlacklist } from '../composables/settings/useIpBlacklist'; // Import IP Blacklist composable
-import { useVersionCheck } from '../composables/settings/useVersionCheck'; // Import Version Check composable
-import { useWorkspaceSettings } from '../composables/settings/useWorkspaceSettings'; // Import Workspace Settings composable
-import { useAppearanceSettings } from '../composables/settings/useAppearanceSettings'; // Import Appearance Settings composable
-import { useSystemSettings } from '../composables/settings/useSystemSettings'; // Import System Settings composable
-import { useExportConnections } from '../composables/settings/useExportConnections'; // Import Export Connections composable
+import ChangePasswordForm from '../components/settings/ChangePasswordForm.vue'; // 导入新组件
+import PasskeyManagement from '../components/settings/PasskeyManagement.vue'; // 导入新组件
+import TwoFactorAuthSettings from '../components/settings/TwoFactorAuthSettings.vue'; // 导入新组件
+import CaptchaSettingsForm from '../components/settings/CaptchaSettingsForm.vue'; // 导入新组件
+import IpWhitelistSettings from '../components/settings/IpWhitelistSettings.vue'; // 导入新组件
+import IpBlacklistSettings from '../components/settings/IpBlacklistSettings.vue'; // 导入新组件
+import AboutSection from '../components/settings/AboutSection.vue'; // 导入新组件
+import WorkspaceSettingsSection from '../components/settings/WorkspaceSettingsSection.vue'; // 导入新组件
+import SystemSettingsSection from '../components/settings/SystemSettingsSection.vue'; // 导入新组件
+import DataManagementSection from '../components/settings/DataManagementSection.vue'; // 导入新组件
+import AppearanceSection from '../components/settings/AppearanceSection.vue'; // 导入新组件
const authStore = useAuthStore();
const settingsStore = useSettingsStore();
const appearanceStore = useAppearanceStore(); // 实例化外观 store
const { t } = useI18n();
-// --- Change Password (Refactored) ---
-const {
- currentPassword,
- newPassword,
- confirmPassword,
- changePasswordLoading,
- changePasswordMessage,
- changePasswordSuccess,
- handleChangePassword,
-} = useChangePassword();
-
-// --- Passkey Management (Refactored) ---
-const {
- passkeys, // from authStore, made reactive via usePasskeyManagement
- passkeysLoading: authStorePasskeysLoading, // from authStore, alias to avoid conflict if template uses 'passkeysLoading' for registration
- passkeyRegistrationLoading: passkeyLoading, // Aliased for template compatibility
- passkeyMessage,
- passkeySuccess,
- passkeyDeleteLoadingStates,
- passkeyDeleteError,
- editingPasskeyId,
- editingPasskeyName,
- passkeyEditLoadingStates,
- handleRegisterNewPasskey,
- startEditPasskeyName,
- cancelEditPasskeyName,
- savePasskeyName,
- handleDeletePasskey,
- formatDate, // formatDate for passkeys section
-} = usePasskeyManagement();
-
-// --- 2FA (Refactored) ---
-const {
- twoFactorEnabled,
- twoFactorLoading,
- twoFactorMessage,
- twoFactorSuccess,
- setupData,
- verificationCode,
- disablePassword,
- isSettingUp2FA,
- // checkTwoFactorStatus, // onMounted will call this
- handleSetup2FA,
- handleVerifyAndActivate2FA,
- handleDisable2FA,
- cancelSetup,
-} = useTwoFactorAuth();
-
-// --- CAPTCHA Settings (Refactored) ---
-const {
- captchaForm,
- captchaLoading,
- captchaMessage,
- captchaSuccess,
- handleUpdateCaptchaSettings,
-} = useCaptchaSettings();
-
-// --- IP Whitelist (Refactored) ---
-const {
- ipWhitelistInput,
- ipWhitelistLoading,
- ipWhitelistMessage,
- ipWhitelistSuccess,
- handleUpdateIpWhitelist,
-} = useIpWhitelist();
-
-// --- IP Blacklist (Refactored) ---
-const {
- ipBlacklistEnabled,
- handleUpdateIpBlacklistEnabled,
- blacklistSettingsForm,
- blacklistSettingsLoading,
- blacklistSettingsMessage,
- blacklistSettingsSuccess,
- handleUpdateBlacklistSettings,
- ipBlacklist,
- blacklistToDeleteIp,
- blacklistDeleteLoading,
- blacklistDeleteError,
- handleDeleteIp, // Exposed as it's used in the template
-} = useIpBlacklist();
-
-// --- Version Check (Refactored) ---
-const {
- appVersion, // Now from useVersionCheck
- latestVersion,
- isCheckingVersion,
- versionCheckError,
- isUpdateAvailable,
- checkLatestVersion, // Function to check version
-} = useVersionCheck();
-
-// --- Workspace Settings (Refactored) ---
-const {
- popupEditorEnabled,
- popupEditorLoading,
- popupEditorMessage,
- popupEditorSuccess,
- handleUpdatePopupEditorSetting,
- shareTabsEnabled,
- shareTabsLoading,
- shareTabsMessage,
- shareTabsSuccess,
- handleUpdateShareTabsSetting,
- autoCopyEnabled,
- autoCopyLoading,
- autoCopyMessage,
- autoCopySuccess,
- handleUpdateAutoCopySetting,
- workspaceSidebarPersistentEnabled,
- workspaceSidebarPersistentLoading,
- workspaceSidebarPersistentMessage,
- workspaceSidebarPersistentSuccess,
- handleUpdateWorkspaceSidebarSetting,
- commandInputSyncTargetLocal,
- commandInputSyncLoading,
- commandInputSyncMessage,
- commandInputSyncSuccess,
- handleUpdateCommandInputSyncTarget,
- showConnectionTagsLocal,
- showConnectionTagsLoading,
- showConnectionTagsMessage,
- showConnectionTagsSuccess,
- handleUpdateShowConnectionTags,
- showQuickCommandTagsLocal,
- showQuickCommandTagsLoading,
- showQuickCommandTagsMessage,
- showQuickCommandTagsSuccess,
- handleUpdateShowQuickCommandTags,
- terminalScrollbackLimitLocal,
- terminalScrollbackLimitLoading,
- terminalScrollbackLimitMessage,
- terminalScrollbackLimitSuccess,
- handleUpdateTerminalScrollbackLimit,
- fileManagerShowDeleteConfirmationLocal,
- fileManagerShowDeleteConfirmationLoading,
- fileManagerShowDeleteConfirmationMessage,
- fileManagerShowDeleteConfirmationSuccess,
- handleUpdateFileManagerDeleteConfirmation,
-} = useWorkspaceSettings();
-
-// --- Appearance Settings (Refactored) ---
-const {
- openStyleCustomizer,
-} = useAppearanceSettings();
-
-// --- System Settings (Refactored) ---
-const {
- selectedLanguage,
- languageLoading,
- languageMessage,
- languageSuccess,
- languageNames,
- availableLocales,
- handleUpdateLanguage,
- selectedTimezone,
- timezoneLoading,
- timezoneMessage,
- timezoneSuccess,
- commonTimezones,
- handleUpdateTimezone,
- statusMonitorIntervalLocal,
- statusMonitorLoading,
- statusMonitorMessage,
- statusMonitorSuccess,
- handleUpdateStatusMonitorInterval,
- dockerInterval,
- dockerExpandDefault,
- dockerSettingsLoading,
- dockerSettingsMessage,
- dockerSettingsSuccess,
- handleUpdateDockerSettings,
-} = useSystemSettings();
-
-// --- Export Connections (Refactored) ---
-const {
- exportConnectionsLoading,
- exportConnectionsMessage,
- exportConnectionsSuccess,
- handleExportConnections,
-} = useExportConnections();
-
// --- Reactive state from store ---
// 使用 storeToRefs 获取响应式 getter,包括 language
const {
@@ -956,7 +109,6 @@ const {
onMounted(async () => {
// await fetchIpBlacklist(); // REMOVED - Handled by useIpBlacklist.ts onMounted
await settingsStore.loadCaptchaSettings(); // <-- Load CAPTCHA settings
- await checkLatestVersion(); // <-- Check for latest version on mount
});