fix: run fixed, click action fixed
This commit is contained in:
@@ -19,6 +19,6 @@ struct ContentView: View {
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
#Preview("Content View") {
|
||||
ContentView()
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ struct Arc: Shape {
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
#Preview("Animated Face") {
|
||||
AnimatedFaceView(size: 200)
|
||||
.frame(width: 400, height: 400)
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ struct TimerStatusRow: View {
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
#Preview("Menu Bar Content") {
|
||||
let settingsManager = SettingsManager.shared
|
||||
let timerEngine = TimerEngine(settingsManager: settingsManager)
|
||||
MenuBarContentView(
|
||||
|
||||
@@ -48,7 +48,7 @@ struct BlinkSetupView: View {
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.glassEffect(in: .rect(cornerRadius: 12))
|
||||
.glassEffect(.regular, in: .rect(cornerRadius: 12))
|
||||
|
||||
InfoBox(text: "We blink much less when focusing on screens. Regular blink reminders help prevent dry eyes")
|
||||
|
||||
@@ -60,9 +60,16 @@ struct BlinkSetupView: View {
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
#Preview("Blink Setup - Enabled") {
|
||||
BlinkSetupView(
|
||||
enabled: .constant(true),
|
||||
intervalMinutes: .constant(5)
|
||||
)
|
||||
}
|
||||
|
||||
#Preview("Blink Setup - Disabled") {
|
||||
BlinkSetupView(
|
||||
enabled: .constant(false),
|
||||
intervalMinutes: .constant(5)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ struct CompletionView: View {
|
||||
.padding(.horizontal)
|
||||
}
|
||||
.padding()
|
||||
.glassEffect(in: .rect(cornerRadius: 12))
|
||||
.glassEffect(.regular, in: .rect(cornerRadius: 12))
|
||||
|
||||
Spacer()
|
||||
}
|
||||
@@ -68,6 +68,6 @@ struct CompletionView: View {
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
#Preview("Completion View") {
|
||||
CompletionView()
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ struct LookAwaySetupView: View {
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.glassEffect(in: .rect(cornerRadius: 12))
|
||||
.glassEffect(.regular, in: .rect(cornerRadius: 12))
|
||||
|
||||
InfoBox(text: "Every \(intervalMinutes) minutes, look in the distance for \(countdownSeconds) seconds to reduce eye strain")
|
||||
|
||||
@@ -92,10 +92,15 @@ struct InfoBox: View {
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
#Preview("Look Away Setup View") {
|
||||
LookAwaySetupView(
|
||||
enabled: .constant(true),
|
||||
intervalMinutes: .constant(20),
|
||||
countdownSeconds: .constant(20)
|
||||
)
|
||||
}
|
||||
|
||||
#Preview("Info Box") {
|
||||
InfoBox(text: "This is an informational message that provides helpful context to the user.")
|
||||
.padding()
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ struct OnboardingContainerView: View {
|
||||
)
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
.glassEffect(.regular.interactive())
|
||||
.glassEffect(.regular.interactive(), in: .rect(cornerRadius: 10))
|
||||
}
|
||||
|
||||
Button(action: {
|
||||
@@ -126,7 +126,7 @@ struct OnboardingContainerView: View {
|
||||
)
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
.glassEffect(.regular.tint(currentPage == 5 ? .green : .blue).interactive())
|
||||
.glassEffect(.regular.tint(currentPage == 5 ? .green : .blue).interactive(), in: .rect(cornerRadius: 10))
|
||||
}
|
||||
.padding(.horizontal, 40)
|
||||
.padding(.bottom, 20)
|
||||
@@ -230,6 +230,6 @@ struct OnboardingContainerView: View {
|
||||
})
|
||||
}
|
||||
}
|
||||
#Preview {
|
||||
OnboardingContainerView(s)
|
||||
#Preview("Onboarding Container") {
|
||||
OnboardingContainerView(settingsManager: SettingsManager.shared)
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ struct PostureSetupView: View {
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.glassEffect(in: .rect(cornerRadius: 12))
|
||||
.glassEffect(.regular, in: .rect(cornerRadius: 12))
|
||||
|
||||
InfoBox(text: "Regular posture checks help prevent back and neck pain from prolonged sitting")
|
||||
|
||||
@@ -60,9 +60,16 @@ struct PostureSetupView: View {
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
#Preview("Posture Setup - Enabled") {
|
||||
PostureSetupView(
|
||||
enabled: .constant(true),
|
||||
intervalMinutes: .constant(30)
|
||||
)
|
||||
}
|
||||
|
||||
#Preview("Posture Setup - Disabled") {
|
||||
PostureSetupView(
|
||||
enabled: .constant(false),
|
||||
intervalMinutes: .constant(30)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ struct SettingsOnboardingView: View {
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.glassEffect(in: .rect(cornerRadius: 12))
|
||||
.glassEffect(.regular, in: .rect(cornerRadius: 12))
|
||||
|
||||
// Links Section
|
||||
VStack(spacing: 12) {
|
||||
@@ -133,8 +133,14 @@ struct SettingsOnboardingView: View {
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
#Preview("Settings Onboarding - Launch Disabled") {
|
||||
SettingsOnboardingView(
|
||||
launchAtLogin: .constant(false)
|
||||
)
|
||||
}
|
||||
|
||||
#Preview("Settings Onboarding - Launch Enabled") {
|
||||
SettingsOnboardingView(
|
||||
launchAtLogin: .constant(true)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ struct WelcomeView: View {
|
||||
FeatureRow(icon: "figure.stand", title: "Maintain Good Posture", description: "Gentle reminders to sit up straight")
|
||||
}
|
||||
.padding()
|
||||
.glassEffect(in: .rect(cornerRadius: 16))
|
||||
.glassEffect(.regular, in: .rect(cornerRadius: 12))
|
||||
|
||||
Spacer()
|
||||
}
|
||||
@@ -62,6 +62,15 @@ struct FeatureRow: View {
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
#Preview("Welcome View") {
|
||||
WelcomeView()
|
||||
}
|
||||
|
||||
#Preview("Feature Row") {
|
||||
FeatureRow(
|
||||
icon: "eye.circle",
|
||||
title: "Reduce Eye Strain",
|
||||
description: "Regular breaks help prevent digital eye strain"
|
||||
)
|
||||
.padding()
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ struct BlinkingFace: View {
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
#Preview("Blink Reminder") {
|
||||
BlinkReminderView(onDismiss: {})
|
||||
.frame(width: 800, height: 600)
|
||||
}
|
||||
|
||||
@@ -113,6 +113,6 @@ struct LookAwayReminderView: View {
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
#Preview("Look Away Reminder") {
|
||||
LookAwayReminderView(countdownSeconds: 20, onDismiss: {})
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ struct PostureReminderView: View {
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
#Preview("Posture Reminder") {
|
||||
PostureReminderView(onDismiss: {})
|
||||
.frame(width: 800, height: 600)
|
||||
}
|
||||
|
||||
13
run
13
run
@@ -77,7 +77,18 @@ elif [ "$ACTION" = "run" ]; then
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✅ Build succeeded!"
|
||||
run_with_output "open -a \"Gaze\""
|
||||
# Get the actual build output directory from xcodebuild
|
||||
BUILD_DIR="$(xcodebuild -project Gaze.xcodeproj -scheme Gaze -configuration Debug -showBuildSettings 2>/dev/null | grep -m 1 "BUILT_PRODUCTS_DIR" | sed 's/.*= //')"
|
||||
APP_PATH="${BUILD_DIR}/Gaze.app"
|
||||
|
||||
if [ -d "$APP_PATH" ]; then
|
||||
echo "🚀 Launching: $APP_PATH"
|
||||
open "$APP_PATH"
|
||||
else
|
||||
echo "⚠️ App not found at expected location, trying fallback..."
|
||||
# Fallback to derived data location
|
||||
open "$HOME/Library/Developer/Xcode/DerivedData/Gaze-*/Build/Products/Debug/Gaze.app"
|
||||
fi
|
||||
else
|
||||
echo "❌ Build failed!"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user