diff --git a/Pod.xcodeproj/project.pbxproj b/Pod.xcodeproj/project.pbxproj index e2f06fc..995bd6d 100644 --- a/Pod.xcodeproj/project.pbxproj +++ b/Pod.xcodeproj/project.pbxproj @@ -1111,13 +1111,14 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Pod/Preview Content\""; DEVELOPMENT_TEAM = GPM4PVH4B9; + ENABLE_BITCODE = NO; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = Pod/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.5.4; + MARKETING_VERSION = 1.6; PRODUCT_BUNDLE_IDENTIFIER = uk.co.lukebettridge.pod; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1139,13 +1140,14 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Pod/Preview Content\""; DEVELOPMENT_TEAM = GPM4PVH4B9; + ENABLE_BITCODE = NO; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = Pod/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.5.4; + MARKETING_VERSION = 1.6; PRODUCT_BUNDLE_IDENTIFIER = uk.co.lukebettridge.pod; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/Pod/Assets.xcassets/AccentColor.colorset/Contents.json b/Pod/Assets.xcassets/AccentColor.colorset/Contents.json index 51b43c7..175913d 100644 --- a/Pod/Assets.xcassets/AccentColor.colorset/Contents.json +++ b/Pod/Assets.xcassets/AccentColor.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x9C", - "green" : "0xBD", - "red" : "0xD5" + "blue" : "0.584", + "green" : "0.680", + "red" : "0.776" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x87", - "green" : "0xAA", - "red" : "0xE6" + "blue" : "0.259", + "green" : "0.471", + "red" : "0.820" } }, "idiom" : "universal" diff --git a/Pod/Assets.xcassets/Color.colorset/Contents.json b/Pod/Assets.xcassets/Color.colorset/Contents.json deleted file mode 100644 index a7e7598..0000000 --- a/Pod/Assets.xcassets/Color.colorset/Contents.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "colors" : [ - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Pod/Assets.xcassets/PrimaryBackground.colorset/Contents.json b/Pod/Assets.xcassets/PrimaryBackground.colorset/Contents.json new file mode 100644 index 0000000..5c0800d --- /dev/null +++ b/Pod/Assets.xcassets/PrimaryBackground.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.980", + "green" : "0.973", + "red" : "0.973" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.078", + "green" : "0.059", + "red" : "0.047" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Pod/Assets.xcassets/SecondaryBackground.colorset/Contents.json b/Pod/Assets.xcassets/SecondaryBackground.colorset/Contents.json new file mode 100644 index 0000000..3875a6c --- /dev/null +++ b/Pod/Assets.xcassets/SecondaryBackground.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.129", + "green" : "0.098", + "red" : "0.078" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Pod/Views/Collection/Collection.swift b/Pod/Views/Collection/Collection.swift index 1af29f5..6c5b8a6 100644 --- a/Pod/Views/Collection/Collection.swift +++ b/Pod/Views/Collection/Collection.swift @@ -22,9 +22,16 @@ struct Collection: View { VStack { if vm.isLoading { ProgressView() + .frame(maxWidth: .infinity, maxHeight: .infinity) } else if collectionItems.count > 0 { ScrollView(.vertical) { - VStack(spacing: 10) { + VStack(spacing: 15) { + Text("You have \(collectionItems.reduce(0) { $0 + $1.quantity }) capsules in your collection.") + .font(.caption2) + .foregroundColor(.gray) + .padding(.top, -16) + .frame(maxWidth: .infinity, alignment: .leading) + Section(header: HStack { Text("Favorites").font(.title2).fontWeight(.semibold) Spacer() @@ -51,23 +58,19 @@ struct Collection: View { CollectionRow(collectionItem, pod: pod) } } - - Text("You have \(collectionItems.reduce(0) { $0 + $1.quantity }) capsules in your collection.") - .font(.caption2) - .foregroundColor(.gray) - .padding(.top, 4) } .padding() .padding(.bottom, 30) } - .background( - Color(colorScheme == .dark ? UIColor.systemBackground : UIColor.secondarySystemBackground) - .edgesIgnoringSafeArea(.all) - ) } else { CollectionEmpty() + .frame(maxWidth: .infinity, maxHeight: .infinity) } } + .background( + Color("PrimaryBackground") + .edgesIgnoringSafeArea(.all) + ) .navigationBarTitle("My Collection") } .onAppear { diff --git a/Pod/Views/Collection/CollectionRow.swift b/Pod/Views/Collection/CollectionRow.swift index f332e00..7c17333 100644 --- a/Pod/Views/Collection/CollectionRow.swift +++ b/Pod/Views/Collection/CollectionRow.swift @@ -34,7 +34,7 @@ struct CollectionRow: View { .resizable() .background(pod.color) .frame(width: 55, height: 55) - .clipShape(RoundedRectangle(cornerRadius: 10)) + .clipShape(RoundedRectangle(cornerRadius: 12.5)) VStack(alignment: .leading) { HStack(alignment: .center, spacing: 5) { @@ -67,17 +67,15 @@ struct CollectionRow: View { Spacer() Image(systemName: "chevron.forward") - .font(Font.headline.weight(.light)) - .foregroundColor(.gray) + .font(Font.subheadline.weight(.light)) + .foregroundColor(.accentColor) } } + .padding(.horizontal, 13.5) .padding(.vertical, 12) - .padding(.horizontal, 15) .background( - RoundedRectangle(cornerRadius: 10) - .fill( - colorScheme == .dark ? Color(UIColor.secondarySystemBackground) : Color.white - ) + RoundedRectangle(cornerRadius: 15) + .fill(Color("SecondaryBackground")) ) .opacity(collectionItem.quantity > 0 ? 1 : 0.5) .contextMenu { diff --git a/Pod/Views/Collection/Favourites/FavouritesEmpty.swift b/Pod/Views/Collection/Favourites/FavouritesEmpty.swift index 33d4f24..ec14666 100644 --- a/Pod/Views/Collection/Favourites/FavouritesEmpty.swift +++ b/Pod/Views/Collection/Favourites/FavouritesEmpty.swift @@ -14,7 +14,7 @@ struct FavouritesEmpty: View { VStack(spacing: 5) { Image(systemName: "star.fill") .font(Font.system(size: 50).weight(.light)) - .foregroundColor(Color(UIColor.systemGray5)) + .foregroundColor(Color(UIColor.systemGray4)) .padding(.bottom, 5) Text("You have no favorites") .font(.headline) @@ -30,10 +30,8 @@ struct FavouritesEmpty: View { .padding(.top, 18.5) .padding(.bottom, 21) .background( - RoundedRectangle(cornerRadius: 10) - .fill( - colorScheme == .dark ? Color(UIColor.secondarySystemBackground) : Color.white - ) + RoundedRectangle(cornerRadius: 15) + .fill(Color("SecondaryBackground")) ) } } diff --git a/Pod/Views/Collection/Favourites/FavouritesRow.swift b/Pod/Views/Collection/Favourites/FavouritesRow.swift index a849bf5..2dd7941 100644 --- a/Pod/Views/Collection/Favourites/FavouritesRow.swift +++ b/Pod/Views/Collection/Favourites/FavouritesRow.swift @@ -17,7 +17,7 @@ struct FavouritesRow: View { .resizable() .background(pod.color) .frame(width: 40, height: 40) - .clipShape(RoundedRectangle(cornerRadius: 6)) + .clipShape(RoundedRectangle(cornerRadius: 8)) HStack(spacing: 5) { Text((pod.name ?? "").uppercased()) .font(.custom("FSLucasPro-SemiBd", size: 16)) @@ -38,5 +38,6 @@ struct FavouritesRow: View { } } .padding(.vertical, 2.5) + .listRowBackground(Color("SecondaryBackground")) } } diff --git a/Pod/Views/Collection/Favourites/FavouritesView.swift b/Pod/Views/Collection/Favourites/FavouritesView.swift index 5c970cf..24b07e3 100644 --- a/Pod/Views/Collection/Favourites/FavouritesView.swift +++ b/Pod/Views/Collection/Favourites/FavouritesView.swift @@ -22,6 +22,7 @@ struct FavouritesView: View { } } } + .background(Color("PrimaryBackground").edgesIgnoringSafeArea(.all)) .navigationBarTitle("Edit Favorites", displayMode: .inline) .navigationBarItems( trailing: Button(action: exit) { Text("Done") } diff --git a/Pod/Views/ContentView.swift b/Pod/Views/ContentView.swift index 1f177dd..ef12690 100644 --- a/Pod/Views/ContentView.swift +++ b/Pod/Views/ContentView.swift @@ -22,19 +22,19 @@ struct ContentView: View { TabView { Collection() .tabItem { - Image(systemName: "person.crop.square.fill") + Image(systemName: "books.vertical.fill") Text("Collection") } Explore() .tabItem { - Image(systemName: "square.grid.2x2.fill") + Image(systemName: "mail.stack.fill") Text("Explore") } Spacer() Trends() .tabItem { - Image(systemName: "chart.bar.fill") - Text("Trends") + Image(systemName: "clock.arrow.circlepath") + Text("History") } Settings() .tabItem { diff --git a/Pod/Views/Explore/Browse/Browse.swift b/Pod/Views/Explore/Browse/Browse.swift index ecefcf6..e3070e5 100644 --- a/Pod/Views/Explore/Browse/Browse.swift +++ b/Pod/Views/Explore/Browse/Browse.swift @@ -49,6 +49,7 @@ struct Browse: View { VStack { if vm.isLoading || browseVM.isLoading { ProgressView() + .frame(maxWidth: .infinity, maxHeight: .infinity) } else { ScrollView(.vertical) { VStack { @@ -76,6 +77,7 @@ struct Browse: View { } } } + .background(Color("PrimaryBackground").edgesIgnoringSafeArea(.all)) .navigationBarTitle(title) .navigationBarItems( trailing: @@ -83,7 +85,7 @@ struct Browse: View { vm.openSheet(.filter, filter: $filter) }) { Image(systemName: "line.horizontal.3.decrease.circle\(filter.active ? ".fill" : "")") - .font(.title2) + .font(.headline) } ) .introspectNavigationController { UINavigationController in diff --git a/Pod/Views/Explore/Browse/Filter/FilterAvailable/FilterAvailableRow.swift b/Pod/Views/Explore/Browse/Filter/FilterAvailable/FilterAvailableRow.swift index 2befb5e..51f2d28 100644 --- a/Pod/Views/Explore/Browse/Filter/FilterAvailable/FilterAvailableRow.swift +++ b/Pod/Views/Explore/Browse/Filter/FilterAvailable/FilterAvailableRow.swift @@ -17,6 +17,6 @@ struct FilterAvailableRow: View { .font(.subheadline) .foregroundColor(selected ? .white : colorScheme == .dark ? .primary : .gray) .frame(width: 114, height: 40) - .background(selected ? Color.accentColor : Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) + .background(selected ? Color.accentColor : Color("SecondaryBackground")) } } diff --git a/Pod/Views/Explore/Browse/Filter/FilterCup/FilterCupRow.swift b/Pod/Views/Explore/Browse/Filter/FilterCup/FilterCupRow.swift index 5857764..1afcb56 100644 --- a/Pod/Views/Explore/Browse/Filter/FilterCup/FilterCupRow.swift +++ b/Pod/Views/Explore/Browse/Filter/FilterCup/FilterCupRow.swift @@ -31,6 +31,6 @@ struct FilterCupRow: View { .padding(.top, 7) .padding(.horizontal, 10) .frame(width: 65, height: 60) - .background(selected ? Color.accentColor : Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) + .background(selected ? Color.accentColor : Color("SecondaryBackground")) } } diff --git a/Pod/Views/Explore/Browse/Filter/FilterDecaffeinated/FilterDecaffeinatedRow.swift b/Pod/Views/Explore/Browse/Filter/FilterDecaffeinated/FilterDecaffeinatedRow.swift index 8191fab..6458bb2 100644 --- a/Pod/Views/Explore/Browse/Filter/FilterDecaffeinated/FilterDecaffeinatedRow.swift +++ b/Pod/Views/Explore/Browse/Filter/FilterDecaffeinated/FilterDecaffeinatedRow.swift @@ -17,6 +17,6 @@ struct FilterDecaffeinatedRow: View { .font(.subheadline) .foregroundColor(selected ? .white : colorScheme == .dark ? .primary : .gray) .frame(width: 114, height: 40) - .background(selected ? Color.accentColor : Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) + .background(selected ? Color.accentColor : Color("SecondaryBackground")) } } diff --git a/Pod/Views/Explore/Browse/Filter/FilterIntensity/FilterIntensityRow.swift b/Pod/Views/Explore/Browse/Filter/FilterIntensity/FilterIntensityRow.swift index aff9627..34467f2 100644 --- a/Pod/Views/Explore/Browse/Filter/FilterIntensity/FilterIntensityRow.swift +++ b/Pod/Views/Explore/Browse/Filter/FilterIntensity/FilterIntensityRow.swift @@ -20,6 +20,6 @@ struct FilterIntensityRow: View { .foregroundColor(selected ? .white : colorScheme == .dark ? .primary : .gray) .opacity(disabled && !selected ? colorScheme == .dark ? 0.2 : 0.4 : 1) .frame(width: 45, height: 45) - .background(selected ? Color.accentColor : Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) + .background(selected ? Color.accentColor : Color("SecondaryBackground")) } } diff --git a/Pod/Views/Explore/Browse/Filter/FilterRating/FilterRatingRow.swift b/Pod/Views/Explore/Browse/Filter/FilterRating/FilterRatingRow.swift index eaf2e81..d65ad8d 100644 --- a/Pod/Views/Explore/Browse/Filter/FilterRating/FilterRatingRow.swift +++ b/Pod/Views/Explore/Browse/Filter/FilterRating/FilterRatingRow.swift @@ -20,6 +20,6 @@ struct FilterRatingRow: View { .foregroundColor(selected ? .white : colorScheme == .dark ? .primary : .gray) .opacity(disabled && !selected ? colorScheme == .dark ? 0.2 : 0.4 : 1) .frame(width: 45, height: 45) - .background(selected ? Color.accentColor : Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) + .background(selected ? Color.accentColor : Color("SecondaryBackground")) } } diff --git a/Pod/Views/Explore/Browse/Filter/FilterView.swift b/Pod/Views/Explore/Browse/Filter/FilterView.swift index 75182a8..42ca898 100644 --- a/Pod/Views/Explore/Browse/Filter/FilterView.swift +++ b/Pod/Views/Explore/Browse/Filter/FilterView.swift @@ -123,7 +123,7 @@ struct FilterView: View { disabled: !isDirty ) } - .background(Color(colorScheme == .dark ? UIColor.systemBackground : UIColor.secondarySystemBackground).edgesIgnoringSafeArea(.all)) + .background(Color("PrimaryBackground").edgesIgnoringSafeArea(.all)) } .navigationBarTitle("Filter") } diff --git a/Pod/Views/Explore/Explore.swift b/Pod/Views/Explore/Explore.swift index 8d7840c..c4b7ccd 100644 --- a/Pod/Views/Explore/Explore.swift +++ b/Pod/Views/Explore/Explore.swift @@ -16,6 +16,7 @@ struct Explore: View { Group { if vm.isLoading { ProgressView() + .frame(maxWidth: .infinity, maxHeight: .infinity) } else { ScrollView(.vertical) { VStack(alignment: .leading, spacing: 10) { @@ -25,18 +26,18 @@ struct Explore: View { .padding() .padding(.bottom, 20) } - .background( - Color(colorScheme == .dark ? UIColor.systemBackground : UIColor.secondarySystemBackground) - .edgesIgnoringSafeArea(.all) - ) } } + .background( + Color("PrimaryBackground") + .edgesIgnoringSafeArea(.all) + ) .navigationBarTitle("Explore") .navigationBarItems( trailing: Button(action: { vm.openSheet(.scanner) }) { Image(systemName: "barcode.viewfinder") - .font(.title2) + .font(.headline) } ) } diff --git a/Pod/Views/Explore/ExploreLink.swift b/Pod/Views/Explore/ExploreLink.swift index 7916c82..f0d46a3 100644 --- a/Pod/Views/Explore/ExploreLink.swift +++ b/Pod/Views/Explore/ExploreLink.swift @@ -28,7 +28,7 @@ struct ExploreLink: View { HStack { Image(systemName: icon) .font(.system(size: 35)) - .foregroundColor(colorScheme == .dark ? .primary : .accentColor) + .foregroundColor(.accentColor) VStack(alignment: .leading, spacing: 2.5) { Text(title) @@ -45,11 +45,11 @@ struct ExploreLink: View { Spacer() Image(systemName: "chevron.forward") - .font(Font.headline.weight(.light)) - .foregroundColor(.gray) + .font(Font.subheadline.weight(.light)) + .foregroundColor(.accentColor) } .padding() - .background(Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) - .clipShape(RoundedRectangle(cornerRadius: 10)) + .background(Color("SecondaryBackground")) + .clipShape(RoundedRectangle(cornerRadius: 15)) } } diff --git a/Pod/Views/Explore/MostPopular/MostPopular.swift b/Pod/Views/Explore/MostPopular/MostPopular.swift index 33509db..64f341a 100644 --- a/Pod/Views/Explore/MostPopular/MostPopular.swift +++ b/Pod/Views/Explore/MostPopular/MostPopular.swift @@ -35,6 +35,7 @@ struct MostPopular: View { .padding(.bottom) .padding(.horizontal) } + .background(Color("PrimaryBackground").edgesIgnoringSafeArea(.all)) .navigationBarTitle("Most Popular") .onAppear { Analytics.log(event: .view, data: [ diff --git a/Pod/Views/Explore/MostPopular/MostPopularRow.swift b/Pod/Views/Explore/MostPopular/MostPopularRow.swift index b84b9a2..b0dc18f 100644 --- a/Pod/Views/Explore/MostPopular/MostPopularRow.swift +++ b/Pod/Views/Explore/MostPopular/MostPopularRow.swift @@ -21,7 +21,7 @@ struct MostPopularRow: View { Spacer() } - .foregroundColor(Color(UIColor.systemGray6)) + .foregroundColor(Color("SecondaryBackground")) HStack(spacing: 12.5) { pod.image .resizable() diff --git a/Pod/Views/Explore/TopFavourites/TopFavourites.swift b/Pod/Views/Explore/TopFavourites/TopFavourites.swift index dcc02f3..3f93042 100644 --- a/Pod/Views/Explore/TopFavourites/TopFavourites.swift +++ b/Pod/Views/Explore/TopFavourites/TopFavourites.swift @@ -34,6 +34,7 @@ struct TopFavourites: View { .padding(.bottom) .padding(.horizontal) } + .background(Color("PrimaryBackground").edgesIgnoringSafeArea(.all)) .navigationBarTitle("Top Favorites") .onAppear { Analytics.log(event: .view, data: [ diff --git a/Pod/Views/Explore/TopFavourites/TopFavouritesRow.swift b/Pod/Views/Explore/TopFavourites/TopFavouritesRow.swift index 10728a5..246e5bf 100644 --- a/Pod/Views/Explore/TopFavourites/TopFavouritesRow.swift +++ b/Pod/Views/Explore/TopFavourites/TopFavouritesRow.swift @@ -21,7 +21,7 @@ struct TopFavouritesRow: View { Spacer() } - .foregroundColor(Color(UIColor.systemGray6)) + .foregroundColor(Color("SecondaryBackground")) HStack(spacing: 12.5) { pod.image .resizable() diff --git a/Pod/Views/Global/Log/LogCTA.swift b/Pod/Views/Global/Log/LogCTA.swift index 3b866c2..20f65c6 100644 --- a/Pod/Views/Global/Log/LogCTA.swift +++ b/Pod/Views/Global/Log/LogCTA.swift @@ -27,14 +27,12 @@ struct LogCTA: View { Image("Espresso") .resizable() .scaledToFit() - .foregroundColor(Color.white.opacity(colorScheme == .dark ? 0.5 : 1)) + .foregroundColor(Color.white.opacity(colorScheme == .dark ? 0.8 : 1)) .frame(width: relativeWidth / 2.25, height: relativeWidth / 2.25) .frame(width: relativeWidth, height: relativeWidth) .background( Circle() - .fill( - colorScheme == .dark ? Color(UIColor.tertiarySystemBackground) : Color.accentColor - ) + .fill(Color.accentColor) ) .shadow(color: Color.black.opacity(colorScheme == .dark ? 0.3 : 0.1), radius: 6, x: 0, y: 0) } diff --git a/Pod/Views/Global/Log/LogCaffeine/LogCaffeine.swift b/Pod/Views/Global/Log/LogCaffeine/LogCaffeine.swift index e2e69fe..926271e 100644 --- a/Pod/Views/Global/Log/LogCaffeine/LogCaffeine.swift +++ b/Pod/Views/Global/Log/LogCaffeine/LogCaffeine.swift @@ -62,14 +62,14 @@ struct LogCaffeine: View { .frame(maxWidth: .infinity) .background( RoundedRectangle(cornerRadius: 7.5) - .fill(colorScheme == .dark ? Color(UIColor.tertiarySystemBackground) : .accentColor) + .fill(Color.accentColor) ) } .buttonStyle(PlainButtonStyle()) .disabled(authorizationStatus != .some(.notDetermined)) } .padding() - .background(Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) - .clipShape(RoundedRectangle(cornerRadius: 10)) + .background(Color("SecondaryBackground")) + .clipShape(RoundedRectangle(cornerRadius: 15)) } } diff --git a/Pod/Views/Global/Log/LogCup/LogCupRow.swift b/Pod/Views/Global/Log/LogCup/LogCupRow.swift index 6b32df8..0d09b82 100644 --- a/Pod/Views/Global/Log/LogCup/LogCupRow.swift +++ b/Pod/Views/Global/Log/LogCup/LogCupRow.swift @@ -31,7 +31,7 @@ struct LogCupRow: View { .padding(.top, 7) .padding(.horizontal, 15) .frame(width: 75, height: 75) - .background(selected ? Color.accentColor : Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) + .background(selected ? Color.accentColor : Color("SecondaryBackground")) .clipShape(Circle()) } } diff --git a/Pod/Views/Global/Log/LogPod/LogPodRow.swift b/Pod/Views/Global/Log/LogPod/LogPodRow.swift index fda4c3e..4e607f7 100644 --- a/Pod/Views/Global/Log/LogPod/LogPodRow.swift +++ b/Pod/Views/Global/Log/LogPod/LogPodRow.swift @@ -28,9 +28,9 @@ struct LogPodRow: View { .opacity(disabled && !selected ? 0.2 : 1) Spacer() } - .padding(4) + .padding(5) .frame(width: 170) - .background(selected ? Color.accentColor : Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) + .background(selected ? Color.accentColor : Color("SecondaryBackground")) .overlay(RoundedRectangle(cornerRadius: 20).stroke().foregroundColor(pod.decaffeinated ? .red : .clear)) .clipShape(RoundedRectangle(cornerRadius: 20)) } diff --git a/Pod/Views/Global/Log/LogView.swift b/Pod/Views/Global/Log/LogView.swift index f90e535..667b858 100644 --- a/Pod/Views/Global/Log/LogView.swift +++ b/Pod/Views/Global/Log/LogView.swift @@ -46,6 +46,7 @@ struct LogView: View { Group { if isLoading { ProgressView() + .frame(maxWidth: .infinity, maxHeight: .infinity) } else { GeometryReader { gp in ZStack { @@ -118,10 +119,10 @@ struct LogView: View { disabled: selectedCup == nil ) } - .background(Color(colorScheme == .dark ? UIColor.systemBackground : UIColor.secondarySystemBackground).edgesIgnoringSafeArea(.all)) } } } + .background(Color("PrimaryBackground").edgesIgnoringSafeArea(.all)) .navigationBarTitle("Log Coffee") .onChange(of: selectedPod, perform: { _ in selectedCup = nil diff --git a/Pod/Views/Global/Pod/Detail/PodQuantity.swift b/Pod/Views/Global/Pod/Detail/PodQuantity.swift index c611541..ff07d9c 100644 --- a/Pod/Views/Global/Pod/Detail/PodQuantity.swift +++ b/Pod/Views/Global/Pod/Detail/PodQuantity.swift @@ -16,7 +16,7 @@ struct PodQuantity: View { HStack(spacing: 0) { Image(systemName: "minus") .frame(width: 50, height: 50, alignment: .center) - .background(Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) + .background(Color("SecondaryBackground")) .opacity(collectionItem.quantity > 0 ? 1 : 0.5) .onTapGesture { if collectionItem.quantity > 0 { @@ -41,7 +41,7 @@ struct PodQuantity: View { Image(systemName: "plus") .frame(width: 50, height: 50, alignment: .center) - .background(Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) + .background(Color("SecondaryBackground")) .onTapGesture { collectionItem.quantity += 1 collectionItem.save() @@ -53,8 +53,8 @@ struct PodQuantity: View { UIImpactFeedbackGenerator(style: .heavy).impactOccurred() } } - .background(Color(colorScheme == .dark ? UIColor.tertiarySystemBackground : UIColor.secondarySystemBackground)) - .clipShape(RoundedRectangle(cornerRadius: 10)) + .background(Color("SecondaryBackground").opacity(0.6)) + .clipShape(RoundedRectangle(cornerRadius: 12.5)) } } } diff --git a/Pod/Views/Global/Pod/PodView.swift b/Pod/Views/Global/Pod/PodView.swift index 7b0f1f5..de77662 100644 --- a/Pod/Views/Global/Pod/PodView.swift +++ b/Pod/Views/Global/Pod/PodView.swift @@ -35,7 +35,7 @@ struct PodView: View { } .background( colorScheme == .dark - ? Color(UIColor.systemBackground) + ? Color("PrimaryBackground") : pod.color ) .edgesIgnoringSafeArea(.vertical) diff --git a/Pod/Views/Global/Pod/Shared/PodField.swift b/Pod/Views/Global/Pod/Shared/PodField.swift index 8f9758f..3d00a11 100644 --- a/Pod/Views/Global/Pod/Shared/PodField.swift +++ b/Pod/Views/Global/Pod/Shared/PodField.swift @@ -27,10 +27,10 @@ struct PodField: View { } content } - .padding(.horizontal, 15) - .padding(.vertical, 12.5) + .padding(.horizontal, 13.5) + .padding(.vertical, 12) .frame(minWidth: 0, maxWidth: .infinity, alignment: .leading) - .background(Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) - .clipShape(RoundedRectangle(cornerRadius: 10)) + .background(Color("SecondaryBackground")) + .clipShape(RoundedRectangle(cornerRadius: 14.5)) } } diff --git a/Pod/Views/Global/Pod/Shared/PodTag.swift b/Pod/Views/Global/Pod/Shared/PodTag.swift index 75df00e..d48a394 100644 --- a/Pod/Views/Global/Pod/Shared/PodTag.swift +++ b/Pod/Views/Global/Pod/Shared/PodTag.swift @@ -36,7 +36,7 @@ struct PodTag: View { .padding(.trailing, 8) .background( RoundedRectangle(cornerRadius: 15) - .fill(Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground)) + .fill(Color("SecondaryBackground")) ) } } diff --git a/Pod/Views/Global/Welcome/WelcomeView.swift b/Pod/Views/Global/Welcome/WelcomeView.swift index b504793..877780d 100644 --- a/Pod/Views/Global/Welcome/WelcomeView.swift +++ b/Pod/Views/Global/Welcome/WelcomeView.swift @@ -24,7 +24,7 @@ struct WelcomeView: View { VStack(alignment: .leading, spacing: 15) { WelcomeItem( - icon: "tray.and.arrow.down.fill", + icon: "books.vertical.fill", title: "Collection", description: "Organise and keep track of your collection." ) @@ -61,6 +61,7 @@ struct WelcomeView: View { .buttonStyle(PlainButtonStyle()) } .padding() + .background(Color("PrimaryBackground").edgesIgnoringSafeArea(.all)) .onAppear { Analytics.log(event: .view, data: [ Analytics.AnalyticsParameterScreenName: "Welcome", diff --git a/Pod/Views/Settings/Settings.swift b/Pod/Views/Settings/Settings.swift index c42b3fb..e7bdad8 100644 --- a/Pod/Views/Settings/Settings.swift +++ b/Pod/Views/Settings/Settings.swift @@ -9,41 +9,54 @@ import SwiftUI struct Settings: View { @State var isShowingAlert = false - @State var variety = UserDefaults.standard.integer(forKey: "Variety") + init() { + UITableView.appearance().backgroundColor = UIColor(Color("PrimaryBackground")) + } + var body: some View { NavigationView { Form { - Section( - footer: - Text("Set which capsule type you'd prefer to see first when browsing all capsules.") - ) { - Picker("Default Capsule Type", selection: $variety) { - Text("Original").tag(0) - Text("Vertuo").tag(1) + Group { + + Section( + footer: + Text("Set which capsule type you'd prefer to see first when browsing all capsules.") + ) { + Picker("Default Capsule Type", selection: $variety) { + Text("Original").tag(0) + Text("Vertuo").tag(1) + } } - } - - Section(header: Text("About")) { - if let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String { - HStack { - Text("Version") - Spacer() - Text("\(appVersion)") - .foregroundColor(.gray) + + Section(header: Text("About")) { + if let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String { + HStack { + Text("Version") + Spacer() + Text("\(appVersion)") + .foregroundColor(.gray) + } + HStack { + Text("Developer") + Spacer() + Link("@bttrdg", destination: URL(string: "https://twitter.com/bttrdg")!) + } } } + + Section( + header: Text("Legal"), + footer: + Text("All images and content relating to Nespresso coffee capsules are the property of Nestlé Nespresso S.A.") + ) { + Link("Privacy Policy", destination: URL(string: "https://pod-app.io/privacy-policy")!) + Link("Copyright", destination: URL(string: "https://www.nespresso.com/uk/en/legal")!) + } + } - - Section( - header: Text("Legal"), - footer: - Text("All images and content relating to Nespresso coffee capsules are the property of Nestlé Nespresso S.A.") - ) { - Link("Privacy Policy", destination: URL(string: "https://pod-app.io/privacy-policy")!) - Link("Copyright", destination: URL(string: "https://www.nespresso.com/uk/en/legal")!) - } + .listRowBackground(Color("SecondaryBackground")) } .navigationBarTitle("Settings") .navigationBarItems( @@ -56,7 +69,7 @@ struct Settings: View { } } label: { Image(systemName: "ellipsis.circle") - .font(.title2) + .font(.headline) } ) .alert(isPresented: $isShowingAlert) { diff --git a/Pod/Views/Trends/History/TrendsHistory.swift b/Pod/Views/Trends/History/TrendsHistory.swift index 7e3174c..b0f047a 100644 --- a/Pod/Views/Trends/History/TrendsHistory.swift +++ b/Pod/Views/Trends/History/TrendsHistory.swift @@ -15,7 +15,7 @@ struct TrendsHistory: View { var body: some View { Section(header: HStack { - Text("History").font(.title2).fontWeight(.semibold) +// Text("History").font(.title2).fontWeight(.semibold) Spacer() Button(action: { withAnimation(.linear(duration: 0.25)) { diff --git a/Pod/Views/Trends/History/TrendsHistoryRow.swift b/Pod/Views/Trends/History/TrendsHistoryRow.swift index d02f714..5ff1b3f 100644 --- a/Pod/Views/Trends/History/TrendsHistoryRow.swift +++ b/Pod/Views/Trends/History/TrendsHistoryRow.swift @@ -41,7 +41,7 @@ struct TrendsHistoryRow: View { .resizable() .background(pod.color) .frame(width: 25, height: 25) - .clipShape(RoundedRectangle(cornerRadius: 5)) + .clipShape(RoundedRectangle(cornerRadius: 7.5)) HStack(alignment: .center, spacing: 5) { Text((pod.name ?? "").uppercased()) .font(.custom("FSLucasPro-SemiBd", size: 16)) @@ -77,11 +77,11 @@ struct TrendsHistoryRow: View { } } .padding(.vertical, 12) - .padding(.horizontal, 15) + .padding(.horizontal, 13.5) .background( - colorScheme == .dark ? Color(UIColor.secondarySystemBackground) : Color.white + Color("SecondaryBackground") ) - .clipShape(RoundedRectangle(cornerRadius: 10)) + .clipShape(RoundedRectangle(cornerRadius: 15)) .alert(isPresented: $isShowingAlert) { Alert( title: Text("Remove from History"), diff --git a/Pod/Views/Trends/Trends.swift b/Pod/Views/Trends/Trends.swift index 5327e29..13b20b6 100644 --- a/Pod/Views/Trends/Trends.swift +++ b/Pod/Views/Trends/Trends.swift @@ -17,6 +17,7 @@ struct Trends: View { VStack { if vm.isLoading { ProgressView() + .frame(maxWidth: .infinity, maxHeight: .infinity) } else if logItems.count > 0 { ScrollView(.vertical) { VStack(alignment: .leading, spacing: 10) { @@ -32,15 +33,16 @@ struct Trends: View { } .padding() } - .background( - Color(colorScheme == .dark ? UIColor.systemBackground : UIColor.secondarySystemBackground) - .edgesIgnoringSafeArea(.all) - ) } else { TrendsEmpty() + .frame(maxWidth: .infinity, maxHeight: .infinity) } } - .navigationBarTitle("Trends") + .background( + Color("PrimaryBackground") + .edgesIgnoringSafeArea(.all) + ) + .navigationBarTitle("History") } .onAppear { Analytics.log(event: .view, data: [