Desktop integration (#2073)

* Open stash in system tray on Windows/MacOS
* Add desktop notifications
* MacOS Bundling
* Add binary icon

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
kermieisinthehouse
2022-02-02 16:20:34 -08:00
committed by GitHub
parent e48b2ba3e8
commit 0e514183a7
306 changed files with 29542 additions and 4792 deletions

28
pkg/api/favicon.go Normal file
View File

@@ -0,0 +1,28 @@
package api
import (
"embed"
"runtime"
)
const faviconDir = "ui/v2.5/build/"
type FaviconProvider struct {
uiBox embed.FS
}
func (p *FaviconProvider) GetFavicon() []byte {
if runtime.GOOS == "windows" {
faviconPath := faviconDir + "favicon.ico"
ret, _ := p.uiBox.ReadFile(faviconPath)
return ret
}
return p.GetFaviconPng()
}
func (p *FaviconProvider) GetFaviconPng() []byte {
faviconPath := faviconDir + "favicon.png"
ret, _ := p.uiBox.ReadFile(faviconPath)
return ret
}