feat: add instructions for macOS 13 or later

This commit is contained in:
Kenta Kubo 2024-01-07 12:18:18 +09:00
parent 01daf552da
commit de654c15c0
No known key found for this signature in database
GPG key ID: BC1BCC0402241359
11 changed files with 195 additions and 37 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 KiB

View file

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "AllDone.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "FiltersSettings.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 KiB

View file

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "MakeItEnabled.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View file

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "NetworkSettings.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 KiB

View file

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "SystemSettingsIcon.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View file

@ -7,8 +7,14 @@
import SwiftUI
private enum MacOSVersion {
case venturaOrLater
case monterey
}
struct HowToActivateView {
@Environment(\.dismiss) private var dismiss
@State private var macOSVersion: MacOSVersion = .venturaOrLater
let isSheet: Bool
}
@ -21,6 +27,14 @@ extension HowToActivateView: View {
Spacer()
}
ScrollView {
#if targetEnvironment(macCatalyst)
Picker("", selection: self.$macOSVersion) {
Text("macOS 13 or later").tag(MacOSVersion.venturaOrLater)
Text("macOS 12").tag(MacOSVersion.monterey)
}
.pickerStyle(.segmented)
.fixedSize()
#endif
VStack(alignment: .leading) {
VStack(alignment: .leading) {
Text("1. Select a DNS server you like, or add another one")
@ -37,44 +51,83 @@ extension HowToActivateView: View {
.frame(maxHeight: 200)
}
#if targetEnvironment(macCatalyst)
VStack(alignment: .leading) {
Text("3. Open the System Preferences")
Image(.montereySystemPreferencesIcon)
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
}
VStack(alignment: .leading) {
Text("4. Go to Network settings")
Image(.montereySystemPreferences)
.resizable()
.scaledToFit()
.frame(maxHeight: 400)
}
VStack(alignment: .leading) {
HStack {
Text("5. Select \"\(Bundle.main.displayName!)\" and click")
Image(systemName: "ellipsis.circle")
Text("button")
switch self.macOSVersion {
case .venturaOrLater:
VStack(alignment: .leading) {
Text("3. Open the System Settings")
Image(.systemSettingsIcon)
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
}
VStack(alignment: .leading) {
Text("4. Go to Network settings and click \"Filters\"")
Image(.networkSettings)
.resizable()
.scaledToFit()
.frame(maxHeight: 400)
}
VStack(alignment: .leading) {
Text("5. Click on the status of \"\(Bundle.main.displayName!)\"")
Image(.filtersSettings)
.resizable()
.scaledToFit()
.frame(maxHeight: 400)
}
VStack(alignment: .leading) {
Text("6. Click \"Enabled\"")
Image(.makeItEnabled)
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
}
VStack(alignment: .leading) {
Text("7. All done 🎉")
Image(.allDone)
.resizable()
.scaledToFit()
.frame(maxHeight: 400)
}
case .monterey:
VStack(alignment: .leading) {
Text("3. Open the System Preferences")
Image(.montereySystemPreferencesIcon)
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
}
VStack(alignment: .leading) {
Text("4. Go to Network settings")
Image(.montereySystemPreferences)
.resizable()
.scaledToFit()
.frame(maxHeight: 400)
}
VStack(alignment: .leading) {
HStack {
Text("5. Select \"\(Bundle.main.displayName!)\" and click")
Image(systemName: "ellipsis.circle")
Text("button")
}
Image(.montereyNetworkSettings)
.resizable()
.scaledToFit()
.frame(maxHeight: 400)
}
VStack(alignment: .leading) {
Text("6. Click \"Make Service Active\"")
Image(.montereyMakeServiceActive)
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
}
VStack(alignment: .leading) {
Text("7. Click \"Apply\" button")
Image(.montereyNetworkSettingsApply)
.resizable()
.scaledToFit()
.frame(maxHeight: 400)
}
Image(.montereyNetworkSettings)
.resizable()
.scaledToFit()
.frame(maxHeight: 400)
}
VStack(alignment: .leading) {
Text("6. Click \"Make Service Active\"")
Image(.montereyMakeServiceActive)
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
}
VStack(alignment: .leading) {
Text("7. Click \"Apply\" button")
Image(.montereyNetworkSettingsApply)
.resizable()
.scaledToFit()
.frame(maxHeight: 400)
}
#else
VStack(alignment: .leading) {