Skip to content

Commit

Permalink
Merge branch 'main' into deployment-target-macOS-13
Browse files Browse the repository at this point in the history
  • Loading branch information
F1248 committed Aug 25, 2024
2 parents 1e93400 + 79adb27 commit e38735d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 55 deletions.
6 changes: 1 addition & 5 deletions Genius/GeniusApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ struct GeniusApp: App {

var body: some Scene {
WindowGroup {
if #available(macOS 15, *) {
ContentView()
} else {
ContentViewLegacy()
}
ContentView()
}
.windowToolbarStyle(.unified(showsTitle: false))
.commands {
Expand Down
44 changes: 30 additions & 14 deletions Genius/Views/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,48 @@

import SwiftUI

@available(macOS 15, *)
struct ContentView: View {

@AppStorage("interfaceMode")
var interfaceMode = Settings.InterfaceMode()

var body: some View {
TabView {
Tab("Home") {
HomeView()
if #available(macOS 15, *) {
TabView {
Tab("Home") {
HomeView()
}
Tab(interfaceMode >= .simple ? "System Information" : "Information") {
SystemInformationView()
}
Tab("Maintenance") {
MaintenanceView()
}
Tab("Settings") {
SettingsView()
}
}
Tab(interfaceMode >= .simple ? "System Information" : "Information") {
SystemInformationView()
}
Tab("Maintenance") {
MaintenanceView()
}
Tab("Settings") {
SettingsView()
.frame(minWidth: 686, minHeight: 256)
} else {
TabViewLegacy(entireWindow: true) {
TabLegacy("Home") {
HomeView()
}
TabLegacy(interfaceMode >= .simple ? "System Information" : "Information") {
SystemInformationView()
}
TabLegacy("Maintenance") {
MaintenanceView()
}
TabLegacy("Settings") {
SettingsView()
}
}
.frame(minWidth: 686, minHeight: 256)
}
.frame(minWidth: 686, minHeight: 256)
}
}

@available(macOS 15, *)
#Preview {
ContentView()
}
36 changes: 0 additions & 36 deletions Genius/Views/ContentViewLegacy.swift

This file was deleted.

0 comments on commit e38735d

Please sign in to comment.