feat: hide IP addresses by default, click to reveal

Added maskIp() helper that replaces IPs with ••••••••. A global
delegated click handler reveals the address on click. Applied to:
- Player list 'Address' column
- Player info 'Address' field

Styled .ip-masked with dimmed text and purple hover glow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-06-13 18:53:18 +02:00
co-authored by Copilot
parent eaa908336d
commit 5f25974cf2
4 changed files with 37 additions and 2 deletions
+17
View File
@@ -109,6 +109,23 @@
Router.start('#app-view');
// ---- IP address masking ----
window.maskIp = function (ip) {
if (!ip) return '';
return '<span class="ip-masked" data-ip="' + ip + '" title="Click to reveal IP">••••••••</span>';
};
document.addEventListener('click', function (e) {
var el = e.target.closest('.ip-masked');
if (el) {
el.classList.remove('ip-masked');
el.classList.add('ip-revealed');
el.textContent = el.dataset.ip;
el.title = '';
e.preventDefault();
}
});
// ---- Initial state ----
showDisconnected();
})();