修复: SFTP存储切换问题 & 添加开发者工具保护

- 修复SFTP按钮被错误禁用的问题
- 用户选择本地存储后可以正常切换回SFTP
- 切换到SFTP时检查是否已配置,未配置则跳转到设置页面
- 添加右键菜单禁用
- 添加F12和开发者工具快捷键禁用
- 添加开发者工具打开检测
- 生产环境禁用console输出
This commit is contained in:
WanWanYun
2025-11-12 09:13:00 +08:00
parent 229a381a63
commit 175087c894
2 changed files with 79 additions and 1 deletions

View File

@@ -1483,6 +1483,13 @@ handleDragLeave(e) {
// 用户切换存储方式
async switchStorage(type) {
// 检查是否尝试切换到SFTP但未配置
if (type === 'sftp' && !this.user.has_ftp_config) {
this.showToast('warning', '提示', '请先在设置页面配置SFTP信息');
this.currentView = 'settings';
return;
}
if (!confirm(`确定要切换到${type === 'local' ? '本地存储' : 'SFTP存储'}吗?`)) {
return;
}