SFTP配置
请配置SFTP服务器
diff --git a/frontend/app.js b/frontend/app.js
index d182048..a41a548 100644
--- a/frontend/app.js
+++ b/frontend/app.js
@@ -176,7 +176,10 @@ createApp({
// 上传工具管理
uploadToolStatus: null, // 上传工具状态 { exists, fileInfo: { size, sizeMB, modifiedAt } }
checkingUploadTool: false, // 是否正在检测上传工具
- uploadingTool: false // 是否正在上传工具
+ uploadingTool: false, // 是否正在上传工具
+
+ // 强制显示SFTP配置(用于本地存储模式下临时显示SFTP配置)
+ forceSftpConfigVisible: false
};
},
@@ -406,7 +409,10 @@ handleDragLeave(e) {
console.error('[SFTP配置] 自动切换存储模式失败:', err);
}
}
-
+
+ // 重置强制显示标志
+ this.forceSftpConfigVisible = false;
+
// 刷新到文件页面
this.currentView = 'files';
this.loadFiles('/');
@@ -1583,6 +1589,8 @@ handleDragLeave(e) {
if (goToSettings) {
// 直接设置视图并加载配置,避免switchView的重复检查
this.currentView = 'settings';
+ // 强制显示SFTP配置区域
+ this.forceSftpConfigVisible = true;
// 如果是普通用户,手动加载SFTP配置
if (this.user && !this.user.is_admin) {
this.loadFtpConfig();
@@ -1633,6 +1641,11 @@ handleDragLeave(e) {
this.currentView = view;
+ // 离开settings页面时,重置强制显示SFTP配置的标志
+ if (this.currentView !== 'settings') {
+ this.forceSftpConfigVisible = false;
+ }
+
// 根据视图类型自动加载对应数据
switch (view) {
case 'files':