ejbills / DockDoor

Window peeking for macOS
MIT License
295 stars 8 forks source link

Feat: notify user that the menubar icon can be temporarily show by openning the app #39

Closed ShlomoCode closed 4 days ago

ShlomoCode commented 4 days ago

CleanShot 2024-06-30 at 20 13 14@2x

ejbills commented 4 days ago

Hey, thank you. I added in your message and just extended the alert function so it's cleaner. Will be in next version:)

ShlomoCode commented 4 days ago

I think people will not pay attention to the information when the title is "Restart required"

ejbills commented 4 days ago

Fixed

ShlomoCode commented 4 days ago

It now displays: CleanShot 2024-06-30 at 20 52 23@2x But clicking "Cancel" has no effect. Why don't we improve the code so that no restart is needed at all? I can try to make a PR

ShlomoCode commented 4 days ago

Something like that:

            Toggle(isOn: $showMenuBarIcon, label: {
                Text("Show Menu Bar Icon")
            })
            .onChange(of: showMenuBarIcon) { _, isOn in
                let delegate = NSApplication.shared.delegate as! AppDelegate
                delegate.updateMenuBarIconStatus()

                 if !isOn {
                    MessageUtil.showMessage(
                        showCancelButton: false,
                        title: "Menu Bar Icon Hidden",
                        message: "If you need to access the menu bar icon, launch the app to reveal it for 10 seconds.",
                        completion: { _ in }
                    )
                }
            }
ShlomoCode commented 4 days ago

https://github.com/ejbills/DockDoor/pull/40