Merge branch 'develop'
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
1C358FBE27B4D1F2002C83A6 /* CurrentStreakTemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C358FBD27B4D1F2002C83A6 /* CurrentStreakTemplate.swift */; };
|
||||
1C358FC027B4D20C002C83A6 /* MonthTotalTemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C358FBF27B4D20C002C83A6 /* MonthTotalTemplate.swift */; };
|
||||
1C358FC227B4D227002C83A6 /* WeekTotalTemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C358FC127B4D227002C83A6 /* WeekTotalTemplate.swift */; };
|
||||
1C361F0A27C0356000E832FC /* HomeViewTwo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C361F0927C0356000E832FC /* HomeViewTwo.swift */; };
|
||||
1C361F0A27C0356000E832FC /* MonthView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C361F0927C0356000E832FC /* MonthView.swift */; };
|
||||
1C361F0C27C0356B00E832FC /* MainTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C361F0B27C0356B00E832FC /* MainTabView.swift */; };
|
||||
1C361F0D27C03BDF00E832FC /* OnboardingData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C5F4975279C84090092F1B4 /* OnboardingData.swift */; };
|
||||
1C361F0F27C03C0E00E832FC /* LocalNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CD90B75278C8119001C4FEA /* LocalNotification.swift */; };
|
||||
@@ -192,7 +192,7 @@
|
||||
1C358FBD27B4D1F2002C83A6 /* CurrentStreakTemplate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurrentStreakTemplate.swift; sourceTree = "<group>"; };
|
||||
1C358FBF27B4D20C002C83A6 /* MonthTotalTemplate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MonthTotalTemplate.swift; sourceTree = "<group>"; };
|
||||
1C358FC127B4D227002C83A6 /* WeekTotalTemplate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeekTotalTemplate.swift; sourceTree = "<group>"; };
|
||||
1C361F0927C0356000E832FC /* HomeViewTwo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewTwo.swift; sourceTree = "<group>"; };
|
||||
1C361F0927C0356000E832FC /* MonthView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MonthView.swift; sourceTree = "<group>"; };
|
||||
1C361F0B27C0356B00E832FC /* MainTabView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabView.swift; sourceTree = "<group>"; };
|
||||
1C361F1327C03C8600E832FC /* OnboardingDataDataManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingDataDataManager.swift; sourceTree = "<group>"; };
|
||||
1C361F1627C046D800E832FC /* MonthDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MonthDetailView.swift; sourceTree = "<group>"; };
|
||||
@@ -312,7 +312,6 @@
|
||||
children = (
|
||||
1CAD603227A5C1C800C520BD /* HomeView.swift */,
|
||||
1CA0376F2799FFA600D26164 /* HomeViewViewModel.swift */,
|
||||
1C361F1827C046E400E832FC /* HomeViewTwo */,
|
||||
);
|
||||
path = HomeView;
|
||||
sourceTree = "<group>";
|
||||
@@ -391,13 +390,13 @@
|
||||
path = SharingTemplates;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1C361F1827C046E400E832FC /* HomeViewTwo */ = {
|
||||
1C4DAA7327CC263F00C25D2B /* MonthView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1C361F0927C0356000E832FC /* HomeViewTwo.swift */,
|
||||
1C361F0927C0356000E832FC /* MonthView.swift */,
|
||||
1C361F1627C046D800E832FC /* MonthDetailView.swift */,
|
||||
);
|
||||
path = HomeViewTwo;
|
||||
path = MonthView;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1C4FF3C527BEE07800BE8F34 /* Persisence */ = {
|
||||
@@ -451,6 +450,7 @@
|
||||
1CAD603327A5C1C800C520BD /* HeaderStatsView.swift */,
|
||||
1C04488F27C2CA9C00D22444 /* HomeView */,
|
||||
1C361F0B27C0356B00E832FC /* MainTabView.swift */,
|
||||
1C4DAA7327CC263F00C25D2B /* MonthView */,
|
||||
1C04489327C2CABF00D22444 /* SettingsView */,
|
||||
1C04489527C2CB1A00D22444 /* Sharing */,
|
||||
1C358FB427B0ADF3002C83A6 /* SharingTemplates */,
|
||||
@@ -838,7 +838,7 @@
|
||||
1C361F0C27C0356B00E832FC /* MainTabView.swift in Sources */,
|
||||
1CEC967127B9C2BB00CC8688 /* CustomWidgetModel.swift in Sources */,
|
||||
1C2162EE27C15191004353D1 /* MoodEntryFunctions.swift in Sources */,
|
||||
1C361F0A27C0356000E832FC /* HomeViewTwo.swift in Sources */,
|
||||
1C361F0A27C0356000E832FC /* MonthView.swift in Sources */,
|
||||
1C361F1427C03C8600E832FC /* OnboardingDataDataManager.swift in Sources */,
|
||||
1C358FAD27ADD0C3002C83A6 /* Theme.swift in Sources */,
|
||||
1C2162EB27C14EFA004353D1 /* Date+Extensions.swift in Sources */,
|
||||
|
||||
@@ -31,12 +31,11 @@ class LocalNotification {
|
||||
public class func rescheduleNotifiations() {
|
||||
if let data = GroupUserDefaults.groupDefaults.object(forKey: UserDefaultsStore.Keys.savedOnboardingData.rawValue) as? Data,
|
||||
let model = try? JSONDecoder().decode(OnboardingData.self, from: data) {
|
||||
LocalNotification.scheduleReminder(atTime: model.date,
|
||||
withTitle: model.title)
|
||||
LocalNotification.scheduleReminder(atTime: model.date)
|
||||
}
|
||||
}
|
||||
|
||||
public class func scheduleReminder(atTime time: Date, withTitle title: String) {
|
||||
public class func scheduleReminder(atTime time: Date) {
|
||||
self.removeNotificaiton()
|
||||
|
||||
LocalNotification.testIfEnabled(completion: { result in
|
||||
|
||||
@@ -15,6 +15,6 @@ final class OnboardingDataDataManager: ObservableObject {
|
||||
public func updateOnboardingData(onboardingData: OnboardingData) {
|
||||
let onboardingData = UserDefaultsStore.saveOnboarding(onboardingData: onboardingData)
|
||||
savedOnboardingData = onboardingData
|
||||
LocalNotification.scheduleReminder(atTime: onboardingData.date, withTitle: onboardingData.title)
|
||||
LocalNotification.scheduleReminder(atTime: onboardingData.date)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,36 +173,5 @@ class UserDefaultsStore {
|
||||
fatalError("error saving")
|
||||
}
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
static func makeWidgetCurrent(withUUID uuid: String) -> [CustomWidgetModel] {
|
||||
do {
|
||||
let existingWidgets = getCustomWidgets()
|
||||
|
||||
if let foundWidget = existingWidgets.first(where: {
|
||||
$0.uuid == uuid
|
||||
}) {
|
||||
existingWidgets.forEach({
|
||||
$0.inUse = false
|
||||
})
|
||||
|
||||
foundWidget.inUse = true
|
||||
} else {
|
||||
if let first = existingWidgets.first {
|
||||
first.inUse = true
|
||||
}
|
||||
}
|
||||
|
||||
existingWidgets.forEach({
|
||||
$0.isSaved = true
|
||||
})
|
||||
|
||||
let data = try JSONEncoder().encode(existingWidgets)
|
||||
GroupUserDefaults.groupDefaults.set(data, forKey: UserDefaultsStore.Keys.customWidget.rawValue)
|
||||
return UserDefaultsStore.getCustomWidgets()
|
||||
} catch {
|
||||
fatalError("error saving")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,10 +13,9 @@ import UserNotifications
|
||||
final class OnboardingData: NSObject, ObservableObject, Codable {
|
||||
@Published var date: Date = Date()
|
||||
@Published var inputDay: DayOptions = .Today
|
||||
@Published var title: String = OnboardingTitle.titleOptions[0]
|
||||
|
||||
enum CodingKeys: CodingKey {
|
||||
case date, inputDay, title
|
||||
case date, inputDay
|
||||
}
|
||||
|
||||
func encode(to encoder: Encoder) throws {
|
||||
@@ -24,7 +23,6 @@ final class OnboardingData: NSObject, ObservableObject, Codable {
|
||||
|
||||
try container.encode(date, forKey: .date)
|
||||
try container.encode(inputDay, forKey: .inputDay)
|
||||
try container.encode(title, forKey: .title)
|
||||
}
|
||||
|
||||
required init(from decoder: Decoder) throws {
|
||||
@@ -32,7 +30,6 @@ final class OnboardingData: NSObject, ObservableObject, Codable {
|
||||
|
||||
date = try container.decode(Date.self, forKey: .date)
|
||||
inputDay = try container.decode(DayOptions.self, forKey: .inputDay)
|
||||
title = try container.decode(String.self, forKey: .title)
|
||||
}
|
||||
|
||||
func ableToVoteBasedOnCurentTime() -> Bool {
|
||||
@@ -70,7 +67,6 @@ extension OnboardingData: RawRepresentable {
|
||||
|
||||
self.date = result.date
|
||||
self.inputDay = result.inputDay
|
||||
self.title = result.title
|
||||
}
|
||||
|
||||
public var rawValue: String {
|
||||
|
||||
@@ -19,7 +19,7 @@ struct OnboardingMain: View {
|
||||
|
||||
OnboardingDay(onboardingData: onboardingData)
|
||||
|
||||
OnboardingTitle(onboardingData: onboardingData)
|
||||
// OnboardingTitle(onboardingData: onboardingData)
|
||||
|
||||
OnboardingWrapup(onboardingData: onboardingData,
|
||||
completionClosure: { _ in
|
||||
|
||||
@@ -34,7 +34,7 @@ struct OnboardingTitle: View {
|
||||
|
||||
ForEach(OnboardingTitle.titleOptions, id: \.self) { option in
|
||||
Button(action: {
|
||||
onboardingData.title = option
|
||||
// onboardingData.title = option
|
||||
}, label: {
|
||||
Text(option)
|
||||
.font(.system(size: 15))
|
||||
@@ -54,15 +54,15 @@ struct OnboardingTitle: View {
|
||||
.padding([.top], 25)
|
||||
.padding([.trailing, .leading], 55)
|
||||
|
||||
TextField("Notification", text: $onboardingData.title)
|
||||
.frame(height: 44)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
.textFieldStyle(PlainTextFieldStyle())
|
||||
.padding([.leading, .trailing], 4)
|
||||
.cornerRadius(16)
|
||||
.overlay(RoundedRectangle(cornerRadius: 16).stroke(Color.white))
|
||||
.padding([.leading, .trailing], 75)
|
||||
.padding([.top], 45)
|
||||
// TextField("Notification", text: $onboardingData.title)
|
||||
// .frame(height: 44)
|
||||
// .foregroundColor(Color(UIColor.white))
|
||||
// .textFieldStyle(PlainTextFieldStyle())
|
||||
// .padding([.leading, .trailing], 4)
|
||||
// .cornerRadius(16)
|
||||
// .overlay(RoundedRectangle(cornerRadius: 16).stroke(Color.white))
|
||||
// .padding([.leading, .trailing], 75)
|
||||
// .padding([.top], 45)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
|
||||
@@ -44,18 +44,18 @@ struct OnboardingWrapup: View {
|
||||
.padding([.trailing, .leading], 55)
|
||||
.padding([.top], 15)
|
||||
|
||||
Text(String(localized: "onboarding_wrap_up_2"))
|
||||
.font(.title)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
.padding([.trailing, .leading], 55)
|
||||
.padding([.top], 15)
|
||||
// Text(String(localized: "onboarding_wrap_up_2"))
|
||||
// .font(.title)
|
||||
// .foregroundColor(Color(UIColor.white))
|
||||
// .padding([.trailing, .leading], 55)
|
||||
// .padding([.top], 15)
|
||||
|
||||
Text(onboardingData.title)
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
.padding([.trailing, .leading], 55)
|
||||
.padding([.top], 15)
|
||||
// Text(onboardingData.title)
|
||||
// .font(.title)
|
||||
// .fontWeight(.bold)
|
||||
// .foregroundColor(Color(UIColor.white))
|
||||
// .padding([.trailing, .leading], 55)
|
||||
// .padding([.top], 15)
|
||||
|
||||
Text(String(localized: "onboarding_wrap_up_3"))
|
||||
.font(.title)
|
||||
|
||||
@@ -12,11 +12,11 @@ struct CreateWidgetView: View {
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
@StateObject private var customWidget: CustomWidgetModel
|
||||
|
||||
|
||||
@State private var mouth: CustomWidgetMouthOptions = CustomWidgetMouthOptions.defaultOption
|
||||
|
||||
|
||||
@State var widgetView: CustomWidgetView
|
||||
|
||||
|
||||
private var randomElements: [AnyView]
|
||||
|
||||
init(customWidget: CustomWidgetModel, randomElements: [AnyView] = [AnyView]()) {
|
||||
@@ -106,7 +106,7 @@ struct CreateWidgetView: View {
|
||||
HStack(alignment: .center) {
|
||||
Spacer()
|
||||
VStack(alignment: .center) {
|
||||
Menu("Left Eye") {
|
||||
Menu(String(localized: "create_widget_view_left_eye")) {
|
||||
ForEach(CustomWidgetEyeOptions.allCases, id: \.self) { option in
|
||||
Button(action: {
|
||||
update(eye: .left, eyeOption: option)
|
||||
@@ -119,7 +119,7 @@ struct CreateWidgetView: View {
|
||||
}
|
||||
Spacer()
|
||||
VStack(alignment: .center) {
|
||||
Menu("Right Eye") {
|
||||
Menu(String(localized: "create_widget_view_right_eye")) {
|
||||
ForEach(CustomWidgetEyeOptions.allCases, id: \.self) { option in
|
||||
Button(action: {
|
||||
update(eye: .right, eyeOption: option)
|
||||
@@ -132,7 +132,7 @@ struct CreateWidgetView: View {
|
||||
}
|
||||
Spacer()
|
||||
VStack(alignment: .center) {
|
||||
Menu("Mouth") {
|
||||
Menu(String(localized: "create_widget_view_mouth")) {
|
||||
ForEach(CustomWidgetMouthOptions.allCases, id: \.self) { option in
|
||||
Button(action: {
|
||||
update(mouthOption: option)
|
||||
@@ -186,21 +186,21 @@ struct CreateWidgetView: View {
|
||||
VStack {
|
||||
HStack(spacing: 0) {
|
||||
VStack(alignment: .center) {
|
||||
Text("background")
|
||||
Text(String(localized: "create_widget_background_color"))
|
||||
ColorPicker("", selection: $customWidget.bgColor)
|
||||
.labelsHidden()
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
VStack(alignment: .center) {
|
||||
Text("Inner")
|
||||
Text(String(localized: "create_widget_inner_color"))
|
||||
ColorPicker("", selection: $customWidget.innerColor)
|
||||
.labelsHidden()
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
VStack(alignment: .center) {
|
||||
Text("Face Outline")
|
||||
Text(String(localized: "create_widget_face_outline_color"))
|
||||
ColorPicker("", selection: $customWidget.circleStrokeColor)
|
||||
.labelsHidden()
|
||||
}
|
||||
@@ -209,21 +209,21 @@ struct CreateWidgetView: View {
|
||||
|
||||
HStack(spacing: 0) {
|
||||
VStack(alignment: .center) {
|
||||
Text("Left Eye")
|
||||
Text(String(localized: "create_widget_view_left_eye_color"))
|
||||
ColorPicker("", selection: $customWidget.leftEyeColor)
|
||||
.labelsHidden()
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
VStack(alignment: .center) {
|
||||
Text("right eye")
|
||||
Text(String(localized: "create_widget_view_right_eye_color"))
|
||||
ColorPicker("", selection: $customWidget.rightEyeColor)
|
||||
.labelsHidden()
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
VStack(alignment: .center) {
|
||||
Text("mouth")
|
||||
Text(String(localized: "create_widget_view_mouth_color"))
|
||||
ColorPicker("", selection: $customWidget.mouthColor)
|
||||
.labelsHidden()
|
||||
}
|
||||
@@ -253,12 +253,12 @@ struct CreateWidgetView: View {
|
||||
.background(.blue)
|
||||
|
||||
Button(action: {
|
||||
UserDefaultsStore.saveCustomWidget(widgetModel: customWidget, inUse: true)
|
||||
UserDefaultsStore.saveCustomWidget(widgetModel: customWidget, inUse: false)
|
||||
let impactMed = UIImpactFeedbackGenerator(style: .heavy)
|
||||
impactMed.impactOccurred()
|
||||
dismiss()
|
||||
}, label: {
|
||||
Text("Save")
|
||||
Text(String(localized: "create_widget_save"))
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
@@ -268,23 +268,23 @@ struct CreateWidgetView: View {
|
||||
.frame(height: 40)
|
||||
.background(.green)
|
||||
|
||||
if customWidget.isSaved {
|
||||
Button(action: {
|
||||
UserDefaultsStore.makeWidgetCurrent(withUUID: customWidget.uuid)
|
||||
let impactMed = UIImpactFeedbackGenerator(style: .heavy)
|
||||
impactMed.impactOccurred()
|
||||
dismiss()
|
||||
}, label: {
|
||||
Text("Use")
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
})
|
||||
.frame(height: 40)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.background(.pink)
|
||||
Button(action: {
|
||||
UserDefaultsStore.saveCustomWidget(widgetModel: customWidget, inUse: true)
|
||||
let impactMed = UIImpactFeedbackGenerator(style: .heavy)
|
||||
impactMed.impactOccurred()
|
||||
dismiss()
|
||||
}, label: {
|
||||
Text(String(localized: "create_widget_use"))
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
})
|
||||
.frame(height: 40)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.background(.pink)
|
||||
|
||||
if customWidget.isSaved {
|
||||
Button(action: {
|
||||
UserDefaultsStore.deleteCustomWidget(withUUID: customWidget.uuid)
|
||||
let impactMed = UIImpactFeedbackGenerator(style: .heavy)
|
||||
@@ -299,7 +299,6 @@ struct CreateWidgetView: View {
|
||||
.frame(height: 40)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.background(.orange)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ struct CustomizeView: View {
|
||||
ZStack {
|
||||
theme.currentTheme.secondaryBGColor
|
||||
VStack {
|
||||
Text(String(localized: "settings_view_change_icon"))
|
||||
Text(String(localized: "customize_view_view_change_icon"))
|
||||
.font(.body)
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.padding(.top)
|
||||
@@ -102,7 +102,7 @@ struct CustomizeView: View {
|
||||
ZStack {
|
||||
theme.currentTheme.secondaryBGColor
|
||||
VStack {
|
||||
Text(String(localized: "settings_background_title"))
|
||||
Text(String(localized: "customize_view_background_title"))
|
||||
.font(.body)
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
|
||||
@@ -143,13 +143,9 @@ struct CustomizeView: View {
|
||||
ZStack {
|
||||
theme.currentTheme.secondaryBGColor
|
||||
VStack {
|
||||
Text("Create Custom Widget")
|
||||
Text(String(localized: "customize_view_custom_widget_title"))
|
||||
.font(.body)
|
||||
.foregroundColor(theme.currentTheme.labelColor)
|
||||
.onTapGesture {
|
||||
selectedWidget.fuckingWrapped = CustomWidgetModel.randomWidget
|
||||
selectedWidget.showFuckingSheet = true
|
||||
}
|
||||
.padding(.top)
|
||||
ScrollView(.horizontal) {
|
||||
HStack {
|
||||
@@ -162,7 +158,15 @@ struct CustomizeView: View {
|
||||
selectedWidget.showFuckingSheet = true
|
||||
}
|
||||
}
|
||||
|
||||
RoundedRectangle(cornerRadius: 10).fill().foregroundColor(theme.currentTheme.secondaryBGColor)
|
||||
.frame(width: 50, height: 50)
|
||||
.overlay(
|
||||
Image(systemName: "plus")
|
||||
)
|
||||
.onTapGesture {
|
||||
selectedWidget.fuckingWrapped = CustomWidgetModel.randomWidget
|
||||
selectedWidget.showFuckingSheet = true
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ struct MainTabView: View {
|
||||
Label(String(localized: "content_view_tab_main"), systemImage: "list.dash")
|
||||
}
|
||||
|
||||
HomeViewTwo()
|
||||
MonthView()
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_month"), systemImage: "calendar")
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct HomeViewTwo: View {
|
||||
struct MonthView: 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
|
||||
@@ -37,7 +37,6 @@ struct HomeViewTwo: View {
|
||||
var body: some View {
|
||||
ZStack {
|
||||
if viewModel.hasNoData {
|
||||
settingsButtonView
|
||||
VStack {
|
||||
Spacer()
|
||||
EmptyHomeView(viewModel: viewModel)
|
||||
@@ -46,9 +45,6 @@ struct HomeViewTwo: View {
|
||||
}
|
||||
} else {
|
||||
ScrollView {
|
||||
ZStack {
|
||||
settingsButtonView
|
||||
}
|
||||
LazyVStack(spacing: 5, pinnedViews: [.sectionHeaders]) {
|
||||
ForEach(viewModel.grouped.sorted(by: { $0.key < $1.key }), id: \.key) { year, months in
|
||||
|
||||
@@ -76,6 +72,7 @@ struct HomeViewTwo: View {
|
||||
.edgesIgnoringSafeArea(.top)
|
||||
}
|
||||
}
|
||||
.padding(.top)
|
||||
.background(
|
||||
theme.currentTheme.bg
|
||||
.edgesIgnoringSafeArea(.all)
|
||||
@@ -89,7 +86,7 @@ struct HomeViewTwo: View {
|
||||
}
|
||||
}
|
||||
|
||||
extension HomeViewTwo {
|
||||
extension MonthView {
|
||||
private var topView: some View {
|
||||
VStack {
|
||||
if ShowBasedOnVoteLogics.isMissingCurrentVote(onboardingData: onboardingData.savedOnboardingData) {
|
||||
@@ -126,7 +123,7 @@ extension HomeViewTwo {
|
||||
}
|
||||
|
||||
// view that make up the list body
|
||||
extension HomeViewTwo {
|
||||
extension MonthView {
|
||||
private func homeViewTwoSectionHeaderView(month: Int, year: Int) -> some View {
|
||||
Text("\(Random.monthName(fromMonthInt: month)) \(String(year))")
|
||||
.font(.body)
|
||||
@@ -161,6 +158,6 @@ extension HomeViewTwo {
|
||||
|
||||
struct HomeViewTwo_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
HomeViewTwo()
|
||||
MonthView()
|
||||
}
|
||||
}
|
||||
@@ -53,12 +53,11 @@
|
||||
"settings_view_special_thanks_to_body" = "Special body";
|
||||
"settings_view_why_bg_mode_title" = "What do we use background task for?";
|
||||
"settings_view_why_bg_mode_body" = "We use it to update the database for any missing day. For example: if you rate Monday and Wednesday you'll see that Tuesday will show on the view as missing, and by tapping that row you can then rate the day that is missing. We need a time to search for and add missing days, we do this nightly and while your device is not being used. It's a quick process and doesn't impact battery life.";
|
||||
"settings_view_change_icon" = "Change Icon";
|
||||
"settings_view_show_onboarding" = "Show onboarding";
|
||||
"settings_use_cloudkit_title" = "Use CloudKit";
|
||||
"settings_use_cloudkit_body" = "CloudKit fucking sucks";
|
||||
"settings_use_delete_enable" = "Allow deletion of entry";
|
||||
"settings_background_title" = "What background would you like to use";
|
||||
|
||||
|
||||
"mood_value_great" = "Great";
|
||||
"mood_value_good" = "Good";
|
||||
@@ -74,3 +73,18 @@
|
||||
"share_view_longest_streak_template_title" = "Longest consecutive days I was %@";
|
||||
|
||||
"customize_view_title" = "Make ifeel yours!!!";
|
||||
"customize_view_custom_widget_title" = "Custom Widgets";
|
||||
"customize_view_background_title" = "Pick a theme";
|
||||
"customize_view_view_change_icon" = "Change App Icon";
|
||||
|
||||
"create_widget_view_left_eye" = "Left Eye";
|
||||
"create_widget_view_right_eye" = "Right Eye";
|
||||
"create_widget_view_mouth" = "Mouth";
|
||||
"create_widget_background_color" = "Background";
|
||||
"create_widget_inner_color" = "Inner";
|
||||
"create_widget_face_outline_color" = "Face Outline";
|
||||
"create_widget_view_left_eye_color" = "Left Eye";
|
||||
"create_widget_view_right_eye_color" = "Right Eye";
|
||||
"create_widget_view_mouth_color" = "Mouth";
|
||||
"create_widget_save" = "Save";
|
||||
"create_widget_use" = "Use";
|
||||
|
||||
Reference in New Issue
Block a user