diff --git a/Cable.icon/Assets/cablebyvoltplan-logomark copy.png b/Cable.icon/Assets/cablebyvoltplan-logomark copy.png deleted file mode 100644 index 85395f1..0000000 Binary files a/Cable.icon/Assets/cablebyvoltplan-logomark copy.png and /dev/null differ diff --git a/Cable.icon/icon.json b/Cable.icon/icon.json deleted file mode 100644 index 2478855..0000000 --- a/Cable.icon/icon.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "fill" : { - "linear-gradient" : [ - "srgb:0.66422,0.66424,0.66423,1.00000", - "extended-gray:1.00000,1.00000" - ] - }, - "groups" : [ - { - "layers" : [ - { - "image-name" : "cablebyvoltplan-logomark copy.png", - "name" : "cablebyvoltplan-logomark copy", - "position" : { - "scale" : 1, - "translation-in-points" : [ - -483.8671875, - 391.375 - ] - } - } - ], - "shadow" : { - "kind" : "neutral", - "opacity" : 0.5 - }, - "translucency" : { - "enabled" : true, - "value" : 0.5 - } - } - ], - "supported-platforms" : { - "circles" : [ - "watchOS" - ], - "squares" : "shared" - } -} \ No newline at end of file diff --git a/Cable.xcodeproj/project.pbxproj b/Cable.xcodeproj/project.pbxproj index c16e5cd..59e27dd 100644 --- a/Cable.xcodeproj/project.pbxproj +++ b/Cable.xcodeproj/project.pbxproj @@ -6,10 +6,6 @@ objectVersion = 77; objects = { -/* Begin PBXBuildFile section */ - 3E4BC9B82E7F5E9E0052324A /* Cable.icon in Resources */ = {isa = PBXBuildFile; fileRef = 3E4BC9B72E7F5E9E0052324A /* Cable.icon */; }; -/* End PBXBuildFile section */ - /* Begin PBXContainerItemProxy section */ 3E5C0BDE2E72C0FE00247EC8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -28,7 +24,6 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 3E4BC9B72E7F5E9E0052324A /* Cable.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = Cable.icon; sourceTree = ""; }; 3E5C0BCC2E72C0FD00247EC8 /* Cable.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Cable.app; sourceTree = BUILT_PRODUCTS_DIR; }; 3E5C0BDD2E72C0FE00247EC8 /* CableTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CableTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3E5C0BE72E72C0FE00247EC8 /* CableUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CableUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -97,7 +92,6 @@ 3E5C0BE02E72C0FE00247EC8 /* CableTests */, 3E5C0BEA2E72C0FE00247EC8 /* CableUITests */, 3E5C0BCD2E72C0FD00247EC8 /* Products */, - 3E4BC9B72E7F5E9E0052324A /* Cable.icon */, ); sourceTree = ""; }; @@ -231,7 +225,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 3E4BC9B82E7F5E9E0052324A /* Cable.icon in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Cable/AppIcon.icon/Assets/voltplan-lines.png b/Cable/AppIcon.icon/Assets/voltplan-lines.png new file mode 100644 index 0000000..adf5169 Binary files /dev/null and b/Cable/AppIcon.icon/Assets/voltplan-lines.png differ diff --git a/Cable/AppIcon.icon/Assets/voltplan-logo 2 2.png b/Cable/AppIcon.icon/Assets/voltplan-logo 2 2.png new file mode 100644 index 0000000..6dd9922 Binary files /dev/null and b/Cable/AppIcon.icon/Assets/voltplan-logo 2 2.png differ diff --git a/Cable/AppIcon.icon/icon.json b/Cable/AppIcon.icon/icon.json new file mode 100644 index 0000000..33fc7f6 --- /dev/null +++ b/Cable/AppIcon.icon/icon.json @@ -0,0 +1,73 @@ +{ + "fill" : { + "automatic-gradient" : "display-p3:0.50588,0.79216,0.56471,1.00000" + }, + "groups" : [ + { + "layers" : [ + { + "blend-mode" : "normal", + "glass" : false, + "hidden" : false, + "image-name" : "voltplan-lines.png", + "name" : "voltplan-lines", + "position" : { + "scale" : 1, + "translation-in-points" : [ + 0, + 80.8265625 + ] + } + }, + { + "fill" : { + "linear-gradient" : [ + "srgb:1.00000,1.00000,1.00000,1.00000", + "srgb:1.00000,1.00000,1.00000,0.63382" + ] + }, + "image-name" : "voltplan-logo 2 2.png", + "name" : "voltplan-logo 2 2", + "position" : { + "scale" : 1, + "translation-in-points" : [ + -3, + 77.55625 + ] + } + }, + { + "fill" : { + "linear-gradient" : [ + "srgb:1.00000,1.00000,1.00000,1.00000", + "srgb:1.00000,1.00000,1.00000,0.50000" + ] + }, + "image-name" : "box-2.png", + "name" : "Layer", + "position" : { + "scale" : 1, + "translation-in-points" : [ + 0, + -91.0703125 + ] + } + } + ], + "shadow" : { + "kind" : "neutral", + "opacity" : 0.5 + }, + "translucency" : { + "enabled" : true, + "value" : 0.5 + } + } + ], + "supported-platforms" : { + "circles" : [ + "watchOS" + ], + "squares" : "shared" + } +} \ No newline at end of file diff --git a/Cable/Assets.xcassets/AppIcon.appiconset/Cable-iOS-Default-1024x1024@1x.png b/Cable/Assets.xcassets/AppIcon.appiconset/Cable-iOS-Default-1024x1024@1x.png new file mode 100644 index 0000000..4cb6954 Binary files /dev/null and b/Cable/Assets.xcassets/AppIcon.appiconset/Cable-iOS-Default-1024x1024@1x.png differ diff --git a/Cable/Assets.xcassets/AppIcon.appiconset/Contents.json b/Cable/Assets.xcassets/AppIcon.appiconset/Contents.json index a02c04c..fc4e57c 100644 --- a/Cable/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Cable/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "Icon1024_opaque.png", + "filename" : "Cable-iOS-Default-1024x1024@1x.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/Cable/Assets.xcassets/AppIcon.appiconset/Icon1024_opaque.png b/Cable/Assets.xcassets/AppIcon.appiconset/Icon1024_opaque.png deleted file mode 100644 index 0d178e6..0000000 Binary files a/Cable/Assets.xcassets/AppIcon.appiconset/Icon1024_opaque.png and /dev/null differ diff --git a/Cable/Assets.xcassets/coffee-onboarding.imageset/Contents.json b/Cable/Assets.xcassets/coffee-onboarding.imageset/Contents.json new file mode 100644 index 0000000..26f42a3 --- /dev/null +++ b/Cable/Assets.xcassets/coffee-onboarding.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "coffee-ob.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cable/Assets.xcassets/coffee-onboarding.imageset/coffee-ob.png b/Cable/Assets.xcassets/coffee-onboarding.imageset/coffee-ob.png new file mode 100644 index 0000000..734eb54 Binary files /dev/null and b/Cable/Assets.xcassets/coffee-onboarding.imageset/coffee-ob.png differ diff --git a/Cable/Assets.xcassets/fridge-onboarding.imageset/Contents.json b/Cable/Assets.xcassets/fridge-onboarding.imageset/Contents.json new file mode 100644 index 0000000..4131a6e --- /dev/null +++ b/Cable/Assets.xcassets/fridge-onboarding.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "fridge-ob.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cable/Assets.xcassets/fridge-onboarding.imageset/fridge-ob.png b/Cable/Assets.xcassets/fridge-onboarding.imageset/fridge-ob.png new file mode 100644 index 0000000..80d0a77 Binary files /dev/null and b/Cable/Assets.xcassets/fridge-onboarding.imageset/fridge-ob.png differ diff --git a/Cable/Assets.xcassets/light-onboarding.imageset/Contents.json b/Cable/Assets.xcassets/light-onboarding.imageset/Contents.json new file mode 100644 index 0000000..cdb722d --- /dev/null +++ b/Cable/Assets.xcassets/light-onboarding.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "light-ob.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cable/Assets.xcassets/light-onboarding.imageset/light-ob.png b/Cable/Assets.xcassets/light-onboarding.imageset/light-ob.png new file mode 100644 index 0000000..25cead7 Binary files /dev/null and b/Cable/Assets.xcassets/light-onboarding.imageset/light-ob.png differ diff --git a/Cable/ContentView.swift b/Cable/ContentView.swift index abcbf74..5567cd6 100644 --- a/Cable/ContentView.swift +++ b/Cable/ContentView.swift @@ -390,11 +390,11 @@ struct LoadsView: View { var body: some View { VStack(spacing: 0) { - librarySection - if savedLoads.isEmpty { emptyStateView } else { + librarySection + List { ForEach(savedLoads) { load in NavigationLink(destination: CalculatorView(savedLoad: load)) { @@ -607,54 +607,10 @@ struct LoadsView: View { } private var emptyStateView: some View { - VStack(spacing: 0) { - Spacer() - - VStack(spacing: 20) { - ZStack { - Circle() - .fill(Color.blue.opacity(0.1)) - .frame(width: 72, height: 72) - - Image(systemName: "bolt.circle") - .font(.system(size: 34)) - .foregroundColor(.blue) - } - - VStack(spacing: 6) { - Text("No Components Yet") - .font(.title3) - .fontWeight(.semibold) - .foregroundColor(.primary) - - Text("Add a component to this system to see cable and fuse recommendations.") - .font(.body) - .foregroundColor(.secondary) - .multilineTextAlignment(.center) - .padding(.horizontal, 32) - } - - Button(action: { - createNewLoad() - }) { - HStack(spacing: 8) { - Image(systemName: "plus.circle.fill") - .font(.system(size: 16)) - Text("Create Component") - .fontWeight(.medium) - } - .foregroundColor(.white) - .frame(maxWidth: .infinity) - .frame(height: 48) - .background(Color.blue) - .cornerRadius(12) - } - .buttonStyle(.plain) - .padding(.horizontal, 32) - } - - Spacer() - } + ComponentsOnboardingView( + onCreate: { createNewLoad() }, + onBrowse: { showingComponentLibrary = true } + ) } private func deleteLoads(offsets: IndexSet) { diff --git a/Cable/SystemsOnboardingView.swift b/Cable/SystemsOnboardingView.swift index 408b90d..904bcbc 100644 --- a/Cable/SystemsOnboardingView.swift +++ b/Cable/SystemsOnboardingView.swift @@ -24,7 +24,7 @@ struct SystemsOnboardingView: View { VStack() { Spacer(minLength: 32) - SystemsOnboardingCarousel(images: loopingImages, step: carouselStep) + OnboardingCarouselView(images: loopingImages, step: carouselStep) .frame(minHeight: 80, maxHeight: 240) .padding(.horizontal, 0) @@ -126,35 +126,3 @@ struct SystemsOnboardingView: View { #Preview { SystemsOnboardingView { _ in } } - -private struct SystemsOnboardingCarousel: View { - let images: [String] - let step: Int - - var body: some View { - GeometryReader { geometry in - let width = geometry.size.width - let height = geometry.size.height - - ZStack { - - if images.isEmpty { - Image(systemName: "photo") - .font(.largeTitle) - .foregroundColor(.secondary) - } else { - HStack(spacing: 0) { - ForEach(Array(images.enumerated()), id: \.offset) { _, name in - Image(name) - .resizable() - .scaledToFit() - .frame(width: width, height: height) - } - } - .offset(x: -CGFloat(step) * width) - } - } - .clipped() - } - } -}