special thanks and why bg mode will expand to show explanation when tapped
This commit is contained in:
@@ -15,6 +15,9 @@ struct SettingsView: View {
|
||||
|
||||
@State private var showOnboarding = false
|
||||
|
||||
@State private var showSpecialThanks = false
|
||||
@State private var showWhyBGMode = false
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Color(UIColor.secondarySystemBackground)
|
||||
@@ -22,15 +25,16 @@ struct SettingsView: View {
|
||||
VStack {
|
||||
closeButtonView
|
||||
.padding()
|
||||
randomShitCell
|
||||
addTestDataCell
|
||||
clearDB
|
||||
whyBackgroundMode
|
||||
changeIcon
|
||||
showOnboardingButton
|
||||
whyBackgroundMode
|
||||
specialThanksCell
|
||||
Spacer()
|
||||
}
|
||||
.padding()
|
||||
|
||||
}.sheet(isPresented: $showOnboarding) {
|
||||
OnboardingMain(onboardingData: UserDefaultsStore.getOnboarding(),
|
||||
updateBoardingDataClosure: { onboardingData in
|
||||
@@ -38,6 +42,7 @@ struct SettingsView: View {
|
||||
showOnboarding = false
|
||||
})
|
||||
}
|
||||
.ignoresSafeArea()
|
||||
}
|
||||
|
||||
private var closeButtonView: some View {
|
||||
@@ -53,16 +58,23 @@ struct SettingsView: View {
|
||||
}
|
||||
}
|
||||
|
||||
private var randomShitCell: some View {
|
||||
private var specialThanksCell: some View {
|
||||
ZStack {
|
||||
Color(UIColor.systemBackground)
|
||||
VStack {
|
||||
Button(action: {
|
||||
|
||||
withAnimation{
|
||||
showSpecialThanks.toggle()
|
||||
}
|
||||
}, label: {
|
||||
Text(String(localized: "settings_view_special_thanks_to"))
|
||||
Text(String(localized: "settings_view_special_thanks_to_title"))
|
||||
})
|
||||
.padding()
|
||||
|
||||
if showSpecialThanks {
|
||||
Text(String(localized: "settings_view_special_thanks_to_body"))
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
@@ -102,8 +114,20 @@ struct SettingsView: View {
|
||||
private var whyBackgroundMode: some View {
|
||||
ZStack {
|
||||
Color(UIColor.systemBackground)
|
||||
Text(String(localized: "settings_view_why_bg_mode"))
|
||||
.padding()
|
||||
VStack {
|
||||
Button(action: {
|
||||
withAnimation{
|
||||
showWhyBGMode.toggle()
|
||||
}
|
||||
}, label: {
|
||||
Text(String(localized: "settings_view_why_bg_mode_title"))
|
||||
})
|
||||
.padding()
|
||||
if showWhyBGMode {
|
||||
Text(String(localized: "settings_view_why_bg_mode_body"))
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous))
|
||||
|
||||
Reference in New Issue
Block a user