Skip to content

Commit

Permalink
feat: set mainnet to default, add help view
Browse files Browse the repository at this point in the history
  • Loading branch information
Fonta1n3 committed Dec 4, 2024
1 parent 8271301 commit a1bd48a
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 15 deletions.
12 changes: 8 additions & 4 deletions FullyNoded-Server.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
0AD7BE212CC2B1F100428D02 /* StartJm.command in Resources */ = {isa = PBXBuildFile; fileRef = 0AD7BE202CC2B1F100428D02 /* StartJm.command */; };
0AD7BE232CC2B47400428D02 /* LaunchJMStarter.command in Resources */ = {isa = PBXBuildFile; fileRef = 0AD7BE222CC2B47400428D02 /* LaunchJMStarter.command */; };
0AD7BE252CC2BCEF00428D02 /* StopJm.command in Resources */ = {isa = PBXBuildFile; fileRef = 0AD7BE242CC2BCEF00428D02 /* StopJm.command */; };
0AF736212D00D0900026FE0A /* Help.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF736202D00D0900026FE0A /* Help.swift */; };
593A891F2CE28334001504F0 /* IncreaseGapLimit.command in Resources */ = {isa = PBXBuildFile; fileRef = 593A891E2CE28334001504F0 /* IncreaseGapLimit.command */; };
593A89212CE28400001504F0 /* LaunchIncreaseGapLimit.command in Resources */ = {isa = PBXBuildFile; fileRef = 593A89202CE28400001504F0 /* LaunchIncreaseGapLimit.command */; };
593A89232CE511F8001504F0 /* FNIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 593A89222CE511F8001504F0 /* FNIcon.swift */; };
Expand Down Expand Up @@ -158,6 +159,7 @@
0AD7BE202CC2B1F100428D02 /* StartJm.command */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = StartJm.command; sourceTree = "<group>"; };
0AD7BE222CC2B47400428D02 /* LaunchJMStarter.command */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = LaunchJMStarter.command; sourceTree = "<group>"; };
0AD7BE242CC2BCEF00428D02 /* StopJm.command */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = StopJm.command; sourceTree = "<group>"; };
0AF736202D00D0900026FE0A /* Help.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Help.swift; sourceTree = "<group>"; };
1B8BA5D0924A1AE2EC951616 /* Pods-FullyNoded-Server.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FullyNoded-Server.debug.xcconfig"; path = "Target Support Files/Pods-FullyNoded-Server/Pods-FullyNoded-Server.debug.xcconfig"; sourceTree = "<group>"; };
593A891E2CE28334001504F0 /* IncreaseGapLimit.command */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = IncreaseGapLimit.command; sourceTree = "<group>"; };
593A89202CE28400001504F0 /* LaunchIncreaseGapLimit.command */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = LaunchIncreaseGapLimit.command; sourceTree = "<group>"; };
Expand Down Expand Up @@ -192,6 +194,7 @@
0AD7BE0E2CB980D500428D02 /* JoinMarketTaggedReleases.swift */,
0AD7BE162CBD8DA000428D02 /* JoinMarket.swift */,
593A89222CE511F8001504F0 /* FNIcon.swift */,
0AF736202D00D0900026FE0A /* Help.swift */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -506,6 +509,7 @@
files = (
0A573E1F2CADC5CF00899F84 /* Torrc.swift in Sources */,
0AD7BE0F2CB980D500428D02 /* JoinMarketTaggedReleases.swift in Sources */,
0AF736212D00D0900026FE0A /* Help.swift in Sources */,
0AD7BE192CBD919600428D02 /* JMRPC.swift in Sources */,
0AA6924B2C7F89E800366192 /* Script.swift in Sources */,
0AD7BE0D2CB97F4100428D02 /* LatestJoinMarketRelease.swift in Sources */,
Expand Down Expand Up @@ -676,7 +680,7 @@
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "FullyNoded-Server/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Fully Noded - Server";
INFOPLIST_KEY_CFBundleDisplayName = "FN Server - v0.0.1 Beta";
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
Expand All @@ -691,7 +695,7 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 1.0;
MARKETING_VERSION = 0.0.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.dentonllc.FullyNoded-Server";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
Expand Down Expand Up @@ -719,7 +723,7 @@
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "FullyNoded-Server/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Fully Noded - Server";
INFOPLIST_KEY_CFBundleDisplayName = "FN Server - v0.0.1 Beta";
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
Expand All @@ -734,7 +738,7 @@
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 1.0;
MARKETING_VERSION = 0.0.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.dentonllc.FullyNoded-Server";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
Expand Down
6 changes: 3 additions & 3 deletions FullyNoded-Server/Views/BitcoinCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ struct BitcoinCore: View {
}

private func initialLoad() {
selectedChain = UserDefaults.standard.string(forKey: "chain") ?? "signet"
selectedChain = UserDefaults.standard.string(forKey: "chain") ?? "main"
DataManager.retrieve(entityName: .bitcoinEnv) { env in
guard let env = env else { return }
let envValues = BitcoinEnvValues(dictionary: env)
Expand All @@ -535,7 +535,7 @@ struct BitcoinCore: View {
return
}
var onionHost = ""
let chain = UserDefaults.standard.string(forKey: "chain") ?? "signet"
let chain = UserDefaults.standard.string(forKey: "chain") ?? "main"

switch chain {
case "main":
Expand Down Expand Up @@ -569,7 +569,7 @@ struct BitcoinCore: View {
let url = "http://xxx:xxx@\(onionHost)"
qrImage = url.qrQode

let port = UserDefaults.standard.object(forKey: "port") as? String ?? "38332"
let port = UserDefaults.standard.object(forKey: "port") as? String ?? "8332"
self.fullyNodedUrl = "btcrpc://xxx:xxx@localhost:\(port)"
self.unifyUrl = "unify://xxx:xxx@localhost:\(port)"
}
Expand Down
20 changes: 17 additions & 3 deletions FullyNoded-Server/Views/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ struct ContentView: View {
private let coreLightning = Service(name: "Core Lightning", id: UUID())
private let joinMarket = Service(name: "Join Market", id: UUID())
private let tor = Service(name: "Tor", id: UUID())
private let help = Service(name: "Help", id: UUID())


var body: some View {
Expand Down Expand Up @@ -144,6 +145,8 @@ struct ContentView: View {
}
.frame(maxWidth: .infinity, alignment: .leading)
Spacer()
} else if service.name == "Help" {
Help()
}
} label: {
HStack() {
Expand Down Expand Up @@ -230,7 +233,18 @@ struct ContentView: View {
self.torRunning = TorClient.sharedInstance.state == .connected
}
}
Text(service.name)

if service.name == "Help" {
Image(systemName: "questionmark.circle")
.foregroundStyle(.secondary)
Text(service.name)
.foregroundStyle(.secondary)
} else {
Text(service.name)
}



}

}
Expand Down Expand Up @@ -389,7 +403,7 @@ struct ContentView: View {
"CHAIN": self.bitcoinEnvValues.chain
]

services = [bitcoinCore, coreLightning, joinMarket, tor]
services = [bitcoinCore, coreLightning, joinMarket, tor, help]
checkForBitcoin()
}

Expand All @@ -407,7 +421,7 @@ struct ContentView: View {
"CHAIN": self.bitcoinEnvValues.chain
]

services = [bitcoinCore, coreLightning, joinMarket, tor]
services = [bitcoinCore, coreLightning, joinMarket, tor, help]
checkForBitcoin()
}
}
Expand Down
41 changes: 41 additions & 0 deletions FullyNoded-Server/Views/Help.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//
// Help.swift
// FullyNoded-Server
//
// Created by Peter Denton on 12/4/24.
//

import SwiftUI

struct Help: View {
var body: some View {
VStack() {
Text("Need support?")
.frame(maxWidth: .infinity, alignment: .topLeading)
.padding([.leading, .top])
Link("Let us know about an issue, bug, feature request or general comments here.", destination: URL(string: "https://github.com/Fonta1n3/FullyNoded-Server/issues/new")!)
.padding([.leading, .bottom])
.frame(maxWidth: .infinity, alignment: .topLeading)
Text("Visit our website")
.frame(maxWidth: .infinity, alignment: .topLeading)
.padding([.leading])
Link("www.FullyNoded.app", destination: URL(string: "https://www.FullyNoded.app")!)
.padding([.leading, .bottom])
.frame(maxWidth: .infinity, alignment: .topLeading)
Text("Come chat")
.padding([.leading])
.frame(maxWidth: .infinity, alignment: .topLeading)
Link("Join the Telegram", destination: URL(string: "https://t.me/FullyNoded")!)
.padding([.leading])
.frame(maxWidth: .infinity, alignment: .topLeading)
Link("Join the Discord", destination: URL(string: "https://discord.gg/TVf2zb9x")!)
.frame(maxWidth: .infinity, alignment: .topLeading)
.padding([.leading])
Spacer()
}
}
}

#Preview {
Help()
}
4 changes: 2 additions & 2 deletions FullyNoded-Server/Views/JoinMarket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ struct JoinMarket: View {
}

private func configureJm() {
var chain = UserDefaults.standard.object(forKey: "chain") as? String ?? "signet"
let port = UserDefaults.standard.object(forKey: "port") as? String ?? "38332"
var chain = UserDefaults.standard.object(forKey: "chain") as? String ?? "main"
let port = UserDefaults.standard.object(forKey: "port") as? String ?? "8332"
switch chain {
case "main": chain = "mainnet"
case "regtest": chain = "testnet"
Expand Down
5 changes: 2 additions & 3 deletions FullyNoded-Server/Views/JoinMarketTaggedReleases.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ struct JoinMarketTaggedReleasesView: View {


private func configureJm() {
print("configureJm")
var chain = UserDefaults.standard.object(forKey: "chain") as? String ?? "signet"
let port = UserDefaults.standard.object(forKey: "port") as? String ?? "38332"
var chain = UserDefaults.standard.object(forKey: "chain") as? String ?? "main"
let port = UserDefaults.standard.object(forKey: "port") as? String ?? "8332"
switch chain {
case "main": chain = "mainnet"
case "regtest": chain = "testnet"
Expand Down

0 comments on commit a1bd48a

Please sign in to comment.