Skip to content

Commit bfa33ec

Browse files
committed
Fix visual bugs
1 parent 1a46dee commit bfa33ec

3 files changed

Lines changed: 13 additions & 22 deletions

File tree

StikJIT/Views/HomeView.swift

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ struct HomeView: View {
245245
pairingFileExists = true
246246
}
247247

248-
startHeartbeatInBackground()
248+
DispatchQueue.main.async {
249+
startHeartbeatInBackground(requireVPNConnection: false)
250+
}
249251

250252
let progressTimer = Timer.scheduledTimer(withTimeInterval: 0.05, repeats: true) { t in
251253
DispatchQueue.main.async {
@@ -1407,14 +1409,11 @@ struct HomeView: View {
14071409
DispatchQueue.global(qos: .background).async {
14081410
var scriptData = scriptData
14091411
var scriptName = scriptName
1410-
if enableAdvancedOptions,
1411-
scriptData == nil,
1412+
if scriptData == nil,
14121413
let bundleID,
1413-
let assigned = assignedScript(for: bundleID) {
1414-
scriptName = assigned.name
1415-
scriptData = assigned.data
1416-
} else {
1417-
// keep passed-in auto script if provided; otherwise nil
1414+
let preferred = preferredScript(for: bundleID) {
1415+
scriptName = preferred.name
1416+
scriptData = preferred.data
14181417
}
14191418

14201419
var callback: DebugAppCallback? = nil

StikJIT/Views/ProfileView.swift

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -336,20 +336,10 @@ struct ProfileView: View {
336336
private func profileActionButton(icon: String, color: Color, action: @escaping () -> Void) -> some View {
337337
Button(action: action) {
338338
Image(systemName: icon)
339-
.font(.system(size: 13, weight: .bold))
340-
.foregroundStyle(color.contrastText())
341-
.padding(.vertical, 8)
342-
.padding(.horizontal, 12)
343-
.background(
344-
RoundedRectangle(cornerRadius: 12, style: .continuous)
345-
.fill(color.opacity(0.9))
346-
)
347-
.overlay(
348-
RoundedRectangle(cornerRadius: 12, style: .continuous)
349-
.stroke(Color.white.opacity(0.2), lineWidth: 1)
350-
)
339+
.font(.system(size: 16, weight: .semibold))
340+
.foregroundColor(color)
351341
}
352-
.buttonStyle(.plain)
342+
.buttonStyle(.borderless)
353343
}
354344

355345
private func removeProfilePrompt(entry: Profile) {

StikJIT/Views/SettingsView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ struct SettingsView: View {
222222
}
223223

224224
RunLoop.current.add(progressTimer, forMode: .common)
225-
startHeartbeatInBackground()
225+
DispatchQueue.main.async {
226+
startHeartbeatInBackground(requireVPNConnection: false)
227+
}
226228

227229
} catch {
228230
print("Error copying file: \(error)")

0 commit comments

Comments
 (0)