add customize onboarding views
make tab bar text color selected text color
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
1C04489727C2DB9B00D22444 /* BGView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CAD603127A5C1C800C520BD /* BGView.swift */; };
|
||||
1C04489927C3F24000D22444 /* Color+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C04489827C3F24000D22444 /* Color+Codable.swift */; };
|
||||
1C04489A27C3F24F00D22444 /* Color+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C04489827C3F24000D22444 /* Color+Codable.swift */; };
|
||||
1C0A3C8F27FD445000FF37FF /* OnboardingCustomizeOne.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C0A3C8E27FD445000FF37FF /* OnboardingCustomizeOne.swift */; };
|
||||
1C0A3C9127FD445900FF37FF /* OnboardingCustomizeTwo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C0A3C9027FD445900FF37FF /* OnboardingCustomizeTwo.swift */; };
|
||||
1C0DAB45279DB0FB003B1F21 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1C0DAB47279DB0FB003B1F21 /* Localizable.strings */; };
|
||||
1C10E24E27A1AB110047948B /* UserDefaultsStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C5F4977279C945E0092F1B4 /* UserDefaultsStore.swift */; };
|
||||
1C10E25027A1AB220047948B /* OnboardingDay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CA03774279A294800D26164 /* OnboardingDay.swift */; };
|
||||
@@ -31,6 +33,7 @@
|
||||
1C1AFF3E27F895A40067F9DC /* PersonalityPackPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C1AFF3D27F895A40067F9DC /* PersonalityPackPickerView.swift */; };
|
||||
1C1AFF4127F895C00067F9DC /* ShapePickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C1AFF4027F895C00067F9DC /* ShapePickerView.swift */; };
|
||||
1C1AFF4327F895D90067F9DC /* DayFilterPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C1AFF4227F895D90067F9DC /* DayFilterPickerView.swift */; };
|
||||
1C1B6E6927FD4E8F00181E70 /* SampleEntryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C1B6E6827FD4E8F00181E70 /* SampleEntryView.swift */; };
|
||||
1C2162EB27C14EFA004353D1 /* Date+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C2162EA27C14EFA004353D1 /* Date+Extensions.swift */; };
|
||||
1C2162EC27C14FC5004353D1 /* Date+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C2162EA27C14EFA004353D1 /* Date+Extensions.swift */; };
|
||||
1C2162EE27C15191004353D1 /* MoodEntryFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C2162ED27C15191004353D1 /* MoodEntryFunctions.swift */; };
|
||||
@@ -198,6 +201,8 @@
|
||||
1C04488927C2ABD500D22444 /* IconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconView.swift; sourceTree = "<group>"; };
|
||||
1C04488C27C2ADDB00D22444 /* IconViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconViewModel.swift; sourceTree = "<group>"; };
|
||||
1C04489827C3F24000D22444 /* Color+Codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Codable.swift"; sourceTree = "<group>"; };
|
||||
1C0A3C8E27FD445000FF37FF /* OnboardingCustomizeOne.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingCustomizeOne.swift; sourceTree = "<group>"; };
|
||||
1C0A3C9027FD445900FF37FF /* OnboardingCustomizeTwo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingCustomizeTwo.swift; sourceTree = "<group>"; };
|
||||
1C0DAB46279DB0FB003B1F21 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
1C0DAB48279DB116003B1F21 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
1C1AFF2F27F894970067F9DC /* ThemePickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemePickerView.swift; sourceTree = "<group>"; };
|
||||
@@ -209,6 +214,7 @@
|
||||
1C1AFF3D27F895A40067F9DC /* PersonalityPackPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonalityPackPickerView.swift; sourceTree = "<group>"; };
|
||||
1C1AFF4027F895C00067F9DC /* ShapePickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShapePickerView.swift; sourceTree = "<group>"; };
|
||||
1C1AFF4227F895D90067F9DC /* DayFilterPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DayFilterPickerView.swift; sourceTree = "<group>"; };
|
||||
1C1B6E6827FD4E8F00181E70 /* SampleEntryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleEntryView.swift; sourceTree = "<group>"; };
|
||||
1C2162EA27C14EFA004353D1 /* Date+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Date+Extensions.swift"; sourceTree = "<group>"; };
|
||||
1C2162ED27C15191004353D1 /* MoodEntryFunctions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoodEntryFunctions.swift; sourceTree = "<group>"; };
|
||||
1C2162F127C156E6004353D1 /* CustomizeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomizeView.swift; sourceTree = "<group>"; };
|
||||
@@ -489,6 +495,8 @@
|
||||
1CA03772279A293D00D26164 /* OnboardingTime.swift */,
|
||||
1CA03774279A294800D26164 /* OnboardingDay.swift */,
|
||||
1CA03776279A295600D26164 /* OnboardingTitle.swift */,
|
||||
1C0A3C8E27FD445000FF37FF /* OnboardingCustomizeOne.swift */,
|
||||
1C0A3C9027FD445900FF37FF /* OnboardingCustomizeTwo.swift */,
|
||||
1CA0377B279B605000D26164 /* OnboardingWrapup.swift */,
|
||||
);
|
||||
path = views;
|
||||
@@ -512,6 +520,7 @@
|
||||
1C04488F27C2CA9C00D22444 /* DayView */,
|
||||
1C361F0B27C0356B00E832FC /* MainTabView.swift */,
|
||||
1C4DAA7327CC263F00C25D2B /* MonthView */,
|
||||
1C1B6E6827FD4E8F00181E70 /* SampleEntryView.swift */,
|
||||
1C04489327C2CABF00D22444 /* SettingsView */,
|
||||
1C04489527C2CB1A00D22444 /* Sharing */,
|
||||
1C358FB427B0ADF3002C83A6 /* SharingTemplates */,
|
||||
@@ -857,6 +866,7 @@
|
||||
1CA037702799FFA600D26164 /* DayViewViewModel.swift in Sources */,
|
||||
1CA03773279A293D00D26164 /* OnboardingTime.swift in Sources */,
|
||||
1CAD603927A5C1C800C520BD /* HeaderPercView.swift in Sources */,
|
||||
1C0A3C8F27FD445000FF37FF /* OnboardingCustomizeOne.swift in Sources */,
|
||||
1CAD603C27A5C1C800C520BD /* HeaderStatsView.swift in Sources */,
|
||||
1CAD603827A5C1C800C520BD /* AddMoodHeaderView.swift in Sources */,
|
||||
1CA0377C279B605000D26164 /* OnboardingWrapup.swift in Sources */,
|
||||
@@ -877,6 +887,7 @@
|
||||
1C1AFF3027F894970067F9DC /* ThemePickerView.swift in Sources */,
|
||||
1C1AFF4327F895D90067F9DC /* DayFilterPickerView.swift in Sources */,
|
||||
1C04488727C1C81D00D22444 /* PersonalityPackable.swift in Sources */,
|
||||
1C0A3C9127FD445900FF37FF /* OnboardingCustomizeTwo.swift in Sources */,
|
||||
1C4FF3BE27BEDF9100BE8F34 /* PersistenceHelper.swift in Sources */,
|
||||
1CC469AA278F30A0003E0C6E /* BGTask.swift in Sources */,
|
||||
1C95ABC927E6F73A00509BD3 /* Shapes.swift in Sources */,
|
||||
@@ -889,6 +900,7 @@
|
||||
1C2618FE27960A4F00FDC148 /* YearViewModel.swift in Sources */,
|
||||
1C744F2C278CE15600953A57 /* AppDelegate.swift in Sources */,
|
||||
1CD90B63278C7EBA001C4FEA /* Mood.swift in Sources */,
|
||||
1C1B6E6927FD4E8F00181E70 /* SampleEntryView.swift in Sources */,
|
||||
1C358FBE27B4D1F2002C83A6 /* CurrentStreakTemplate.swift in Sources */,
|
||||
1C4FF3C727BEE09E00BE8F34 /* PersistenceADD.swift in Sources */,
|
||||
1C414C0F27D51FB500BC1720 /* EntryListView.swift in Sources */,
|
||||
|
||||
74
Shared/Onboarding/views/OnboardingCustomizeOne.swift
Normal file
74
Shared/Onboarding/views/OnboardingCustomizeOne.swift
Normal file
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// OnboardingCustomizeOne.swift
|
||||
// Feels (iOS)
|
||||
//
|
||||
// Created by Trey Tartt on 4/5/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct OnboardingCustomizeOne: View {
|
||||
@ObservedObject var onboardingData: OnboardingData
|
||||
|
||||
var formatter: DateFormatter {
|
||||
let dateFormatter = DateFormatter()
|
||||
dateFormatter.timeStyle = .short
|
||||
return dateFormatter
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
GeometryReader { geometry in
|
||||
VStack {
|
||||
Spacer()
|
||||
Image("average", bundle: .main)
|
||||
.foregroundColor(Color(UIColor.darkText))
|
||||
.opacity(0.04)
|
||||
.scaleEffect(1.2, anchor: .trailing)
|
||||
Spacer()
|
||||
}
|
||||
|
||||
|
||||
ScrollView {
|
||||
VStack(alignment: .leading) {
|
||||
Text(String(localized: "onboarding_title_customize_one_title"))
|
||||
.font(.title)
|
||||
.padding()
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
Text(String(localized: "onboarding_title_customize_one_section_one_title"))
|
||||
.font(.title3)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.padding()
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
.multilineTextAlignment(.leading)
|
||||
IconPickerView()
|
||||
|
||||
Text(String(localized: "onboarding_title_customize_one_section_two_title"))
|
||||
.font(.title3)
|
||||
.padding()
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
DayFilterPickerView()
|
||||
|
||||
Text(String(localized: "onboarding_title_customize_one_section_two_note"))
|
||||
.font(.title3)
|
||||
.padding()
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
.background(Color(hex: "0b84ff"))
|
||||
}
|
||||
}
|
||||
|
||||
struct OnboardingCustomizeOne_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
OnboardingCustomizeOne(onboardingData: OnboardingData())
|
||||
}
|
||||
}
|
||||
82
Shared/Onboarding/views/OnboardingCustomizeTwo.swift
Normal file
82
Shared/Onboarding/views/OnboardingCustomizeTwo.swift
Normal file
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// OnboardingCustomizeTwo.swift
|
||||
// Feels (iOS)
|
||||
//
|
||||
// Created by Trey Tartt on 4/5/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct OnboardingCustomizeTwo: View {
|
||||
@ObservedObject var onboardingData: OnboardingData
|
||||
|
||||
var formatter: DateFormatter {
|
||||
let dateFormatter = DateFormatter()
|
||||
dateFormatter.timeStyle = .short
|
||||
return dateFormatter
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
GeometryReader { geometry in
|
||||
VStack {
|
||||
Spacer()
|
||||
Image("bad", bundle: .main)
|
||||
.foregroundColor(Color(UIColor.darkText))
|
||||
.opacity(0.04)
|
||||
.scaleEffect(1.2, anchor: .trailing)
|
||||
Spacer()
|
||||
}
|
||||
|
||||
VStack {
|
||||
SampleEntryView()
|
||||
.padding([.top])
|
||||
|
||||
ScrollView {
|
||||
VStack(alignment: .leading) {
|
||||
Text(String(localized: "onboarding_title_customize_two_title"))
|
||||
.font(.title)
|
||||
.padding()
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
|
||||
Text(String(localized: "onboarding_title_customize_two_section_one_title"))
|
||||
.font(.title3)
|
||||
.padding()
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
ImagePackPickerView()
|
||||
|
||||
Text(String(localized: "onboarding_title_customize_two_section_two_title"))
|
||||
.font(.title3)
|
||||
.padding()
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
|
||||
TintPickerView()
|
||||
|
||||
Text(String(localized: "onboarding_title_customize_two_section_three_title"))
|
||||
.font(.title3)
|
||||
.padding()
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
|
||||
TextColorPickerView()
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
.background(Color(hex: "ff9e0b"))
|
||||
}
|
||||
}
|
||||
|
||||
struct OnboardingCustomizeTwo_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
OnboardingCustomizeTwo(onboardingData: OnboardingData())
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ struct OnboardingDay: View {
|
||||
GeometryReader { geometry in
|
||||
VStack {
|
||||
Spacer()
|
||||
Image("average", bundle: .main)
|
||||
Image("good", bundle: .main)
|
||||
.foregroundColor(Color(UIColor.darkText))
|
||||
.opacity(0.04)
|
||||
.scaleEffect(1.2, anchor: .trailing)
|
||||
@@ -47,12 +47,12 @@ struct OnboardingDay: View {
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
VStack{
|
||||
VStack(alignment: .leading) {
|
||||
Text(String(localized: "onboarding_day_title"))
|
||||
.font(.title)
|
||||
.padding()
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
.foregroundColor(.black)
|
||||
|
||||
|
||||
Picker(selection: $onboardingData.inputDay,
|
||||
@@ -62,21 +62,20 @@ struct OnboardingDay: View {
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.colorScheme(.dark)
|
||||
.padding([.trailing, .leading], 55)
|
||||
.pickerStyle(SegmentedPickerStyle())
|
||||
|
||||
Text(previewText)
|
||||
.font(.body)
|
||||
.font(.title3)
|
||||
.padding()
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
.foregroundColor(.black)
|
||||
}
|
||||
.frame(maxWidth: geometry.size.width)
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
.background(.blue)
|
||||
.background(Color(hex: "ffd709"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@ struct OnboardingMain: View {
|
||||
|
||||
OnboardingDay(onboardingData: onboardingData)
|
||||
|
||||
OnboardingCustomizeOne(onboardingData: onboardingData)
|
||||
|
||||
OnboardingCustomizeTwo(onboardingData: onboardingData)
|
||||
|
||||
// OnboardingTitle(onboardingData: onboardingData)
|
||||
|
||||
OnboardingWrapup(onboardingData: onboardingData,
|
||||
|
||||
@@ -19,7 +19,7 @@ struct OnboardingTime: View {
|
||||
var body: some View {
|
||||
ZStack {
|
||||
GeometryReader { geometry in
|
||||
VStack {
|
||||
VStack(alignment: .leading) {
|
||||
Spacer()
|
||||
Image("great", bundle: .main)
|
||||
.foregroundColor(Color(UIColor.darkText))
|
||||
@@ -30,35 +30,32 @@ struct OnboardingTime: View {
|
||||
|
||||
|
||||
ScrollView {
|
||||
VStack {
|
||||
Text(String(localized: "onboarding_time_title"))
|
||||
.font(.title)
|
||||
.padding()
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
DatePicker("", selection: $onboardingData.date,
|
||||
displayedComponents: .hourAndMinute)
|
||||
.scaleEffect(2)
|
||||
.labelsHidden()
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
Text(String(localized: "onboarding_time_title"))
|
||||
.font(.title)
|
||||
.padding()
|
||||
.padding([.top, .bottom], 25)
|
||||
.colorScheme(.dark)
|
||||
|
||||
Text(String(format: String(localized: "onboarding_time_body"),
|
||||
formatter.string(from: onboardingData.date)))
|
||||
.font(.body)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.padding()
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
}
|
||||
.frame(maxWidth: geometry.size.width)
|
||||
|
||||
DatePicker("", selection: $onboardingData.date,
|
||||
displayedComponents: .hourAndMinute)
|
||||
.scaleEffect(2)
|
||||
.labelsHidden()
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.padding()
|
||||
.padding([.top, .bottom], 25)
|
||||
.colorScheme(.dark)
|
||||
|
||||
Text(String(format: String(localized: "onboarding_time_body"),
|
||||
formatter.string(from: onboardingData.date)))
|
||||
.font(.title3)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.padding()
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
.background(.green)
|
||||
.background(Color(hex: "31d158"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ struct OnboardingWrapup: View {
|
||||
GeometryReader { geometry in
|
||||
VStack {
|
||||
Spacer()
|
||||
Image("good", bundle: .main)
|
||||
Image("horrible", bundle: .main)
|
||||
.foregroundColor(Color(UIColor.darkText))
|
||||
.opacity(0.04)
|
||||
.scaleEffect(1.2, anchor: .trailing)
|
||||
@@ -78,7 +78,7 @@ struct OnboardingWrapup: View {
|
||||
.frame(maxWidth: geometry.size.width)
|
||||
}
|
||||
}
|
||||
.background(.yellow)
|
||||
.background(Color(hex: "ff453a"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,8 @@ import SwiftUI
|
||||
|
||||
struct CustomizeView: View {
|
||||
@State private var showSettings = false
|
||||
@State private var sampleListEntry = PersistenceController.shared.randomEntries(count: 1).first!
|
||||
|
||||
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
|
||||
@AppStorage(UserDefaultsStore.Keys.textColor.rawValue, store: GroupUserDefaults.groupDefaults) private var textColor: Color = DefaultTextColor.textColor
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
@@ -22,7 +21,7 @@ struct CustomizeView: View {
|
||||
IconPickerView()
|
||||
ThemePickerView()
|
||||
Divider()
|
||||
sampleEntryView
|
||||
SampleEntryView()
|
||||
ImagePackPickerView()
|
||||
}
|
||||
Group {
|
||||
@@ -62,39 +61,6 @@ struct CustomizeView: View {
|
||||
}).padding(.trailing)
|
||||
}
|
||||
}
|
||||
|
||||
private var sampleEntryView: some View {
|
||||
ZStack {
|
||||
theme.currentTheme.secondaryBGColor
|
||||
|
||||
VStack {
|
||||
HStack {
|
||||
Spacer()
|
||||
Image(systemName: "arrow.triangle.2.circlepath.circle")
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20, alignment: .trailing)
|
||||
.foregroundColor(Color(UIColor.systemGray))
|
||||
.onTapGesture {
|
||||
sampleListEntry = PersistenceController.shared.randomEntries(count: 1).first!
|
||||
}
|
||||
}
|
||||
Spacer()
|
||||
}.padding()
|
||||
|
||||
VStack(alignment:.leading) {
|
||||
Text(String(localized: "customize_view_view_example_row"))
|
||||
.padding([.leading, .top])
|
||||
.foregroundColor(textColor)
|
||||
Divider()
|
||||
EntryListView(entry: sampleListEntry)
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
struct CustomizeView_Previews: PreviewProvider {
|
||||
|
||||
@@ -11,9 +11,12 @@ struct ImagePackPickerView: View {
|
||||
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
|
||||
@AppStorage(UserDefaultsStore.Keys.moodTint.rawValue, store: GroupUserDefaults.groupDefaults) private var moodTint: MoodTints = .Default
|
||||
@AppStorage(UserDefaultsStore.Keys.moodImages.rawValue, store: GroupUserDefaults.groupDefaults) private var imagePack: MoodImages = .FontAwesome
|
||||
@AppStorage(UserDefaultsStore.Keys.customMoodTintUpdateNumber.rawValue, store: GroupUserDefaults.groupDefaults) private var customMoodTintUpdateNumber: Int = 0
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Text(String(customMoodTintUpdateNumber))
|
||||
.hidden()
|
||||
theme.currentTheme.secondaryBGColor
|
||||
VStack {
|
||||
ForEach(MoodImages.allCases, id: \.rawValue) { images in
|
||||
|
||||
@@ -11,6 +11,8 @@ struct MainTabView: View {
|
||||
@AppStorage(UserDefaultsStore.Keys.needsOnboarding.rawValue, store: GroupUserDefaults.groupDefaults) private var needsOnboarding = true
|
||||
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
|
||||
@AppStorage(UserDefaultsStore.Keys.moodTint.rawValue, store: GroupUserDefaults.groupDefaults) private var moodTint: MoodTints = .Default
|
||||
@AppStorage(UserDefaultsStore.Keys.textColor.rawValue, store: GroupUserDefaults.groupDefaults) private var textColor: Color = DefaultTextColor.textColor
|
||||
|
||||
|
||||
let onboardingData = OnboardingDataDataManager.shared.savedOnboardingData
|
||||
|
||||
@@ -41,7 +43,7 @@ struct MainTabView: View {
|
||||
Label(String(localized: "content_view_tab_customize"), systemImage: "pencil")
|
||||
}
|
||||
}
|
||||
.accentColor(moodTint.color(forMood: .average))
|
||||
.accentColor(textColor)
|
||||
.sheet(isPresented: $needsOnboarding, onDismiss: { }, content: {
|
||||
OnboardingMain(onboardingData: onboardingData,
|
||||
updateBoardingDataClosure: { onboardingData in
|
||||
|
||||
51
Shared/views/SampleEntryView.swift
Normal file
51
Shared/views/SampleEntryView.swift
Normal file
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// SampleEntryView.swift
|
||||
// Feels (iOS)
|
||||
//
|
||||
// Created by Trey Tartt on 4/5/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct SampleEntryView: View {
|
||||
@State private var sampleListEntry = PersistenceController.shared.randomEntries(count: 1).first!
|
||||
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
|
||||
@AppStorage(UserDefaultsStore.Keys.textColor.rawValue, store: GroupUserDefaults.groupDefaults) private var textColor: Color = DefaultTextColor.textColor
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
theme.currentTheme.secondaryBGColor
|
||||
|
||||
VStack {
|
||||
HStack {
|
||||
Spacer()
|
||||
Image(systemName: "arrow.triangle.2.circlepath.circle")
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20, alignment: .trailing)
|
||||
.foregroundColor(Color(UIColor.systemGray))
|
||||
.onTapGesture {
|
||||
sampleListEntry = PersistenceController.shared.randomEntries(count: 1).first!
|
||||
}
|
||||
}
|
||||
Spacer()
|
||||
}.padding()
|
||||
|
||||
VStack(alignment:.leading) {
|
||||
Text(String(localized: "customize_view_view_example_row"))
|
||||
.padding([.leading, .top])
|
||||
.foregroundColor(textColor)
|
||||
Divider()
|
||||
EntryListView(entry: sampleListEntry)
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
}
|
||||
}
|
||||
|
||||
struct SampleEntryView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
SampleEntryView()
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,17 @@
|
||||
"onboarding_title_title_option_2" = "Pick your shit!";
|
||||
"onboarding_title_title_option_3" = "How was your day?";
|
||||
|
||||
"onboarding_title_customize_one_title" = "Lets make ifeel yours";
|
||||
"onboarding_title_customize_one_section_one_title" = "Pick an app icon";
|
||||
"onboarding_title_customize_one_section_two_title" = "What days would you like to see on the charts?";
|
||||
"onboarding_title_customize_one_section_two_note" = "Note: you will still be asked to pick a feeling for every day";
|
||||
|
||||
"onboarding_title_customize_two_title" = "";
|
||||
"onboarding_title_customize_two_section_one_title" = "What icon set would you like to use?";
|
||||
"onboarding_title_customize_two_section_two_title" = "Pick colors for each feeling or create your own";
|
||||
"onboarding_title_customize_two_section_three_title" = "Pick a text color";
|
||||
|
||||
|
||||
"onboarding_wrap_up_1" = "At";
|
||||
"onboarding_wrap_up_2" = "you will get notified that";
|
||||
"onboarding_wrap_up_3" = "you'll be notified its time to pick a mood for the";
|
||||
|
||||
Reference in New Issue
Block a user