Proxyman icon indicating copy to clipboard operation
Proxyman copied to clipboard

`Buy Proxyman Pro` Menu Bar Button Does Nothing if All Proxyman Windows Have Been Closed (but app still runs)

Open ptrkstr opened this issue 1 year ago • 2 comments

Description

Proxyman is a very well designed macOS app. I've been referencing it as I'm improving my macOS app (https://lyrcs.app). I wanted to mimic Proxyman's pattern of showing the PRO window when user presses Menu > Proxyman > Buy Proxyman Pro.... I discovered however nothing appears if no window is available which is because Proxyman presents a modal sheet over a window. I expect this to be a minor case because how often would a user use Proxyman without a window open. Regardless I thought it would be interesting to see how you solved it as perhaps I could solve it in a similar way.

Steps to Reproduce

  1. Open Proxyman
  2. Close window (CMD + W)
  3. Menu > Proxyman > Buy Proxyman Pro...

Current Behavior

Nothing occurs

Expected Behavior

I receive information about Proxyman Pro.

Environment

  • App version: Version 5.2.0 (50200)
  • macOS version: 14.4.1 (23E224)

Possible Solutions

  • Use focusedSceneValue to only enable the button if a window is active.
    • If disabled, could add "(Open a window)" to the button text so user knows how to enable the button
  • Show an alert advising user to open a window and try again
  • Open the proxyman window followed by opening the modal

ptrkstr avatar May 05 '24 05:05 ptrkstr

Thanks for using Proxyman as a reference source.

I'd follow: if there is a windows -> shows as modal, if not, just present as a normal Windows.

It's easier from user's point of view. Just click and it opens

NghiaTranUIT avatar May 05 '24 05:05 NghiaTranUIT

Good idea, makes the most sense and achievable with SwiftUI Window and @Environment(\.openWindow) API, thanks!

ptrkstr avatar May 05 '24 17:05 ptrkstr