新增: SFTP直连+网站预览+OSS区域嗅探+热键+BGM播放
This commit is contained in:
16
main.go
16
main.go
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user