diff options
| author | Fuwn <[email protected]> | 2026-03-22 13:20:36 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-22 13:20:36 +0000 |
| commit | 2b62f719849cce5dd43fef1b679fff3a2243fcdf (patch) | |
| tree | cf49424478aa71fcfb8a94b9af4a7b3b01f49908 /Sora/Views/Settings | |
| parent | perf: cache danbooru page token floor and reuse search-history payloads (diff) | |
| download | sora-testing-2b62f719849cce5dd43fef1b679fff3a2243fcdf.tar.xz sora-testing-2b62f719849cce5dd43fef1b679fff3a2243fcdf.zip | |
feat: add configurable booru user agent settings
Diffstat (limited to 'Sora/Views/Settings')
| -rw-r--r-- | Sora/Views/Settings/Section/SettingsSectionProviderView.swift | 13 |
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", |