Compare commits
1 Commits
29ff5393d3
...
2f69ad0361
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f69ad0361 |
@@ -176,20 +176,15 @@ async function init() {
|
||||
if (DEBUG || net.isTestnet) {
|
||||
const banner = document.createElement("div");
|
||||
banner.id = "debug-banner";
|
||||
banner.style.cssText =
|
||||
"background:#c00;color:#fff;text-align:center;font-size:10px;padding:1px 0;font-family:monospace;position:sticky;top:0;z-index:9999;display:flex;justify-content:center;align-items:center;";
|
||||
const label = document.createElement("span");
|
||||
label.id = "debug-banner-label";
|
||||
label.style.cssText = "flex:1;text-align:center;";
|
||||
label.textContent = DEBUG ? "DEBUG / INSECURE" : net.name;
|
||||
banner.appendChild(label);
|
||||
if (net.isTestnet) {
|
||||
const tag = document.createElement("span");
|
||||
tag.id = "debug-banner-testnet";
|
||||
tag.style.cssText = "position:absolute;right:6px;font-weight:bold;";
|
||||
tag.textContent = "TESTNET";
|
||||
banner.appendChild(tag);
|
||||
if (DEBUG && net.isTestnet) {
|
||||
banner.textContent = "DEBUG / INSECURE [TESTNET]";
|
||||
} else if (net.isTestnet) {
|
||||
banner.textContent = "[TESTNET]";
|
||||
} else {
|
||||
banner.textContent = "DEBUG / INSECURE";
|
||||
}
|
||||
banner.style.cssText =
|
||||
"background:#c00;color:#fff;text-align:center;font-size:10px;padding:1px 0;font-family:monospace;position:sticky;top:0;z-index:9999;";
|
||||
document.body.prepend(banner);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,11 +61,16 @@ function showView(name) {
|
||||
saveState();
|
||||
const net = currentNetwork();
|
||||
if (DEBUG || net.isTestnet) {
|
||||
const label = document.getElementById("debug-banner-label");
|
||||
if (label) {
|
||||
label.textContent = DEBUG
|
||||
? "DEBUG / INSECURE (" + name + ")"
|
||||
: net.name + " (" + name + ")";
|
||||
const banner = document.getElementById("debug-banner");
|
||||
if (banner) {
|
||||
if (DEBUG && net.isTestnet) {
|
||||
banner.textContent =
|
||||
"DEBUG / INSECURE [TESTNET] (" + name + ")";
|
||||
} else if (net.isTestnet) {
|
||||
banner.textContent = "[TESTNET]";
|
||||
} else {
|
||||
banner.textContent = "DEBUG / INSECURE (" + name + ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user