add text to day picker

This commit is contained in:
Trey t
2022-04-02 11:06:26 -05:00
parent 291fb11bbb
commit 6cac4e2de0
2 changed files with 22 additions and 15 deletions

View File

@@ -9,6 +9,7 @@ import SwiftUI
struct DayFilterPickerView: View { struct DayFilterPickerView: View {
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system @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
@StateObject private var filteredDays = DaysFilterClass.shared @StateObject private var filteredDays = DaysFilterClass.shared
let weekdays = [("Sun", 1), let weekdays = [("Sun", 1),
@@ -23,6 +24,7 @@ struct DayFilterPickerView: View {
ZStack { ZStack {
theme.currentTheme.secondaryBGColor theme.currentTheme.secondaryBGColor
VStack {
HStack { HStack {
ForEach(weekdays.indices, id: \.self) { dayIdx in ForEach(weekdays.indices, id: \.self) { dayIdx in
let day = String(weekdays[dayIdx].0) let day = String(weekdays[dayIdx].0)
@@ -40,6 +42,10 @@ struct DayFilterPickerView: View {
.foregroundColor(filteredDays.currentFilters.contains(value) ? .green : .red) .foregroundColor(filteredDays.currentFilters.contains(value) ? .green : .red)
} }
} }
Text(String(localized: "day_picker_view_text"))
.padding(.top)
.foregroundColor(textColor)
}
.padding() .padding()
} }
.fixedSize(horizontal: false, vertical: true) .fixedSize(horizontal: false, vertical: true)

View File

@@ -97,3 +97,4 @@
"create_widget_use" = "Use"; "create_widget_use" = "Use";
"month_view_no_data" = "There are no entries to display."; "month_view_no_data" = "There are no entries to display.";
"day_picker_view_text" = "Only shows these days";