Skip to content

Commit 87b2dfe

Browse files
committed
hopefully fix thingy and add heading
1 parent 3a0db19 commit 87b2dfe

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

www/user.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ doRequest("GET", `${BASE_URL}/account/me`, null, (text) => {
118118

119119
// build the console html
120120
let html = "";
121+
let i = 0;
121122
for (const console of account_data.consoles) {
123+
i++;
122124
const machtml = escapeHtml(console.mac.toString());
125+
html += `<h3>Linked Console ${escapeHtml(console.name ? console.name : i)}</h3>`;
123126
html += '<form class="console-edit-form">';
124127
html += `<input type="hidden" name="mac" value="${machtml}" />`;
125128
html += `<p><b>Name:</b><input name="name" type="text" class="txt" maxlength="50" value="${escapeHtml(console.name || "")}" /></p>`;
@@ -156,8 +159,10 @@ doRequest("GET", `${BASE_URL}/account/me`, null, (text) => {
156159
.padStart(12, "0")
157160
.split("")
158161
.entries()
159-
.map(entry => entry[1] + (entry[0] % 2 ? ":" : ""))
160-
].join("").slice(0, -1).toUpperCase();
162+
].map(entry => entry[1] + (entry[0] % 2 ? ":" : ""))
163+
.join("")
164+
.slice(0, -1)
165+
.toUpperCase();
161166
mac_element.outerHTML = `<span class="mac-address">${escapeHtml(mac)}</span>`;
162167
});
163168
}

0 commit comments

Comments
 (0)