-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into deployment-target-macOS-12
- Loading branch information
Showing
8 changed files
with
99 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ | |
} | ||
}, | ||
"Home" : { | ||
"extractionState" : "manual", | ||
"localizations" : { | ||
"de" : { | ||
"stringUnit" : { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// SharedData.swift | ||
// Genius | ||
// | ||
// Created by F1248. | ||
// | ||
|
||
import Foundation | ||
|
||
class SharedData: ObservableObject { | ||
|
||
@Published var selectedTabIndex = 0 // swiftlint:disable:this explicit_type_interface | ||
} | ||
|
||
nonisolated(unsafe) let sharedData = SharedData() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// ContentViewTab.swift | ||
// Genius | ||
// | ||
// Created by F1248. | ||
// | ||
|
||
import SwiftUICore | ||
|
||
enum ContentViewTab: String, CaseIterable, Identifiable { | ||
|
||
case home = "Home" | ||
case systemInformation = "System Information" | ||
case maintenance = "Maintenance" | ||
case settings = "Settings" | ||
|
||
var id: Self { self } | ||
var tag: Int { Self.allCases.firstIndex(of: self)! } // swiftlint:disable:this force_unwrapping | ||
var localizedString: String { rawValue.localized } | ||
var localizedStringKey: LocalizedStringKey { LocalizedStringKey(rawValue) } | ||
|
||
var content: AnyView { | ||
switch self { | ||
case .home: AnyView(HomeView()) | ||
case .systemInformation: AnyView(SystemInformationView()) | ||
case .maintenance: AnyView(MaintenanceView()) | ||
case .settings: AnyView(SettingsView()) | ||
} | ||
} | ||
|
||
var variesByInterfaceMode: Bool { | ||
switch self { | ||
case .systemInformation: true | ||
default: false | ||
} | ||
} | ||
} |