Private
Public Access
1
0

新增: SFTP直连+网站预览+OSS区域嗅探+热键+BGM播放

This commit is contained in:
2026-05-12 11:06:28 +08:00
parent 545d7a864d
commit 2a363fd729
62 changed files with 6687 additions and 660 deletions

16
main.go
View File

@@ -6,6 +6,7 @@ import (
"time"
"github.com/wailsapp/wails/v3/pkg/application"
"u-desk/internal/hotkey"
)
//go:embed all:frontend/dist
@@ -43,6 +44,21 @@ func main() {
Mac: application.MacOptions{
ApplicationShouldTerminateAfterLastWindowClosed: true,
},
Windows: application.WindowsOptions{
WndProcInterceptor: func(hwnd uintptr, msg uint32, wParam, lParam uintptr) (uintptr, bool) {
switch msg {
case hotkey.WM_APP_HOTKEY:
app.RegisterGlobalHotkey()
return 0, true
case hotkey.WM_HOTKEY:
if wParam == 1 {
app.HandleHotkey()
return 0, true
}
}
return 0, false
},
},
})
window := application.Get().Window.NewWithOptions(application.WebviewWindowOptions{