Add notifications on windows
This commit is contained in:
parent
7949ed63f3
commit
1933917634
|
@ -1,4 +1,4 @@
|
|||
//go:build windows || darwin
|
||||
//go:build darwin
|
||||
|
||||
package notify
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
//go:build windows
|
||||
|
||||
package notify
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gopkg.in/toast.v1"
|
||||
)
|
||||
|
||||
func Notify(title string, body string, actionName string, timeout time.Duration, onclose func()) error {
|
||||
notification := toast.Notification{
|
||||
AppID: "Goldwarden",
|
||||
Title: title,
|
||||
Message: body,
|
||||
Audio: toast.Silent,
|
||||
}
|
||||
|
||||
return notification.Push()
|
||||
}
|
||||
|
||||
func ListenForNotifications() error {
|
||||
return nil
|
||||
}
|
Loading…
Reference in New Issue