mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
Move platforms list view to it's own window, outside of settings
This commit is contained in:
parent
b968149235
commit
805f754bc8
5 changed files with 35 additions and 33 deletions
|
|
@ -1083,6 +1083,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.xcodesorg.xcodesapp;
|
||||
PRODUCT_NAME = Xcodes;
|
||||
|
|
@ -1326,6 +1327,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.xcodesorg.xcodesapp;
|
||||
PRODUCT_NAME = Xcodes;
|
||||
|
|
@ -1350,6 +1352,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 13.0;
|
||||
MARKETING_VERSION = 1.10.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.xcodesorg.xcodesapp;
|
||||
PRODUCT_NAME = Xcodes;
|
||||
|
|
|
|||
|
|
@ -69,32 +69,6 @@ struct MainWindow: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// HSplitView {
|
||||
// XcodeListView(selectedXcodeID: $selectedXcodeID, searchText: searchText, category: category, isInstalledOnly: isInstalledOnly)
|
||||
// .frame(minWidth: 300)
|
||||
// .layoutPriority(1)
|
||||
// .alert(item: $appState.xcodeBeingConfirmedForUninstallation) { xcode in
|
||||
// Alert(title: Text(String(format: localizeString("Alert.Uninstall.Title"), xcode.description)),
|
||||
// message: Text("Alert.Uninstall.Message"),
|
||||
// primaryButton: .destructive(Text("Uninstall"), action: { self.appState.uninstall(xcode: xcode) }),
|
||||
// secondaryButton: .cancel(Text("Cancel")))
|
||||
// }
|
||||
// .searchable(text: $searchText)
|
||||
//
|
||||
// if isShowingInfoPane {
|
||||
// Group {
|
||||
// if let xcode = xcode {
|
||||
// InfoPane(xcode: xcode)
|
||||
// } else {
|
||||
// UnselectedView()
|
||||
// }
|
||||
// }
|
||||
// .padding()
|
||||
// .frame(minWidth: 300, maxWidth: .infinity)
|
||||
// }
|
||||
// }
|
||||
|
||||
.bottomStatusBar()
|
||||
.padding([.top], 0)
|
||||
.navigationSubtitle(subtitleText)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import SwiftUI
|
|||
|
||||
struct PreferencesView: View {
|
||||
private enum Tabs: Hashable {
|
||||
case general, updates, platforms, advanced, experiment
|
||||
case general, updates, advanced, experiment
|
||||
}
|
||||
@EnvironmentObject var appState: AppState
|
||||
@EnvironmentObject var updater: ObservableUpdater
|
||||
|
|
@ -26,12 +26,6 @@ struct PreferencesView: View {
|
|||
.tabItem {
|
||||
Label("Downloads", systemImage: "icloud.and.arrow.down")
|
||||
}
|
||||
PlatformsListView()
|
||||
.environmentObject(appState)
|
||||
.tabItem {
|
||||
Label("Platforms", systemImage: "ipad.and.iphone")
|
||||
}
|
||||
.tag(Tabs.platforms)
|
||||
AdvancedPreferencePane()
|
||||
.environmentObject(appState)
|
||||
.tabItem {
|
||||
|
|
|
|||
|
|
@ -43,6 +43,32 @@ struct XcodeListView: View {
|
|||
XcodeListViewRow(xcode: xcode, selected: selectedXcodeID == xcode.id, appState: appState)
|
||||
}
|
||||
.listStyle(.sidebar)
|
||||
.safeAreaInset(edge: .bottom, spacing: 10) {
|
||||
PlatformsPocket()
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct PlatformsPocket: View {
|
||||
@SwiftUI.Environment(\.openWindow) private var openWindow
|
||||
|
||||
var body: some View {
|
||||
Button(action: {
|
||||
openWindow(id: "platforms") }
|
||||
) {
|
||||
VStack(spacing: 5) {
|
||||
Image(systemName: "square.3.layers.3d")
|
||||
.font(.largeTitle)
|
||||
Text("Platforms")
|
||||
.font(.callout)
|
||||
}
|
||||
.frame(width: 100, height: 75)
|
||||
.background(.quaternary)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 5, style: .continuous))
|
||||
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,11 @@ struct XcodesApp: App {
|
|||
alert(for: presentedAlert)
|
||||
})
|
||||
}
|
||||
|
||||
Window("Platforms", id: "platforms") {
|
||||
PlatformsListView()
|
||||
.environmentObject(appState)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue