v48: domain name links to site, spacer toggles feeds
This commit is contained in:
+9
-12
@@ -97,19 +97,16 @@ function initDashboard() {
|
||||
// Status buttons (pass/hold/skip + fail indicator if error)
|
||||
html += renderStatusBtns(status, 'domain', d.host, hasError ? 'error' : null);
|
||||
|
||||
// Domain name (clickable to show feeds)
|
||||
html += `<span class="domain-name" style="color: #0af; cursor: pointer;">${escapeHtml(d.host)}</span>`;
|
||||
// Domain name (links to site)
|
||||
html += `<a class="domain-name" href="https://${escapeHtml(d.host)}" target="_blank" style="color: #0af; text-decoration: none;">${escapeHtml(d.host)}</a>`;
|
||||
|
||||
// Error message
|
||||
// Spacer (clickable to toggle feeds)
|
||||
if (d.last_error) {
|
||||
html += `<span style="color: #f66; margin-left: 10px; font-size: 11px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;" title="${escapeHtml(d.last_error)}">${escapeHtml(d.last_error)}</span>`;
|
||||
html += `<span class="domain-spacer" style="color: #f66; margin-left: 10px; font-size: 11px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;" title="${escapeHtml(d.last_error)}">${escapeHtml(d.last_error)}</span>`;
|
||||
} else {
|
||||
html += '<span style="flex: 1;"></span>';
|
||||
html += '<span class="domain-spacer" style="flex: 1; cursor: pointer;"></span>';
|
||||
}
|
||||
|
||||
// External link
|
||||
html += `<a href="https://${escapeHtml(d.host)}" target="_blank" style="color: #666; margin-left: 8px; text-decoration: none;" title="Visit site">↗</a>`;
|
||||
|
||||
// Drop button (only for skipped domains)
|
||||
if (status === 'skip') {
|
||||
html += `<button class="drop-btn" data-host="${escapeHtml(d.host)}"
|
||||
@@ -276,11 +273,11 @@ function initDashboard() {
|
||||
const row = block.querySelector('.domain-row');
|
||||
const host = block.dataset.host;
|
||||
|
||||
// Click domain name to toggle inline feeds
|
||||
const domainName = row.querySelector('.domain-name');
|
||||
// Click spacer area to toggle inline feeds
|
||||
const domainSpacer = row.querySelector('.domain-spacer');
|
||||
const feedsDiv = block.querySelector('.domain-feeds');
|
||||
if (domainName && feedsDiv) {
|
||||
domainName.addEventListener('click', () => {
|
||||
if (domainSpacer && feedsDiv) {
|
||||
domainSpacer.addEventListener('click', () => {
|
||||
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;">v47</div>
|
||||
<div style="color: #333; font-size: 11px; margin-top: 10px;">v48</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