v46: Click domain name to toggle feeds div

This commit is contained in:
primal
2026-01-30 16:29:05 -05:00
parent cf34db1e6c
commit 97051f3967
2 changed files with 8 additions and 6 deletions
+7 -5
View File
@@ -120,9 +120,9 @@ function initDashboard() {
html += '</div>';
// Feeds under this domain
// Feeds under this domain (hidden by default, toggled by clicking domain name)
if (d.feeds && d.feeds.length > 0) {
html += '<div class="domain-feeds" style="margin-left: 20px; border-left: 2px solid #333; padding-left: 10px;">';
html += '<div class="domain-feeds" style="display: none; margin-left: 20px; border-left: 2px solid #333; padding-left: 10px;">';
d.feeds.forEach(f => {
const feedStatus = f.publish_status || 'hold';
const feedHasError = f.status === 'error' || f.status === 'dead';
@@ -276,11 +276,13 @@ function initDashboard() {
const row = block.querySelector('.domain-row');
const host = block.dataset.host;
// Click domain name to show feeds detail view
// Click domain name to toggle inline feeds
const domainName = row.querySelector('.domain-name');
if (domainName) {
const feedsDiv = block.querySelector('.domain-feeds');
if (domainName && feedsDiv) {
domainName.addEventListener('click', () => {
showDomainFeeds(host);
const isVisible = feedsDiv.style.display !== 'none';
feedsDiv.style.display = isVisible ? 'none' : 'block';
});
}
+1 -1
View File
@@ -534,7 +534,7 @@ const dashboardHTML = `<!DOCTYPE html>
<div id="output"></div>
</div>
<div style="color: #333; font-size: 11px; margin-top: 10px;">v45</div>
<div style="color: #333; font-size: 11px; margin-top: 10px;">v46</div>
<div class="updated" id="updatedAt">Last updated: {{.UpdatedAt.Format "2006-01-02 15:04:05"}}</div>
</body>