Add explanations to some settings

This commit is contained in:
Thomas Ricouard 2024-09-19 09:30:31 +02:00
parent b19a5706e2
commit 7eeaf4d902
2 changed files with 33 additions and 5 deletions

View file

@ -39,6 +39,7 @@ struct SettingsTabs: View {
accountsSection
generalSection
otherSections
AISection
cacheSection
}
.scrollContentBackground(.hidden)
@ -228,9 +229,6 @@ struct SettingsTabs: View {
}
.disabled(preferences.preferredBrowser != PreferredBrowser.inAppSafari)
#endif
Toggle(isOn: $preferences.isOpenAIEnabled) {
Label("settings.other.hide-openai", systemImage: "faxmachine")
}
Toggle(isOn: $preferences.isSocialKeyboardEnabled) {
Label("settings.other.social-keyboard", systemImage: "keyboard")
}
@ -249,6 +247,23 @@ struct SettingsTabs: View {
.listRowBackground(theme.primaryBackgroundColor)
#endif
}
@ViewBuilder
private var AISection: some View {
@Bindable var preferences = preferences
Section {
Toggle(isOn: $preferences.isOpenAIEnabled) {
Label("settings.other.hide-openai", systemImage: "faxmachine")
}
} header: {
Text("AI")
} footer: {
Text("Disable to hide AI assisted tools options such as copywritting and alt image description generated from AI. Use OpenAI API. See our Privacy Policy for more information.")
}
#if !os(visionOS)
.listRowBackground(theme.primaryBackgroundColor)
#endif
}
private var appSection: some View {
Section {
@ -340,7 +355,7 @@ struct SettingsTabs: View {
}
private var cacheSection: some View {
Section("settings.section.cache") {
Section {
if cachedRemoved {
Text("action.done")
.transition(.move(edge: .leading))
@ -352,6 +367,10 @@ struct SettingsTabs: View {
}
}
}
} header: {
Text("settings.section.cache")
} footer: {
Text("Remove all cached images and videos")
}
#if !os(visionOS)
.listRowBackground(theme.primaryBackgroundColor)

View file

@ -20436,6 +20436,9 @@
}
}
}
},
"AI" : {
},
"alert.button.ok" : {
"localizations" : {
@ -23839,6 +23842,9 @@
}
}
}
},
"Disable to hide AI assisted tools options such as copywritting and alt image description generated from AI. Use OpenAI API. See our Privacy Policy for more information." : {
},
"enum.avatar-position.leading" : {
"comment" : "MARK: Enums",
@ -42331,6 +42337,9 @@
}
}
}
},
"Remove all cached images and videos" : {
},
"report.action.send" : {
"localizations" : {
@ -83960,4 +83969,4 @@
}
},
"version" : "1.0"
}
}