TheNightmanCodeth / mission

A TransmissionBT Remote client for macOS built with SwiftUI
BSD 3-Clause "New" or "Revised" License
59 stars 3 forks source link

Tabs for multiple servers #7

Open TheNightmanCodeth opened 2 years ago

TheNightmanCodeth commented 2 years ago

The user should be able to open multiple servers in different tabs. This would require a popup or secondary menu option to allow the user to choose between switching the current view and adding to a new tab. Once that's implemented it's as simple as updating the Store with the server selected from the tabview.

epsimatic commented 2 years ago

Mac OS have window auto-tiling feature where it creates a new tab in your app for something that's expected to be a new window. Ex. here:

Merge an app's windows into one tabbed window: In the app, choose Window > Merge All Windows. If an app has more than one type of window (such as Mail with the viewer window and the new message window), only the active type is merged. To make a tab a separate window again, select the tab, then choose Window > Move Tab to New Window, or just drag the tab out of the window. See Use tabs in windows.

Also here:

Specify when to open documents in tabs

  1. On your Mac, choose Apple menu  > System Preferences, then click General .
  2. Click the "Prefer tabs when opening documents" pop-up menu, then choose an option --- never, in full screen or always.

I believe you can opt in your app to always have your app windows tabbed, effectively making the OS to do the job for you

TheNightmanCodeth commented 2 years ago

@epsimatic yeah looks like it already works! I'd like to have the server name show in the tab name so I'll get to work on that for the complete implementation