mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWebView+RequestServer: Add some UI for DNS settings
This commit is contained in:
committed by
Tim Flynn
parent
e1369aa7d6
commit
2c13504bfc
Notes:
github-actions[bot]
2025-04-22 22:06:21 +00:00
Author: https://github.com/alimpfard Commit: https://github.com/LadybirdBrowser/ladybird/commit/2c13504bfc2 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4278 Reviewed-by: https://github.com/trflynn89 ✅
@@ -63,6 +63,10 @@ void SettingsUI::register_interfaces()
|
||||
register_interface("setDoNotTrack"sv, [this](auto const& data) {
|
||||
set_do_not_track(data);
|
||||
});
|
||||
|
||||
register_interface("setDNSSettings"sv, [this](auto const& data) {
|
||||
set_dns_settings(data);
|
||||
});
|
||||
}
|
||||
|
||||
void SettingsUI::load_current_settings()
|
||||
@@ -263,4 +267,9 @@ void SettingsUI::set_do_not_track(JsonValue const& do_not_track)
|
||||
WebView::Application::settings().set_do_not_track(do_not_track.as_bool() ? DoNotTrack::Yes : DoNotTrack::No);
|
||||
}
|
||||
|
||||
void SettingsUI::set_dns_settings(JsonValue const& dns_settings)
|
||||
{
|
||||
Application::settings().set_dns_settings(Settings::parse_dns_settings(dns_settings));
|
||||
load_current_settings();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user