v46: Click domain name to toggle feeds div
This commit is contained in:
+7
-5
@@ -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
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user