修复: 解决切换到SFTP设置页面无响应的问题

- 问题:当用户已在settings页面时,switchView方法会检测到重复而直接return
- 修复:直接设置currentView并手动调用loadFtpConfig()
- 确保无论用户在哪个页面,点击确认后都能正确跳转到设置页面

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
WanWanYun
2025-11-12 23:10:23 +08:00
parent fd52594b83
commit 74f25ce3ed

View File

@@ -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;
}