Merge pull request #76 from kkk669/update-instructions

feat: add instructions for macOS 13 or later (#75)
This commit is contained in:
Kenta Kubo 2024-01-07 12:37:30 +09:00 committed by GitHub
commit 6641bf6a25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 200 additions and 44 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" : "Screen Shot 2021-02-13 at 11.25.16 AM.jpg",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "Screen Shot 2021-02-13 at 11.25.16 AM.jpg",
"filename" : "NetworkSettings.png",
"idiom" : "universal",
"scale" : "2x"
},

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,65 +27,110 @@ 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")
Image("SelectServer")
Image(.selectServer)
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
}
VStack(alignment: .leading) {
Text("2. Enable \"Use This Server\"")
Image("UseThisServer")
Image(.useThisServer)
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
}
#if targetEnvironment(macCatalyst)
VStack(alignment: .leading) {
Text("3. Open the System Preferences")
Image("SystemPreferencesIcon")
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
}
VStack(alignment: .leading) {
Text("4. Go to Network settings")
Image("SystemPreferences")
.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) {
Text(
"5. Select \"\(Bundle.main.displayName!)\" and click \(Image(systemName: "ellipsis.circle")) 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("NetworkSettings")
.resizable()
.scaledToFit()
.frame(maxHeight: 400)
}
VStack(alignment: .leading) {
Text("6. Click \"Make Service Active\"")
Image("MakeServiceActive")
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
}
VStack(alignment: .leading) {
Text("7. Click \"Apply\" button")
Image("NetworkSettingsApply")
.resizable()
.scaledToFit()
.frame(maxHeight: 400)
}
#else
VStack(alignment: .leading) {
Text("3. Open the Settings")
Image("Settings")
Image(.settings)
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
@ -88,11 +139,11 @@ extension HowToActivateView: View {
Text("4. Go to \"General\" > \"VPN & Network\" > \"DNS\"")
ScrollView(.horizontal) {
HStack {
Image("GeneralVPNNetwork")
Image(.generalVPNNetwork)
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
Image("DNS")
Image(.dns)
.resizable()
.scaledToFit()
.frame(maxHeight: 200)
@ -101,7 +152,7 @@ extension HowToActivateView: View {
}
VStack(alignment: .leading) {
Text("5. \"Automatic\" is selected by default, so select \"\(Bundle.main.displayName!)\"")
Image("DNSProvider")
Image(.dnsProvider)
.resizable()
.scaledToFit()
.frame(maxHeight: 200)