everything changed

This commit is contained in:
Trey t
2022-02-20 14:33:58 -06:00
parent 1cf38cb854
commit 0035f61204
50 changed files with 2155 additions and 875 deletions

View File

@@ -28,7 +28,8 @@ struct SwitchableView: View {
let daysBack: Int
@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
init(daysBack: Int, viewType: Binding<MainSwitchableViewType>, headerTypeChanged: @escaping ((MainSwitchableViewType) -> Void)) {
self.daysBack = daysBack
self.headerTypeChanged = headerTypeChanged
@@ -40,7 +41,7 @@ struct SwitchableView: View {
ZStack {
switch viewType {
case .total:
HeaderStatsView(fakeData: false, backDays: daysBack)
HeaderStatsView(fakeData: false, backDays: daysBack, moodTint: moodTint)
.padding([.leading, .trailing], -15)
.padding([.top, .bottom], 8)
.allowsHitTesting(false)
@@ -75,7 +76,7 @@ struct SwitchableView: View {
.padding(.top, -12)
}
.background(
Color(theme.currentTheme.secondaryBGColor)
theme.currentTheme.secondaryBGColor
)
.contentShape(Rectangle())
.cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])