diff --git a/StikJIT/Views/HomeView.swift b/StikJIT/Views/HomeView.swift index 66db583..e29ab5d 100644 --- a/StikJIT/Views/HomeView.swift +++ b/StikJIT/Views/HomeView.swift @@ -245,7 +245,9 @@ struct HomeView: View { pairingFileExists = true } - startHeartbeatInBackground() + DispatchQueue.main.async { + startHeartbeatInBackground(requireVPNConnection: false) + } let progressTimer = Timer.scheduledTimer(withTimeInterval: 0.05, repeats: true) { t in DispatchQueue.main.async { @@ -1407,14 +1409,11 @@ struct HomeView: View { DispatchQueue.global(qos: .background).async { var scriptData = scriptData var scriptName = scriptName - if enableAdvancedOptions, - scriptData == nil, + if scriptData == nil, let bundleID, - let assigned = assignedScript(for: bundleID) { - scriptName = assigned.name - scriptData = assigned.data - } else { - // keep passed-in auto script if provided; otherwise nil + let preferred = preferredScript(for: bundleID) { + scriptName = preferred.name + scriptData = preferred.data } var callback: DebugAppCallback? = nil diff --git a/StikJIT/Views/ProfileView.swift b/StikJIT/Views/ProfileView.swift index 16a287b..699e08e 100644 --- a/StikJIT/Views/ProfileView.swift +++ b/StikJIT/Views/ProfileView.swift @@ -336,20 +336,10 @@ struct ProfileView: View { private func profileActionButton(icon: String, color: Color, action: @escaping () -> Void) -> some View { Button(action: action) { Image(systemName: icon) - .font(.system(size: 13, weight: .bold)) - .foregroundStyle(color.contrastText()) - .padding(.vertical, 8) - .padding(.horizontal, 12) - .background( - RoundedRectangle(cornerRadius: 12, style: .continuous) - .fill(color.opacity(0.9)) - ) - .overlay( - RoundedRectangle(cornerRadius: 12, style: .continuous) - .stroke(Color.white.opacity(0.2), lineWidth: 1) - ) + .font(.system(size: 16, weight: .semibold)) + .foregroundColor(color) } - .buttonStyle(.plain) + .buttonStyle(.borderless) } private func removeProfilePrompt(entry: Profile) { diff --git a/StikJIT/Views/SettingsView.swift b/StikJIT/Views/SettingsView.swift index c2f4321..0bd6917 100644 --- a/StikJIT/Views/SettingsView.swift +++ b/StikJIT/Views/SettingsView.swift @@ -222,7 +222,9 @@ struct SettingsView: View { } RunLoop.current.add(progressTimer, forMode: .common) - startHeartbeatInBackground() + DispatchQueue.main.async { + startHeartbeatInBackground(requireVPNConnection: false) + } } catch { print("Error copying file: \(error)")