修复: 粘贴图失效与SFTP串台回退等一批问题

粘贴图根修(Ctrl+V直读系统剪贴板,不再依赖不可靠的paste事件)/SFTP串台双刀(拨号期禁回退本机+盘符路径自动回根)/PDF导出目录设置与文案带落盘路径/性能批(连接保存下载防重/md渲染防抖+预热/hljs按需加载/审计锁外置/快捷方式解析超时/webview-watch可停)/前端62类型错清零(含keyPath蛇形字段炸弹)/目录图标字段错位修复
This commit is contained in:
lxy
2026-10-24 13:48:54 +08:00
parent 4675ae381d
commit 75a42c0b6a
48 changed files with 1072 additions and 220 deletions
+17 -2
View File
@@ -3,11 +3,13 @@ package main
import (
"embed"
"fmt"
"log/slog"
"net/http"
"os"
"github.com/wailsapp/wails/v3/pkg/application"
"github.com/wailsapp/wails/v3/pkg/events"
"u-desk/internal/common"
"u-desk/internal/hotkey"
"u-desk/internal/service"
)
@@ -23,6 +25,15 @@ var (
)
func main() {
// 崩溃取证基建先于一切:slog 落盘 + 主 goroutine panic 落盘
common.SetupFileLogging()
defer func() {
if r := recover(); r != nil {
common.AppendPanicLog("main", r)
os.Exit(2)
}
}()
// 启动时完成上次更新遗留的 exe 替换
service.ReplacePendingFile()
@@ -31,6 +42,9 @@ func main() {
wailsApp := application.New(application.Options{
Name: "U-Desk",
Description: "桌面文件管理器",
// wails 系统日志(webview 生命周期、AssetFileServerFS 的 INFO 刷屏等)降到 Warn 落盘,
// 业务日志仍走 slog.Default() 的 INFO 全量——两路共用同一文件 writer,只是过滤级别不同
Logger: slog.New(slog.NewTextHandler(common.FileLogOut, &slog.HandlerOptions{Level: slog.LevelWarn})),
SingleInstance: &application.SingleInstanceOptions{
UniqueID: "top.1216.udesk",
},
@@ -65,8 +79,9 @@ func main() {
return 0, true
}
case wmSizeMsg:
// webview 尺寸失同步兜底(app_window_fix.go)
go fixWebviewFill(hwnd)
// webview 尺寸失同步兜底(app_window_fix.go):
// 只置脏标记,单 worker goroutine 统一消费,WM_SIZE 风暴不再批量 spawn goroutine
fixWebviewFill(hwnd)
}
return 0, false
},