mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-08-28 20:08:19 +00:00
Fix: branding changes apply in real-time
Site name updates nav bar text + document title as you type. Logo URL updates the nav brand icon. Favicon URL updates the browser tab icon.
This commit is contained in:
@@ -520,6 +520,23 @@
|
||||
if (parts.length === 2) {
|
||||
state[parts[0]][parts[1]] = inp.value;
|
||||
}
|
||||
// Live DOM updates for branding
|
||||
if (inp.dataset.key === 'branding.siteName') {
|
||||
var brandEl = document.querySelector('.brand-text');
|
||||
if (brandEl) brandEl.textContent = inp.value;
|
||||
document.title = inp.value;
|
||||
}
|
||||
if (inp.dataset.key === 'branding.logoUrl') {
|
||||
var iconEl = document.querySelector('.brand-icon');
|
||||
if (iconEl) {
|
||||
if (inp.value) { iconEl.innerHTML = '<img src="' + inp.value + '" style="height:24px" onerror="this.style.display=\'none\'">'; }
|
||||
else { iconEl.textContent = '📡'; }
|
||||
}
|
||||
}
|
||||
if (inp.dataset.key === 'branding.faviconUrl') {
|
||||
var link = document.querySelector('link[rel="icon"]');
|
||||
if (link && inp.value) link.href = inp.value;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -101,6 +101,6 @@
|
||||
<script src="observer-detail.js?v=1774219440" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="node-analytics.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="perf.js?v=1773985649" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="customize.js?v=1774229074" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="customize.js?v=1774229133" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user