add text to day picker
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|||||||
Reference in New Issue
Block a user