Просмотр исходного кода

Remove Animations placeholder; sort /Modules/ folder contents by name

Deniz Cengiz 1 год назад
Родитель
Сommit
d1edb9e59a

+ 2 - 6
Trio.xcodeproj/project.pbxproj

@@ -555,7 +555,6 @@
 		DD3A3CE92D29C97800AE478E /* Helper+ButtonStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3A3CE82D29C97800AE478E /* Helper+ButtonStyles.swift */; };
 		DD3F1F832D9DC78800DCE7B3 /* UnitSelectionStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3F1F822D9DC78300DCE7B3 /* UnitSelectionStepView.swift */; };
 		DD3F1F852D9DD84000DCE7B3 /* DeliveryLimitsStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3F1F842D9DD83B00DCE7B3 /* DeliveryLimitsStepView.swift */; };
-		DD3F1F872D9DDB1200DCE7B3 /* AnimationPlaceholder.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3F1F862D9DDB1200DCE7B3 /* AnimationPlaceholder.swift */; };
 		DD3F1F892D9E078D00DCE7B3 /* TherapySettingEditorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3F1F882D9E078300DCE7B3 /* TherapySettingEditorView.swift */; };
 		DD3F1F8B2D9E08B600DCE7B3 /* NightscoutLoginStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3F1F8A2D9E08B200DCE7B3 /* NightscoutLoginStepView.swift */; };
 		DD3F1F8D2D9E0E0600DCE7B3 /* NightscoutSetupStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3F1F8C2D9E0E0000DCE7B3 /* NightscoutSetupStepView.swift */; };
@@ -1348,7 +1347,6 @@
 		DD3A3CE82D29C97800AE478E /* Helper+ButtonStyles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Helper+ButtonStyles.swift"; sourceTree = "<group>"; };
 		DD3F1F822D9DC78300DCE7B3 /* UnitSelectionStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnitSelectionStepView.swift; sourceTree = "<group>"; };
 		DD3F1F842D9DD83B00DCE7B3 /* DeliveryLimitsStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeliveryLimitsStepView.swift; sourceTree = "<group>"; };
-		DD3F1F862D9DDB1200DCE7B3 /* AnimationPlaceholder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationPlaceholder.swift; sourceTree = "<group>"; };
 		DD3F1F882D9E078300DCE7B3 /* TherapySettingEditorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TherapySettingEditorView.swift; sourceTree = "<group>"; };
 		DD3F1F8A2D9E08B200DCE7B3 /* NightscoutLoginStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NightscoutLoginStepView.swift; sourceTree = "<group>"; };
 		DD3F1F8C2D9E0E0000DCE7B3 /* NightscoutSetupStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NightscoutSetupStepView.swift; sourceTree = "<group>"; };
@@ -1803,10 +1801,9 @@
 		3811DE0325C9D31700A708ED /* Modules */ = {
 			isa = PBXGroup;
 			children = (
-				DDF690FE2DA2C9EE008BF16C /* AppDiagnostics */,
-				BD47FD142D88AACC0043966B /* Onboarding */,
 				DDD163032C4C67B400CD525A /* Adjustments */,
 				DD1745382C55BF8B00211FAC /* AlgorithmAdvancedSettings */,
+				DDF690FE2DA2C9EE008BF16C /* AppDiagnostics */,
 				DD1745422C55C5C400211FAC /* AutosensSettings */,
 				A42F1FEDFFD0DDE00AAD54D3 /* BasalProfileEditor */,
 				3811DE0425C9D32E00A708ED /* Base */,
@@ -1830,6 +1827,7 @@
 				5031FE61F63C2A8A8B7674DD /* ManualTempBasal */,
 				19D466A129AA2B0A004D5F33 /* MealSettings */,
 				D533BF261CDC1C3F871E7BFD /* NightscoutConfig */,
+				BD47FD142D88AACC0043966B /* Onboarding */,
 				99C01B871ACAB3F32CE755C7 /* PumpConfig */,
 				DD9ECB6B2CA99FA400AA7C45 /* RemoteControlConfig */,
 				3811DE3825C9D4A100A708ED /* Settings */,
@@ -2760,7 +2758,6 @@
 			isa = PBXGroup;
 			children = (
 				DD3F1F882D9E078300DCE7B3 /* TherapySettingEditorView.swift */,
-				DD3F1F862D9DDB1200DCE7B3 /* AnimationPlaceholder.swift */,
 				DDC38E0F2D9B376900ADCB46 /* OnboardingView+Util.swift */,
 				BD47FD182D88AAF90043966B /* OnboardingRootView.swift */,
 				BD47FDD52D8B64AE0043966B /* OnboardingSteps */,
@@ -3998,7 +3995,6 @@
 				3870FF4725EC187A0088248F /* BloodGlucose.swift in Sources */,
 				DDBD53FC2DAA903100F940A6 /* OverviewStepView.swift in Sources */,
 				38A0364225ED069400FCBB52 /* TempBasal.swift in Sources */,
-				DD3F1F872D9DDB1200DCE7B3 /* AnimationPlaceholder.swift in Sources */,
 				3811DE1725C9D40400A708ED /* Screen.swift in Sources */,
 				383948DA25CD64D500E91849 /* Glucose.swift in Sources */,
 				CE94598029E9E3BD0047C9C6 /* WatchConfigDataFlow.swift in Sources */,

+ 0 - 232
Trio/Sources/Modules/Onboarding/View/AnimationPlaceholder.swift

@@ -1,232 +0,0 @@
-///// A simple animated placeholder for each step
-// struct AnimationPlaceholder: View {
-//    let step: OnboardingStep
-//    @State private var animationValue: Double = 0
-//
-//    init(for step: OnboardingStep) {
-//        self.step = step
-//    }
-//
-//    var body: some View {
-//        VStack {
-//            Group {
-//                switch step {
-//                case .welcome:
-//                    welcomeAnimation
-//                case .glucoseTarget:
-//                    glucoseTargetAnimation
-//                case .basalProfile:
-//                    basalProfileAnimation
-//                case .carbRatio:
-//                    carbRatioAnimation
-//                case .insulinSensitivity:
-//                    insulinSensitivityAnimation
-//                case .completed:
-//                    completedAnimation
-//                }
-//            }
-//            .frame(height: 180)
-//        }
-//        .onAppear {
-//            withAnimation(Animation.easeInOut(duration: 2).repeatForever(autoreverses: true)) {
-//                animationValue = 1.0
-//            }
-//        }
-//    }
-//
-//    // Custom animated views for each step
-//    var welcomeAnimation: some View {
-//        ZStack {
-//            ForEach(0 ..< 5) { index in
-//                Image(systemName: "heart.fill")
-//                    .font(.system(size: 40))
-//                    .foregroundColor(step.accentColor.opacity(0.8 - Double(index) * 0.15))
-//                    .offset(x: CGFloat.random(in: -100 ... 100), y: CGFloat.random(in: -60 ... 60))
-//                    .scaleEffect(1.0 + animationValue * 0.3)
-//                    .rotationEffect(.degrees(animationValue * Double.random(in: -30 ... 30)))
-//            }
-//
-//            Image(systemName: "syringe.fill")
-//                .font(.system(size: 80))
-//                .foregroundColor(step.accentColor)
-//                .scaleEffect(1.0 + animationValue * 0.2)
-//                .shadow(color: step.accentColor.opacity(0.5), radius: 10 * animationValue, x: 0, y: 0)
-//        }
-//    }
-//
-//    var glucoseTargetAnimation: some View {
-//        ZStack {
-//            // Target rings
-//            ForEach(0 ..< 3) { index in
-//                Circle()
-//                    .stroke(step.accentColor.opacity(Double(3 - index) * 0.3), lineWidth: 8)
-//                    .frame(width: 120 + CGFloat(index * 40))
-//                    .scaleEffect(1.0 + animationValue * 0.05)
-//            }
-//
-//            // Arrow
-//            Image(systemName: "arrow.down.to.line")
-//                .font(.system(size: 50))
-//                .foregroundColor(step.accentColor)
-//                .offset(y: -10 + animationValue * 20)
-//                .rotationEffect(.degrees(animationValue * 360))
-//        }
-//    }
-//
-//    var basalProfileAnimation: some View {
-//        ZStack {
-//            // Line graph representation
-//            Path { path in
-//                let width: CGFloat = 300
-//                let height: CGFloat = 100
-//
-//                path.move(to: CGPoint(x: 0, y: height * 0.5))
-//
-//                for i in 0 ..< 8 {
-//                    let x = width * CGFloat(i) / 7
-//                    let y = height * (0.5 + (sin(Double(i) * .pi / 3) * 0.4))
-//
-//                    if i == 0 {
-//                        path.move(to: CGPoint(x: x, y: y))
-//                    } else {
-//                        path.addLine(to: CGPoint(x: x, y: y))
-//                    }
-//                }
-//            }
-//            .trim(from: 0, to: animationValue)
-//            .stroke(step.accentColor, style: StrokeStyle(lineWidth: 5, lineCap: .round, lineJoin: .round))
-//            .frame(width: 300, height: 100)
-//
-//            // Clock symbols to represent time
-//            HStack(spacing: 50) {
-//                Image(systemName: "clock")
-//                    .font(.system(size: 20))
-//                    .foregroundColor(step.accentColor)
-//                    .opacity(animationValue)
-//
-//                Image(systemName: "clock.fill")
-//                    .font(.system(size: 20))
-//                    .foregroundColor(step.accentColor)
-//                    .opacity(animationValue)
-//
-//                Image(systemName: "clock")
-//                    .font(.system(size: 20))
-//                    .foregroundColor(step.accentColor)
-//                    .opacity(animationValue)
-//            }
-//            .offset(y: 70)
-//        }
-//    }
-//
-//    var carbRatioAnimation: some View {
-//        ZStack {
-//            // Plate
-//            Circle()
-//                .fill(Color.gray.opacity(0.1))
-//                .frame(width: 150)
-//
-//            // Food items
-//            ForEach(0 ..< 5) { index in
-//                Image(systemName: [
-//                    "carrot.fill",
-//                    "fork.knife",
-//                    "takeoutbag.and.cup.and.straw.fill",
-//                    "wallet.pass.fill",
-//                    "cup.and.saucer.fill"
-//                ][index % 5])
-//                    .font(.system(size: 25))
-//                    .foregroundColor(step.accentColor)
-//                    .offset(
-//                        x: cos(Double(index) * .pi * 2 / 5) * 50 * animationValue,
-//                        y: sin(Double(index) * .pi * 2 / 5) * 50 * animationValue
-//                    )
-//                    .rotationEffect(.degrees(animationValue * 360))
-//            }
-//
-//            // Insulin
-//            Image(systemName: "drop.fill")
-//                .font(.system(size: 40))
-//                .foregroundColor(.blue)
-//                .scaleEffect(0.8 + animationValue * 0.3)
-//                .shadow(color: .blue.opacity(0.5), radius: 5, x: 0, y: 0)
-//        }
-//    }
-//
-//    var insulinSensitivityAnimation: some View {
-//        ZStack {
-//            // Glucose meter
-//            RoundedRectangle(cornerRadius: 20)
-//                .fill(Color.gray.opacity(0.1))
-//                .frame(width: 120, height: 200)
-//
-//            // Display screen
-//            RoundedRectangle(cornerRadius: 10)
-//                .fill(Color.black.opacity(0.1))
-//                .frame(width: 100, height: 60)
-//                .offset(y: -60)
-//
-//            // Value on screen
-//            Text("120")
-//                .font(.system(size: 24, weight: .bold, design: .monospaced))
-//                .foregroundColor(step.accentColor)
-//                .offset(y: -60)
-//                .opacity(animationValue)
-//
-//            // Insulin drop
-//            Image(systemName: "drop.fill")
-//                .font(.system(size: 30))
-//                .foregroundColor(.blue)
-//                .offset(y: 20)
-//                .opacity(1)
-//
-//            // Arrow showing decrease
-//            Image(systemName: "arrow.down")
-//                .font(.system(size: 30))
-//                .foregroundColor(step.accentColor)
-//                .offset(y: 60)
-//                .opacity(animationValue)
-//                .scaleEffect(1.0 + animationValue * 0.5)
-//
-//            // Lower value
-//            Text("80")
-//                .font(.system(size: 24, weight: .bold, design: .monospaced))
-//                .foregroundColor(step.accentColor)
-//                .offset(y: 100)
-//                .opacity(animationValue)
-//        }
-//    }
-//
-//    var completedAnimation: some View {
-//        ZStack {
-//            // Success checkmark
-//            Circle()
-//                .fill(step.accentColor.opacity(0.2))
-//                .frame(width: 150)
-//                .scaleEffect(animationValue)
-//
-//            Circle()
-//                .stroke(step.accentColor, lineWidth: 5)
-//                .frame(width: 150)
-//                .scaleEffect(animationValue)
-//
-//            Image(systemName: "checkmark")
-//                .font(.system(size: 80, weight: .bold))
-//                .foregroundColor(step.accentColor)
-//                .offset(y: animationValue * 5)
-//                .scaleEffect(animationValue)
-//
-//            // Celebrate particles
-//            ForEach(0 ..< 8) { index in
-//                Image(systemName: "star.fill")
-//                    .font(.system(size: 20))
-//                    .foregroundColor(step.accentColor)
-//                    .offset(
-//                        x: cos(Double(index) * .pi / 4) * 100 * animationValue,
-//                        y: sin(Double(index) * .pi / 4) * 100 * animationValue
-//                    )
-//                    .opacity(animationValue)
-//                    .scaleEffect(animationValue)
-//            }
-//        }
-//    }
-// }

+ 1 - 15
Trio/Sources/Modules/Onboarding/View/OnboardingRootView.swift

@@ -112,21 +112,7 @@ extension Onboarding {
                                         }
                                         .padding([.horizontal, .top])
                                     }
-
-                                    // Animation container (for steps that include animations)
-                                    //                                AnimationPlaceholder(for: currentStep)
-                                    //                                    .padding()
-                                    //                                    .scaleEffect(animationScale)
-                                    //                                    .opacity(animationOpacity)
-                                    //                                    .onAppear {
-                                    //                                        withAnimation(.easeInOut(duration: 0.7)) {
-                                    //                                            animationOpacity = 1
-                                    //                                            animationScale = 1.0
-                                    //                                        }
-                                    //                                        // Start pulse animation
-                                    //                                        isAnimating = true
-                                    //                                    }
-
+                                    
                                     // Step-specific content
                                     Group {
                                         switch currentStep {