Files
syncwarden/cmd/setup/ui_windows.go
Axel Meyer 34a1a94502
Some checks failed
Release / build (push) Failing after 19s
Implement SyncWarden v0.1.0
Full Syncthing tray wrapper with:
- System tray with 5 icon states (idle/syncing/paused/error/disconnected)
- Syncthing REST API client with auto-discovered API key
- Long-polling event listener for real-time status
- Transfer rate monitoring, folder tracking, recent files, conflict counting
- Full context menu with folders, recent files, settings toggles
- Embedded admin panel binary (webview, requires CGO)
- OS notifications via beeep (per-event configurable)
- Syncthing process management with auto-restart
- Cross-platform installer with autostart
- CI pipeline for Linux (.deb + .tar.gz) and Windows (.zip)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 21:16:28 +01:00

29 lines
543 B
Go

//go:build windows
package main
import (
"syscall"
"unsafe"
)
var (
user32 = syscall.NewLazyDLL("user32.dll")
messageBoxW = user32.NewProc("MessageBoxW")
)
func showMessage(title, text string, isError bool) {
flags := uint32(0x00000040) // MB_ICONINFORMATION
if isError {
flags = 0x00000010 // MB_ICONERROR
}
titlePtr, _ := syscall.UTF16PtrFromString(title)
textPtr, _ := syscall.UTF16PtrFromString(text)
messageBoxW.Call(0,
uintptr(unsafe.Pointer(textPtr)),
uintptr(unsafe.Pointer(titlePtr)),
uintptr(flags),
)
}