Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: complete ldr- prefix migration for remaining selectors in settings.js

LearningCircuit1be63014618f
diff --git a/src/local_deep_research/web/static/js/components/settings.js b/src/local_deep_research/web/static/js/components/settings.js
index 1983e364a1..6d81a4e0a1 100644
--- a/src/local_deep_research/web/static/js/components/settings.js
+++ b/src/local_deep_research/web/static/js/components/settings.js
@@ -113,8 +113,8 @@
const serviceUrlInput = document.getElementById('notifications-service-url') ||
document.querySelector('input[name="notifications.service_url"], textarea[name="notifications.service_url"]');
if (serviceUrlInput) {
- // Find the parent container for the setting
- const settingContainer = serviceUrlInput.closest('.ldr-settings-item');
+ // Find the parent container for the setting
+ const settingContainer = serviceUrlInput.closest('.ldr-settings-item');
if (settingContainer) {
// Check if button container already exists to avoid duplicates
let buttonContainer = settingContainer.querySelector('.ldr-settings-test-button-container');
@@ -647,13 +647,13 @@
}
/**
- * Mark an input as invalid with error styling
- * @param {HTMLElement} input - The input element
- * @param {string|null} errorMessage - The error message or null to clear error
- */
- function markInvalidInput(input, errorMessage) {
- const settingsItem = input.closest('.ldr-settings-item');
- if (!settingsItem) return;
+ * Mark an input as invalid with error styling
+ * @param {HTMLElement} input - The input element
+ * @param {string|null} errorMessage - The error message or null to clear error
+ */
+ function markInvalidInput(input, errorMessage) {
+ const settingsItem = input.closest('.ldr-settings-item');
+ if (!settingsItem) return;
// Clear existing error message
const existingMsg = settingsItem.querySelector('.ldr-settings-error-message');
@@ -746,7 +746,7 @@
if (!parentKey || !property) return;
// Find all controls for this parent JSON
- const controls = document.querySelectorAll(`.json-property-control[data-parent-key="${parentKey}"]`);
+ const controls = document.querySelectorAll(`.ldr-json-property-control[data-parent-key="${parentKey}"]`);
// Create an object to hold the JSON data
const jsonData = {};
@@ -1871,7 +1871,7 @@
}
if (html === '') {
- html = '<div class="empty-state"><p>No settings found for this category</p></div>';
+ html = '<div class="ldr-empty-state"><p>No settings found for this category</p></div>';
}
// Update the content
@@ -2151,8 +2151,8 @@
* @param {Object} jsonObj - The parsed JSON object
* @returns {string} - The HTML for the expanded JSON controls
*/
- function renderExpandedJsonControls(setting, settingId, jsonObj) {
- let html = `
+ function renderExpandedJsonControls(setting, settingId, jsonObj) {
+ let html = `
<div class="ldr-settings-item form-group" data-key="${setting.key}">
<div class="ldr-settings-item-header">
<label for="${settingId}" title="${setting.name}">
@@ -2164,7 +2164,7 @@
value="${JSON.stringify(jsonObj)}">
<div class="ldr-json-property-controls">
- `;
+ `;
// Create individual form controls for each JSON property
for (const key in jsonObj) {
@@ -2190,7 +2190,7 @@
<input type="checkbox"
id="${controlId}"
name="${setting.key}_${key}"
- class="json-property-control ldr-settings-checkbox"
+ class="ldr-json-property-control ldr-settings-checkbox"
data-property="${key}"
data-parent-key="${setting.key}"
data-hidden-fallback="${hiddenFallbackId}"
@@ -2349,7 +2349,7 @@
// Get all controls for this setting
const jsonData = {};
- const controls = document.querySelectorAll(`.json-property-control[data-parent-key="${actualName}"]`);
+ const controls = document.querySelectorAll(`.ldr-json-property-control[data-parent-key="${actualName}"]`);
controls.forEach(control => {
const propName = control.dataset.property;
@@ -2505,7 +2505,7 @@
loadingContainer = sourceElement.closest('.ldr-checkbox-label') || sourceElement;
} else if (sourceElement.classList.contains('ldr-json-property-control')) {
// For JSON property controls, use the property item
- loadingContainer = sourceElement.closest('.json-property-item') || sourceElement;
+ loadingContainer = sourceElement.closest('.ldr-json-property-item') || sourceElement;
} else if (sourceElement.classList.contains('ldr-json-content')) {
// For JSON content, validate it before saving.
if (!validateJsonContent(sourceElement.value)) {
@@ -2787,7 +2787,7 @@
}
if (html === '') {
- html = '<div class="empty-state"><p>No settings found matching your search</p></div>';
+ html = '<div class="ldr-empty-state"><p>No settings found matching your search</p></div>';
}
// Add a container for alerts that will maintain proper positioning
@@ -2879,7 +2879,7 @@
// Update individual controls
for (const prop in jsonData) {
- const control = document.querySelector(`.json-property-control[data-parent-key="${actualName}"][data-property="${prop}"]`);
+ const control = document.querySelector(`.ldr-json-property-control[data-parent-key="${actualName}"][data-property="${prop}"]`);
if (control) {
if (control.type === 'checkbox') {
control.checked = !!jsonData[prop];