mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-06-06 09:41:18 -04:00
Add macOS Sequoia support
This commit is contained in:
parent
de3c7b5570
commit
c435d5ab50
5 changed files with 29 additions and 8 deletions
|
@ -11,8 +11,9 @@ enum AppIcon: String, CaseIterable, Identifiable {
|
|||
case monterey = "Monterey"
|
||||
case ventura = "Ventura"
|
||||
case sonoma = "Sonoma"
|
||||
case sequoia = "Sequoia"
|
||||
|
||||
static let `default`: AppIcon = .sonoma
|
||||
static let `default`: AppIcon = .sequoia
|
||||
|
||||
var id: String {
|
||||
rawValue
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
//
|
||||
|
||||
enum CatalogType: String, CaseIterable, Comparable, Decodable {
|
||||
case sequoia = "macOS Sequoia"
|
||||
case sonoma = "macOS Sonoma"
|
||||
case ventura = "macOS Ventura"
|
||||
case monterey = "macOS Monterey"
|
||||
|
@ -21,14 +22,16 @@ enum CatalogType: String, CaseIterable, Comparable, Decodable {
|
|||
|
||||
private var sortOrder: Int {
|
||||
switch self {
|
||||
case .sonoma:
|
||||
case .sequoia:
|
||||
0
|
||||
case .ventura:
|
||||
case .sonoma:
|
||||
1
|
||||
case .monterey:
|
||||
case .ventura:
|
||||
2
|
||||
case .bigSur:
|
||||
case .monterey:
|
||||
3
|
||||
case .bigSur:
|
||||
4
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,9 +39,21 @@ enum CatalogType: String, CaseIterable, Comparable, Decodable {
|
|||
lhs.sortOrder < rhs.sortOrder
|
||||
}
|
||||
|
||||
// swiftlint:disable:next cyclomatic_complexity
|
||||
// swiftlint:disable:next cyclomatic_complexity function_body_length
|
||||
func url(for seedType: CatalogSeedType) -> String {
|
||||
switch self {
|
||||
case .sequoia:
|
||||
switch seedType {
|
||||
case .standard:
|
||||
"https://swscan.apple.com/content/catalogs/others/index-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
|
||||
case .customer:
|
||||
// swiftlint:disable:next line_length
|
||||
"https://swscan.apple.com/content/catalogs/others/index-15customerseed-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
|
||||
case .developer:
|
||||
"https://swscan.apple.com/content/catalogs/others/index-15seed-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
|
||||
case .public:
|
||||
"https://swscan.apple.com/content/catalogs/others/index-15beta-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
|
||||
}
|
||||
case .sonoma:
|
||||
switch seedType {
|
||||
case .standard:
|
||||
|
|
|
@ -51,7 +51,9 @@ struct Firmware: Decodable, Hashable, Identifiable {
|
|||
var name: String {
|
||||
var name: String = ""
|
||||
|
||||
if version.range(of: "^14", options: .regularExpression) != nil {
|
||||
if version.range(of: "^15", options: .regularExpression) != nil {
|
||||
name = "macOS Sequoia"
|
||||
} else if version.range(of: "^14", options: .regularExpression) != nil {
|
||||
name = "macOS Sonoma"
|
||||
} else if version.range(of: "^13", options: .regularExpression) != nil {
|
||||
name = "macOS Ventura"
|
||||
|
|
|
@ -655,7 +655,9 @@ struct Installer: Decodable, Hashable, Identifiable {
|
|||
var name: String {
|
||||
var name: String = ""
|
||||
|
||||
if version.range(of: "^14", options: .regularExpression) != nil {
|
||||
if version.range(of: "^15", options: .regularExpression) != nil {
|
||||
name = "macOS Sequoia"
|
||||
} else if version.range(of: "^14", options: .regularExpression) != nil {
|
||||
name = "macOS Sonoma"
|
||||
} else if version.range(of: "^13", options: .regularExpression) != nil {
|
||||
name = "macOS Ventura"
|
||||
|
|
|
@ -10,6 +10,7 @@ import SwiftUI
|
|||
|
||||
struct SettingsApplicationsView: View {
|
||||
private static let imageNames: [String] = [
|
||||
"Application - macOS Sequoia",
|
||||
"Application - macOS Sonoma",
|
||||
"Application - macOS Ventura",
|
||||
"Application - macOS Monterey",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue