mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
update mac notification (#6329)
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
package desktop
|
package desktop
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/kermieisinthehouse/systray"
|
"github.com/kermieisinthehouse/systray"
|
||||||
@@ -20,7 +21,12 @@ func startSystray(exit chan int, faviconProvider FaviconProvider) {
|
|||||||
// system is started from a non-terminal method, e.g. double-clicking an icon.
|
// system is started from a non-terminal method, e.g. double-clicking an icon.
|
||||||
c := config.GetInstance()
|
c := config.GetInstance()
|
||||||
if c.GetShowOneTimeMovedNotification() {
|
if c.GetShowOneTimeMovedNotification() {
|
||||||
SendNotification("Stash has moved!", "Stash now runs in your tray, instead of a terminal window.")
|
// Use platform-appropriate terminology
|
||||||
|
location := "tray"
|
||||||
|
if runtime.GOOS == "darwin" {
|
||||||
|
location = "menu bar"
|
||||||
|
}
|
||||||
|
SendNotification("Stash has moved!", "Stash now runs in your "+location+", instead of a terminal window.")
|
||||||
c.SetBool(config.ShowOneTimeMovedNotification, false)
|
c.SetBool(config.ShowOneTimeMovedNotification, false)
|
||||||
if err := c.Write(); err != nil {
|
if err := c.Write(); err != nil {
|
||||||
logger.Errorf("Error while writing configuration file: %v", err)
|
logger.Errorf("Error while writing configuration file: %v", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user