Files
Nexus/docs/changelog/2026-06-01-editor-dark-theme-sftp-write-fix.md
T

1.1 KiB
Raw Blame History

2026-06-01 编辑器深色底 + SFTP 写入修复

摘要

  1. 编辑器:固定 nexus-dark 深色主题,移除透明背景 CSS 与主题切换按钮,编辑区 #1e1e1e 底,避免白底看不清字。
  2. 保存sftp.put(BytesIO) 不符合 asyncssh API,改为 sftp.open(path, 'wb') + write()write-file 增加绝对路径校验。

动机

  • 用户反馈编辑器白底、文字不可见。
  • 保存仍失败:put() 只接受本地路径,内存内容需用 open 写入。

涉及文件

文件 变更
frontend/src/monaco/nexusThemes.ts 固定深色主题
frontend/src/components/FileEditorWorkbench.vue 样式、去掉浅色切换
server/infrastructure/ssh/asyncssh_pool.py sftp_write_bytes()
server/api/sync_v2.py upload / write-file 写入方式

迁移 / 重启

前端构建部署 + 后端 supervisorctl restart nexus

验证方式

  1. 打开编辑器 → 深灰底、浅色字、语法高亮可见。
  2. 修改文件 Ctrl+S / 保存 → 提示「文件已保存」,刷新后内容一致。