@@ -5,24 +5,25 @@ struct MainToolbarModifier: ViewModifier {
55 @Binding var category : XcodeListCategory
66 @Binding var isInstalledOnly : Bool
77 @Binding var isShowingInfoPane : Bool
8-
8+ @SwiftUI . Environment ( \. openWindow) private var openWindow
9+
910 func body( content: Content ) -> some View {
1011 content
1112 . toolbar { toolbar }
1213 }
1314
1415 private var toolbar : some ToolbarContent {
1516 ToolbarItemGroup {
16-
1717 ProgressButton (
18- isInProgress: appState. isUpdating,
18+ isInProgress: appState. isUpdating,
1919 action: appState. update
2020 ) {
2121 Label ( " Refresh " , systemImage: " arrow.clockwise " )
2222 }
2323 . keyboardShortcut ( KeyEquivalent ( " r " ) )
2424 . help ( " RefreshDescription " )
2525 Spacer ( )
26+
2627 Button ( action: {
2728 switch category {
2829 case . all: category = . release
@@ -56,7 +57,7 @@ struct MainToolbarModifier: ViewModifier {
5657 }
5758 }
5859 . help ( " FilterAvailableDescription " )
59-
60+
6061 Button ( action: {
6162 isInstalledOnly. toggle ( )
6263 } ) {
@@ -65,11 +66,16 @@ struct MainToolbarModifier: ViewModifier {
6566 . foregroundColor ( . accentColor)
6667 } else {
6768 Label ( " Filter " , systemImage: " arrow.down.app " )
68-
6969 }
7070 }
7171 . help ( " FilterInstalledDescription " )
72-
72+
73+ Button ( action: {
74+ openWindow ( id: " platforms " )
75+ } ) {
76+ Label ( " Platforms " , systemImage: " square.3.layers.3d " )
77+ }
78+ . help ( " PlatformsDescription " )
7379 }
7480 }
7581}
@@ -80,7 +86,7 @@ extension View {
8086 isInstalledOnly: Binding < Bool > ,
8187 isShowingInfoPane: Binding < Bool >
8288 ) -> some View {
83- self . modifier (
89+ modifier (
8490 MainToolbarModifier (
8591 category: category,
8692 isInstalledOnly: isInstalledOnly,
0 commit comments