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.

News system improvements (#682)

LearningCircuitfc8742091c2b
diff --git a/src/local_deep_research/database/models/news.py b/src/local_deep_research/database/models/news.py
index 48eb4eebce..b4168b3df7 100644
--- a/src/local_deep_research/database/models/news.py
+++ b/src/local_deep_research/database/models/news.py
@@ -140,6 +140,24 @@ class SubscriptionFolder(Base):
is_default = Column(Boolean, default=False)
sort_order = Column(Integer, default=0)
+ def to_dict(self):
+ """Convert folder to dictionary."""
+ return {
+ "id": self.id,
+ "name": self.name,
+ "description": self.description,
+ "color": self.color,
+ "icon": self.icon,
+ "created_at": self.created_at.isoformat()
+ if self.created_at
+ else None,
+ "updated_at": self.updated_at.isoformat()
+ if self.updated_at
+ else None,
+ "is_default": self.is_default,
+ "sort_order": self.sort_order,
+ }
+
class NewsCard(Base):
"""Individual news cards/items"""
diff --git a/src/local_deep_research/database/thread_metrics.py b/src/local_deep_research/database/thread_metrics.py
index ef9f3e4fe8..4d3174fd64 100644
--- a/src/local_deep_research/database/thread_metrics.py
+++ b/src/local_deep_research/database/thread_metrics.py
@@ -41,11 +41,27 @@ class ThreadSafeMetricsWriter:
self._thread_local.passwords[username] = password
@contextmanager
- def get_session(self, username: str) -> Session:
+ def get_session(self, username: str = None) -> Session:
"""
Get a database session for metrics in the current thread.
Creates a new encrypted connection if needed.
+
+ Args:
+ username: The username for database access. If not provided,
+ will attempt to get it from Flask session.
"""
+ # If username not provided, try to get it from Flask session
+ if username is None:
+ try:
+ from flask import session as flask_session
+
+ username = flask_session.get("username")
+ if not username:
+ raise ValueError("No username in Flask session")
+ except (ImportError, RuntimeError) as e:
+ # Flask context not available or no session
+ raise ValueError(f"Cannot determine username: {e}")
+
# Get password for this user in this thread
if not hasattr(self._thread_local, "passwords"):
raise ValueError("No password set for thread metrics access")
diff --git a/src/local_deep_research/news/api.py b/src/local_deep_research/news/api.py
index 5333846b4b..f58f87628e 100644
--- a/src/local_deep_research/news/api.py
+++ b/src/local_deep_research/news/api.py
@@ -1073,23 +1073,165 @@ def delete_subscription(subscription_id: str) -> Dict[str, Any]:
raise SubscriptionDeletionException(subscription_id, str(e))
+def get_votes_for_cards(card_ids: list, user_id: str) -> Dict[str, Any]:
+ """
+ Get vote counts and user's votes for multiple news cards.
+
+ Args:
+ card_ids: List of card IDs to get votes for
+ user_id: User identifier (not used - per-user database)
+
+ Returns:
+ Dictionary with vote information for each card
+ """
+ from flask import session as flask_session
+ from ..database.models.news import UserRating, RatingType
+ from ..database.session_context import get_user_db_session
+
+ try:
+ # Get username from session
+ username = flask_session.get("username")
+ if not username:
+ raise ValueError("No username in session")
+
+ # Get database session
+ with get_user_db_session(username) as db:
+ results = {}
+
+ for card_id in card_ids:
+ # Get user's vote for this card
+ user_vote = (
+ db.query(UserRating)
+ .filter_by(
+ card_id=card_id, rating_type=RatingType.RELEVANCE
+ )
+ .first()
+ )
+
+ # Count total votes for this card
+ upvotes = (
+ db.query(UserRating)
+ .filter_by(
+ card_id=card_id,
+ rating_type=RatingType.RELEVANCE,
+ rating_value="up",
+ )
+ .count()
+ )
+
+ downvotes = (
+ db.query(UserRating)
+ .filter_by(
+ card_id=card_id,
+ rating_type=RatingType.RELEVANCE,
+ rating_value="down",
+ )
+ .count()
+ )
+
+ results[card_id] = {
+ "upvotes": upvotes,
+ "downvotes": downvotes,
+ "user_vote": user_vote.rating_value if user_vote else None,
+ }
+
+ return {"success": True, "votes": results}
+
+ except Exception:
+ logger.exception("Error getting votes for cards")
+ raise
+
+
def submit_feedback(card_id: str, user_id: str, vote: str) -> Dict[str, Any]:
"""
Submit feedback (vote) for a news card.
Args:
card_id: ID of the news card
- user_id: User identifier
+ user_id: User identifier (not used - per-user database)
vote: "up" or "down"
Returns:
Dictionary with updated vote counts
"""
- # TODO: Implement with per-user database for ratings
- logger.warning(
- "submit_feedback not yet implemented with per-user databases"
- )
- raise NotImplementedException("submit_feedback")
+ from flask import session as flask_session
+ from sqlalchemy_utc import utcnow
+ from ..database.models.news import UserRating, RatingType
+ from ..database.session_context import get_user_db_session
+
+ try:
+ # Validate vote value
+ if vote not in ["up", "down"]:
+ raise ValueError(f"Invalid vote type: {vote}")
+
+ # Get username from session
+ username = flask_session.get("username")
+ if not username:
+ raise ValueError("No username in session")
+
+ # Get database session
+ with get_user_db_session(username) as db:
+ # We don't check if the card exists in the database since news items
+ # are generated dynamically and may not be stored as NewsCard entries
+
+ # Check if user already voted on this card
+ existing_rating = (
+ db.query(UserRating)
+ .filter_by(card_id=card_id, rating_type=RatingType.RELEVANCE)
+ .first()
+ )
+
+ if existing_rating:
+ # Update existing vote
+ existing_rating.rating_value = vote
+ existing_rating.created_at = utcnow()
+ else:
+ # Create new rating
+ new_rating = UserRating(
+ card_id=card_id,
+ rating_type=RatingType.RELEVANCE,
+ rating_value=vote,
+ )
+ db.add(new_rating)
+
+ db.commit()
+
+ # Count total votes for this card
+ upvotes = (
+ db.query(UserRating)
+ .filter_by(
+ card_id=card_id,
+ rating_type=RatingType.RELEVANCE,
+ rating_value="up",
+ )
+ .count()
+ )
+
+ downvotes = (
+ db.query(UserRating)
+ .filter_by(
+ card_id=card_id,
+ rating_type=RatingType.RELEVANCE,
+ rating_value="down",
+ )
+ .count()
+ )
+
+ logger.info(
+ f"Feedback submitted for card {card_id}: {vote} (up: {upvotes}, down: {downvotes})"
+ )
+
+ return {
+ "success": True,
+ "card_id": card_id,
+ "vote": vote,
+ "upvotes": upvotes,
+ "downvotes": downvotes,
+ }
+
+ except Exception:
+ logger.exception(f"Error submitting feedback for card {card_id}")
+ raise
def research_news_item(card_id: str, depth: str = "quick") -> Dict[str, Any]:
diff --git a/src/local_deep_research/news/flask_api.py b/src/local_deep_research/news/flask_api.py
index 52b3e8f660..fd13ea0ea8 100644
--- a/src/local_deep_research/news/flask_api.py
+++ b/src/local_deep_research/news/flask_api.py
@@ -254,6 +254,41 @@ def vote_on_news() -> Dict[str, Any]:
return jsonify({"error": safe_error_message(e, "submitting vote")}), 500
+@news_api_bp.route("/feedback/batch", methods=["POST"])
+@login_required
+def get_batch_feedback() -> Dict[str, Any]:
+ """
+ Get feedback (votes) for multiple news cards.
+ JSON body:
+ card_ids: List of card IDs
+ """
+ try:
+ data = request.get_json()
+ if not data:
+ return jsonify({"error": "No JSON data provided"}), 400
+
+ card_ids = data.get("card_ids", [])
+ if not card_ids:
+ return jsonify({"votes": {}})
+
+ # Get current user
+ user_id = get_user_id()
+
+ # Call the direct API function
+ result = api.get_votes_for_cards(card_ids=card_ids, user_id=user_id)
+
+ return jsonify(result)
+
+ except ValueError as e:
+ error_msg = str(e)
+ if "not found" in error_msg.lower():
+ return jsonify({"error": "Resource not found"}), 404
+ return jsonify({"error": safe_error_message(e, "getting votes")}), 400
+ except Exception as e:
+ logger.exception("Error getting batch feedback")
+ return jsonify({"error": safe_error_message(e, "getting votes")}), 500
+
+
@news_api_bp.route("/feedback/<card_id>", methods=["POST"])
@login_required
def submit_feedback(card_id: str) -> Dict[str, Any]:
@@ -355,6 +390,14 @@ def get_current_user_subscriptions() -> Dict[str, Any]:
def get_subscription(subscription_id: str) -> Dict[str, Any]:
"""Get a single subscription by ID."""
try:
+ # Handle null or invalid subscription IDs
+ if (
+ subscription_id == "null"
+ or subscription_id == "undefined"
+ or not subscription_id
+ ):
+ return jsonify({"error": "Invalid subscription ID"}), 400
+
# Get the subscription
subscription = api.get_subscription(subscription_id)
@@ -1111,7 +1154,6 @@ def get_folders():
def create_folder():
"""Create a new folder"""
try:
- user_id = get_user_id()
data = request.json
if not data.get("name"):
@@ -1123,14 +1165,13 @@ def create_folder():
# Check if folder already exists
existing = (
session.query(SubscriptionFolder)
- .filter_by(user_id=user_id, name=data["name"])
+ .filter_by(name=data["name"])
.first()
)
if existing:
return jsonify({"error": "Folder already exists"}), 409
folder = manager.create_folder(
- user_id=user_id,
name=data["name"],
description=data.get("description"),
)
@@ -1355,7 +1396,9 @@ def add_search_history():
return jsonify({"error": "Authentication required"}), 401
data = request.get_json()
+ logger.info(f"add_search_history received data: {data}")
if not data or not data.get("query"):
+ logger.warning(f"Invalid search history data: {data}")
return jsonify({"error": "query is required"}), 400
# Add to user's encrypted database
@@ -1379,6 +1422,7 @@ def add_search_history():
return jsonify({"status": "success", "id": search_history.id})
except Exception as e:
+ logger.exception("Error adding search history")
return jsonify(
{"error": safe_error_message(e, "adding search history")}
), 500
diff --git a/src/local_deep_research/news/folder_manager.py b/src/local_deep_research/news/folder_manager.py
index 68fdb78c14..43485ae9fe 100644
--- a/src/local_deep_research/news/folder_manager.py
+++ b/src/local_deep_research/news/folder_manager.py
@@ -28,9 +28,9 @@ class FolderManager:
)
def create_folder(
- self, user_id: str, name: str, description: Optional[str] = None
+ self, name: str, description: Optional[str] = None
) -> SubscriptionFolder:
- """Create a new folder (user_id parameter kept for API compatibility)."""
+ """Create a new folder."""
import uuid
folder = SubscriptionFolder(
diff --git a/src/local_deep_research/web/static/js/pages/news.js b/src/local_deep_research/web/static/js/pages/news.js
index cac3c3bdc6..97059ba6c1 100644
--- a/src/local_deep_research/web/static/js/pages/news.js
+++ b/src/local_deep_research/web/static/js/pages/news.js
@@ -173,7 +173,6 @@ async function initializeNewsPage() {
// Update visit time when leaving page
window.addEventListener('beforeunload', () => {
saveVisitTracking();
- saveSearchHistory();
saveReadStatus();
});
}
@@ -328,12 +327,14 @@ async function handleSearchSubmit(e) {
}
const query = document.getElementById('news-search').value.trim();
+ // If empty query, reset the filter and show all news
if (!query) {
- showAlert('Please enter a search query', 'warning');
+ // Clear any existing filter
+ await loadNewsFeed();
return;
}
- // Add to search history
+ // Add to search history only for non-empty queries
addToSearchHistory(query, 'filter');
// Always filter the current results
@@ -720,7 +721,7 @@ async function loadNewsFeed(focus = null) {
// Apply client-side filtering if focus is provided
if (focus) {
const searchTerm = focus.toLowerCase();
- newsItems = newsItems.filter(item => {
+ const filteredItems = newsItems.filter(item => {
const headline = (item.headline || '').toLowerCase();
const summary = (item.summary || '').toLowerCase();
const query = (item.query || '').toLowerCase();
@@ -731,12 +732,18 @@ async function loadNewsFeed(focus = null) {
query.includes(searchTerm) ||
topics.includes(searchTerm);
});
- console.log(`Filtered to ${newsItems.length} items matching "${focus}"`);
+ console.log(`Filtered to ${filteredItems.length} items matching "${focus}"`);
+
+ // Update newsItems with filtered results (even if empty)
+ newsItems = filteredItems;
}
renderNewsItems(focus);
extractTrendingTopics();
updateBulkActionsBar();
+
+ // Load existing votes for all news items
+ await loadVotesForNewsItems();
} else {
console.error('Failed to load news feed. Status:', response.status);
const errorText = await response.text();
@@ -1061,6 +1068,59 @@ function getImpactClass(score) {
return 'impact-low';
}
+// Load existing votes for all displayed news items
+async function loadVotesForNewsItems() {
+ if (!newsItems || newsItems.length === 0) return;
+
+ try {
+ const cardIds = newsItems.map(item => item.id);
+ const response = await fetch('/news/api/feedback/batch', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'X-CSRFToken': getCSRFToken()
+ },
+ body: JSON.stringify({
+ card_ids: cardIds
+ })
+ });
+
+ if (response.ok) {
+ const data = await response.json();
+ if (data.votes) {
+ // Update UI with vote counts and user's votes
+ for (const [cardId, voteInfo] of Object.entries(data.votes)) {
+ const item = document.querySelector(`[data-news-id="${cardId}"]`);
+ if (item) {
+ const upBtn = item.querySelector('.vote-btn:first-child');
+ const downBtn = item.querySelector('.vote-btn:last-child');
+
+ if (upBtn && downBtn) {
+ // Update vote counts
+ upBtn.innerHTML = `<i class="fas fa-thumbs-up"></i> ${voteInfo.upvotes || 0}`;
+ downBtn.innerHTML = `<i class="fas fa-thumbs-down"></i> ${voteInfo.downvotes || 0}`;
+
+ // Show user's existing vote
+ if (voteInfo.user_vote === 'up') {
+ upBtn.classList.add('voted');
+ downBtn.classList.remove('voted');
+ } else if (voteInfo.user_vote === 'down') {
+ downBtn.classList.add('voted');
+ upBtn.classList.remove('voted');
+ } else {
+ upBtn.classList.remove('voted');
+ downBtn.classList.remove('voted');
+ }
+ }
+ }
+ }
+ }
+ }
+ } catch (error) {
+ console.error('Error loading votes:', error);
+ }
+}
+
// Vote on news item
async function vote(newsId, voteType) {
try {
@@ -1969,7 +2029,7 @@ function updateRefreshIndicator() {
// Update auto-refresh label
const autoRefreshLabel = document.querySelector('label[for="auto-refresh"]');
if (autoRefreshLabel) {
- autoRefreshLabel.textContent = `Auto-refresh feed (${countdownText})`;
+ autoRefreshLabel.innerHTML = `<i class="bi bi-arrow-clockwise"></i> Auto-refresh (${countdownText})`;
}
}
}
@@ -2299,24 +2359,57 @@ function saveNewsAnalysis(researchId) {
showAlert('Analysis saved for later', 'success');
}
+// Helper function to get CSRF token
+function getCSRFToken() {
+ // Try to get from meta tag first
+ const token = document.querySelector('meta[name="csrf-token"]');
+ if (token) return token.content;
+
+ // Try to get from cookie
+ const cookies = document.cookie.split(';');
+ for (let cookie of cookies) {
+ const [name, value] = cookie.trim().split('=');
+ if (name === 'csrf_token') return decodeURIComponent(value);
+ }
+ return '';
+}
+
// Search history functions
async function loadSearchHistory() {
try {
- const response = await fetch('/news/api/search-history');
+ console.log('Loading search history from /news/api/search-history');
+ const response = await fetch('/news/api/search-history', {
+ method: 'GET',
+ credentials: 'same-origin',
+ headers: {
+ 'Accept': 'application/json',
+ 'X-CSRFToken': getCSRFToken()
+ }
+ });
console.log('Search history response status:', response.status);
+ console.log('Search history response headers:', response.headers);
+
if (response.ok) {
const data = await response.json();
console.log('Search history data:', data);
searchHistory = data.search_history || [];
displayRecentSearches();
- } else if (response.status === 401) {
- // User not authenticated, no history to show
+ } else if (response.status === 401 || response.status === 302) {
+ // User not authenticated or redirected to login
+ console.log('User not authenticated for search history');
+ searchHistory = [];
+ displayRecentSearches();
+ } else {
+ console.error('Unexpected response status:', response.status);
+ const text = await response.text();
+ console.error('Response text:', text);
searchHistory = [];
displayRecentSearches();
}
} catch (e) {
console.error('Failed to load search history:', e);
searchHistory = [];
+ displayRecentSearches();
}
}
@@ -2325,7 +2418,11 @@ async function saveSearchHistory(query, type, resultCount) {
console.log('Saving search history:', { query, type, resultCount });
const response = await fetch('/news/api/search-history', {
method: 'POST',
- headers: { 'Content-Type': 'application/json' },
+ headers: {
+ 'Content-Type': 'application/json',
+ 'X-CSRFToken': getCSRFToken()
+ },
+ credentials: 'same-origin',
body: JSON.stringify({
query: query,
type: type,
@@ -2391,7 +2488,11 @@ async function clearSearchHistory() {
try {
const response = await fetch('/news/api/search-history', {
- method: 'DELETE'
+ method: 'DELETE',
+ credentials: 'same-origin',
+ headers: {
+ 'X-CSRFToken': getCSRFToken()
+ }
});
if (response.ok) {
diff --git a/src/local_deep_research/web/templates/pages/news.html b/src/local_deep_research/web/templates/pages/news.html
index c10766b222..ac46be2d28 100644
--- a/src/local_deep_research/web/templates/pages/news.html
+++ b/src/local_deep_research/web/templates/pages/news.html
@@ -4,6 +4,7 @@
{% block title %}LDR News - AI-Powered Research Feed{% endblock %}
{% block extra_head %}
+<meta name="csrf-token" content="{{ csrf_token() }}">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" integrity="sha384-EvBWSlnoFgZlXJvpzS+MAUEjvN7+gcCwH+qh7GRFOGgZO0PuwOFro7qPOJnLfe7l" crossorigin="anonymous">
<link rel="stylesheet" href="{{ url_for('research.serve_static', path='css/custom_dropdown.css') }}">
@@ -58,9 +59,12 @@
<a href="/news/subscriptions" class="btn btn-outline-secondary">
<i class="bi bi-bell"></i> Manage Subscriptions
</a>
- <button class="btn btn-outline-secondary" data-bs-toggle="modal" data-bs-target="#settingsModal">
- <i class="bi bi-gear"></i> Settings
- </button>
+ <div class="form-check form-switch d-inline-block ms-3">
+ <input class="form-check-input" type="checkbox" id="auto-refresh" checked>
+ <label class="form-check-label" for="auto-refresh">
+ <i class="bi bi-arrow-clockwise"></i> Auto-refresh
+ </label>
+ </div>
</div>
</div>
@@ -80,7 +84,7 @@
</div>
<div class="time-filter-group">
- <button class="filter-btn active" data-time="today">Today</button>
+ <button class="filter-btn" data-time="today">Today</button>
<button class="filter-btn" data-time="week">This Week</button>
<button class="filter-btn" data-time="month">This Month</button>
</div>
@@ -170,67 +174,6 @@
</div>
-<!-- Settings Modal -->
-<div class="modal fade" id="settingsModal" tabindex="-1">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title"><i class="bi bi-gear"></i> News Feed Settings</h5>
- <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
- </div>
- <div class="modal-body">
- <form id="settings-form">
- <div class="mb-3">
- <label class="form-label">Update Frequency</label>
- <select class="form-select" id="update-frequency">
- <option value="15">Every 15 minutes</option>
- <option value="30">Every 30 minutes</option>
- <option value="60">Every hour</option>
- <option value="180">Every 3 hours</option>
- </select>
- </div>
-
- <div class="mb-3">
- <label class="form-label">Default Time Range</label>
- <select class="form-select" id="default-time-range">
- <option value="today">Today</option>
- <option value="week">This Week</option>
- <option value="month">This Month</option>
- </select>
- </div>
-
- <div class="mb-3">
- <label class="form-label">Minimum Impact Score</label>
- <input type="range" class="form-range" min="0" max="10" value="0" id="min-impact-score">
- <span id="impact-score-value">0</span>
- </div>
-
- <div class="mb-3">
- <div class="form-check">
- <input class="form-check-input" type="checkbox" id="show-summaries" checked>
- <label class="form-check-label" for="show-summaries">
- Show article summaries
- </label>
- </div>
- </div>
-
- <div class="mb-3">
- <div class="form-check">
- <input class="form-check-input" type="checkbox" id="auto-refresh" checked>
- <label class="form-check-label" for="auto-refresh">
- Auto-refresh feed
- </label>
- </div>
- </div>
- </form>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-primary" id="save-settings-btn">Save Settings</button>
- </div>
- </div>
- </div>
-</div>
<!-- Subscriptions Modal -->
<div class="modal fade" id="subscriptionsModal" tabindex="-1">
diff --git a/src/local_deep_research/web/templates/pages/news_cleaned.html b/src/local_deep_research/web/templates/pages/news_cleaned.html
index 75674b7575..885bd35dc5 100644
--- a/src/local_deep_research/web/templates/pages/news_cleaned.html
+++ b/src/local_deep_research/web/templates/pages/news_cleaned.html
@@ -37,9 +37,12 @@
<button class="btn btn-outline-secondary" data-bs-toggle="modal" data-bs-target="#subscriptionsModal">
<i class="bi bi-bell"></i> Manage Subscriptions
</button>
- <button class="btn btn-outline-secondary" data-bs-toggle="modal" data-bs-target="#settingsModal">
- <i class="bi bi-gear"></i> Settings
- </button>
+ <div class="form-check form-switch d-inline-block ms-3">
+ <input class="form-check-input" type="checkbox" id="auto-refresh" checked>
+ <label class="form-check-label" for="auto-refresh">
+ <i class="bi bi-arrow-clockwise"></i> Auto-refresh
+ </label>
+ </div>
</div>
</div>
@@ -148,67 +151,6 @@
</div>
</div>
-<!-- Settings Modal -->
-<div class="modal fade" id="settingsModal" tabindex="-1">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title"><i class="bi bi-gear"></i> News Feed Settings</h5>
- <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
- </div>
- <div class="modal-body">
- <form id="settings-form">
- <div class="mb-3">
- <label class="form-label">Update Frequency</label>
- <select class="form-select" id="update-frequency">
- <option value="15">Every 15 minutes</option>
- <option value="30">Every 30 minutes</option>
- <option value="60">Every hour</option>
- <option value="180">Every 3 hours</option>
- </select>
- </div>
-
- <div class="mb-3">
- <label class="form-label">Default Time Range</label>
- <select class="form-select" id="default-time-range">
- <option value="today">Today</option>
- <option value="week">This Week</option>
- <option value="month">This Month</option>
- </select>
- </div>
-
- <div class="mb-3">
- <label class="form-label">Minimum Impact Score</label>
- <input type="range" class="form-range" min="0" max="10" value="0" id="min-impact-score">
- <span id="impact-score-value">0</span>
- </div>
-
- <div class="mb-3">
- <div class="form-check">
- <input class="form-check-input" type="checkbox" id="show-summaries" checked>
- <label class="form-check-label" for="show-summaries">
- Show article summaries
- </label>
- </div>
- </div>
-
- <div class="mb-3">
- <div class="form-check">
- <input class="form-check-input" type="checkbox" id="auto-refresh" checked>
- <label class="form-check-label" for="auto-refresh">
- Auto-refresh feed
- </label>
- </div>
- </div>
- </form>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-primary" id="save-settings-btn">Save Settings</button>
- </div>
- </div>
- </div>
-</div>
<!-- Add marked.js for markdown rendering -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/4.0.2/marked.min.js" integrity="sha384-pF+2qz7eFoUyrCTPr8gVboYJ7fNpmJKJzl0vPX6w3XDML+Of8bMSyd6fZIRJdwo7" crossorigin="anonymous"></script>