Skip to content

Commit 6e9bcfc

Browse files
committed
v1.0.0
1 parent 6a2ec87 commit 6e9bcfc

File tree

33 files changed

+1314
-2
lines changed

33 files changed

+1314
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@ fastlane/report.xml
6060
fastlane/Preview.html
6161
fastlane/screenshots/**/*.png
6262
fastlane/test_output
63+
64+
.DS_Store

DNS Easy Switcher.dmg

961 KB
Binary file not shown.

DNS Easy Switcher.xcodeproj/project.pbxproj

Lines changed: 376 additions & 0 deletions
Large diffs are not rendered by default.

DNS Easy Switcher.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1500"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "9165B6632D6B616D00DD9643"
18+
BuildableName = "DNS Easy Switcher.app"
19+
BlueprintName = "DNS Easy Switcher"
20+
ReferencedContainer = "container:DNS Easy Switcher.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES"
30+
shouldAutocreateTestPlan = "YES">
31+
</TestAction>
32+
<LaunchAction
33+
buildConfiguration = "Release"
34+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
35+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
36+
launchStyle = "0"
37+
useCustomWorkingDirectory = "NO"
38+
ignoresPersistentStateOnLaunch = "NO"
39+
debugDocumentVersioning = "YES"
40+
debugServiceExtension = "internal"
41+
allowLocationSimulation = "YES">
42+
<BuildableProductRunnable
43+
runnableDebuggingMode = "0">
44+
<BuildableReference
45+
BuildableIdentifier = "primary"
46+
BlueprintIdentifier = "9165B6632D6B616D00DD9643"
47+
BuildableName = "DNS Easy Switcher.app"
48+
BlueprintName = "DNS Easy Switcher"
49+
ReferencedContainer = "container:DNS Easy Switcher.xcodeproj">
50+
</BuildableReference>
51+
</BuildableProductRunnable>
52+
</LaunchAction>
53+
<ProfileAction
54+
buildConfiguration = "Release"
55+
shouldUseLaunchSchemeArgsEnv = "YES"
56+
savedToolIdentifier = ""
57+
useCustomWorkingDirectory = "NO"
58+
debugDocumentVersioning = "YES">
59+
<BuildableProductRunnable
60+
runnableDebuggingMode = "0">
61+
<BuildableReference
62+
BuildableIdentifier = "primary"
63+
BlueprintIdentifier = "9165B6632D6B616D00DD9643"
64+
BuildableName = "DNS Easy Switcher.app"
65+
BlueprintName = "DNS Easy Switcher"
66+
ReferencedContainer = "container:DNS Easy Switcher.xcodeproj">
67+
</BuildableReference>
68+
</BuildableProductRunnable>
69+
</ProfileAction>
70+
<AnalyzeAction
71+
buildConfiguration = "Debug">
72+
</AnalyzeAction>
73+
<ArchiveAction
74+
buildConfiguration = "Release"
75+
revealArchiveInOrganizer = "YES">
76+
</ArchiveAction>
77+
</Scheme>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
//
2+
// AddCustomDNSView.swift
3+
// DNS Easy Switcher
4+
//
5+
// Created by Gregory LINFORD on 23/02/2025.
6+
//
7+
8+
import SwiftUI
9+
import SwiftData
10+
11+
struct AddCustomDNSView: View {
12+
@State private var name: String = ""
13+
@State private var primaryDNS: String = ""
14+
@State private var secondaryDNS: String = ""
15+
var onComplete: (CustomDNSServer?) -> Void
16+
17+
var body: some View {
18+
VStack(alignment: .leading, spacing: 12) {
19+
TextField("Name (e.g. Work DNS)", text: $name)
20+
.textFieldStyle(.roundedBorder)
21+
22+
TextField("Primary DNS (e.g. 8.8.8.8)", text: $primaryDNS)
23+
.textFieldStyle(.roundedBorder)
24+
25+
TextField("Secondary DNS (optional)", text: $secondaryDNS)
26+
.textFieldStyle(.roundedBorder)
27+
28+
HStack {
29+
Button("Cancel") {
30+
onComplete(nil)
31+
}
32+
.keyboardShortcut(.escape)
33+
34+
Spacer()
35+
36+
Button("Add") {
37+
guard !name.isEmpty && !primaryDNS.isEmpty else { return }
38+
let server = CustomDNSServer(
39+
name: name,
40+
primaryDNS: primaryDNS,
41+
secondaryDNS: secondaryDNS
42+
)
43+
onComplete(server)
44+
}
45+
.keyboardShortcut(.return)
46+
.disabled(name.isEmpty || primaryDNS.isEmpty)
47+
}
48+
}
49+
.padding()
50+
.frame(width: 300)
51+
}
52+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}
27.1 KB
Loading
2.81 KB
Loading

0 commit comments

Comments
 (0)