diff --git a/frontend/app.js b/frontend/app.js index 129e67f..1921b52 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -1581,7 +1581,12 @@ handleDragLeave(e) { if (type === 'sftp' && !this.user.has_ftp_config) { const goToSettings = confirm('您还未配置SFTP服务器。\n\n是否现在前往设置页面进行配置?配置完成后将自动切换到SFTP存储。'); if (goToSettings) { - this.switchView('settings'); + // 直接设置视图并加载配置,避免switchView的重复检查 + this.currentView = 'settings'; + // 如果是普通用户,手动加载SFTP配置 + if (this.user && !this.user.is_admin) { + this.loadFtpConfig(); + } } return; }