Skip to content
Snippets Groups Projects
Verified Commit a0e57bc7 authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

"unnamed token" in token list

parent 41edacc0
No related branches found
No related tags found
No related merge requests found
......@@ -130,16 +130,13 @@ const lastArrowI = '<i class="fas fa-arrow-circle-right" style="padding-right: 1
function _tokenTreeToHTML(tree, depth) {
let token = tree['token'];
let name = token['name'] || '';
let name = token['name'] || 'unnamed token';
let nameClass = name == 'unnamed token' ? 'class="text-muted"' : "";
if (depth > 0) {
name = arrowI.repeat(depth - 1) + lastArrowI + name
name = arrowI.repeat(depth - 1) + lastArrowI + name;
}
let time = formatTime(token['created']);
let tableEntries = ['<tr>' +
'<td>' + name + '</td>' +
'<td>' + time + '</td>' +
'<td>' + token['ip'] + '</td>' +
'</tr>'];
let tableEntries = [`<tr><td ${nameClass}>${name}</td><td>${time}</td><td>${token['ip']}</td></tr>`];
let children = tree['children'];
if (children !== undefined) {
children.forEach(function (child) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment