ui: harden grpc empty state rendering
This commit is contained in:
@@ -993,7 +993,14 @@ function renderFieldList(elId, typeName) {
|
|||||||
if (!fields || fields.length === 0) {
|
if (!fields || fields.length === 0) {
|
||||||
var emptyEl = document.createElement('div');
|
var emptyEl = document.createElement('div');
|
||||||
emptyEl.className = 'proto-field-empty';
|
emptyEl.className = 'proto-field-empty';
|
||||||
emptyEl.innerHTML = tKey('wizard.grpc.fields_unresolved') + '<br><span style="color:var(--text-muted);font-size:11px;">' + tKey('wizard.grpc.fields_unresolved_body') + '</span>';
|
emptyEl.textContent = '';
|
||||||
|
emptyEl.appendChild(document.createTextNode(tKey('wizard.grpc.fields_unresolved')));
|
||||||
|
emptyEl.appendChild(document.createElement('br'));
|
||||||
|
var hint = document.createElement('span');
|
||||||
|
hint.style.color = 'var(--text-muted)';
|
||||||
|
hint.style.fontSize = '11px';
|
||||||
|
hint.textContent = tKey('wizard.grpc.fields_unresolved_body');
|
||||||
|
emptyEl.appendChild(hint);
|
||||||
el.appendChild(emptyEl);
|
el.appendChild(emptyEl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user