summaryrefslogtreecommitdiff
path: root/Sora/Views/Settings/Section/SettingsSectionProviderView.swift
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-03-22 13:20:36 +0000
committerFuwn <[email protected]>2026-03-22 13:20:36 +0000
commit2b62f719849cce5dd43fef1b679fff3a2243fcdf (patch)
treecf49424478aa71fcfb8a94b9af4a7b3b01f49908 /Sora/Views/Settings/Section/SettingsSectionProviderView.swift
parentperf: cache danbooru page token floor and reuse search-history payloads (diff)
downloadsora-testing-2b62f719849cce5dd43fef1b679fff3a2243fcdf.tar.xz
sora-testing-2b62f719849cce5dd43fef1b679fff3a2243fcdf.zip
feat: add configurable booru user agent settings
Diffstat (limited to 'Sora/Views/Settings/Section/SettingsSectionProviderView.swift')
-rw-r--r--Sora/Views/Settings/Section/SettingsSectionProviderView.swift13
1 files changed, 13 insertions, 0 deletions
diff --git a/Sora/Views/Settings/Section/SettingsSectionProviderView.swift b/Sora/Views/Settings/Section/SettingsSectionProviderView.swift
index cbfae37..031840a 100644
--- a/Sora/Views/Settings/Section/SettingsSectionProviderView.swift
+++ b/Sora/Views/Settings/Section/SettingsSectionProviderView.swift
@@ -26,6 +26,19 @@ struct SettingsSectionProviderView: View {
Toggle("Show Held Posts", isOn: $settings.showHeldMoebooruPosts)
}
+ Section(header: Text("User-Agent")) {
+ Toggle("Send User-Agent", isOn: $settings.sendBooruUserAgent)
+
+ if settings.sendBooruUserAgent {
+ TextField("Custom User-Agent", text: $settings.customBooruUserAgent)
+ .autocorrectionDisabled(true)
+
+ Text("Leave this field empty to use Sora's default User-Agent.")
+ .font(.caption)
+ .foregroundStyle(.secondary)
+ }
+ }
+
Section(header: Text("API Credentials")) {
SecureField(
"API Key",