chore: frontend cleanup — replaceChildren, missing source badge, http case
- Replace innerHTML = '' with replaceChildren() throughout tabs.js and app.js (12 + 7 sites). paintAtomic already used replaceChildren; now the direct-clear sites are consistent with it. - Add missing .rqe-source-startup_sweep CSS rule (startup_sweep is a valid QueueSource variant but had no badge style, falling through to the base muted appearance with no explicit intent). - Lowercase the one uppercase 'HTTP ' in the fetchAndRenderToolGroups error path to match every other fetch error in the file.
This commit is contained in:
parent
5c5ca38fe8
commit
2a62a561c4
3 changed files with 21 additions and 20 deletions
|
|
@ -549,7 +549,7 @@ window.marked = marked;
|
|||
const slot = $('term-input');
|
||||
if (!slot) return;
|
||||
if (!termInputRendered) {
|
||||
slot.innerHTML = '';
|
||||
slot.replaceChildren();
|
||||
const form = el('form', {
|
||||
action: 'send', method: 'POST',
|
||||
class: 'sendform-term', 'data-async': '',
|
||||
|
|
@ -790,7 +790,7 @@ window.marked = marked;
|
|||
if (slot._boundId) {
|
||||
const stillPending = pending.some((q) => q.id === slot._boundId);
|
||||
if (!stillPending && !slot._resolvedShown) {
|
||||
slot.innerHTML = '';
|
||||
slot.replaceChildren();
|
||||
slot.appendChild(el('span', { class: 'ask-resolved-tag' }, '[resolved]'));
|
||||
slot._resolvedShown = true;
|
||||
}
|
||||
|
|
@ -800,7 +800,7 @@ window.marked = marked;
|
|||
if (!q) continue;
|
||||
claimed.add(q.id);
|
||||
slot._boundId = q.id;
|
||||
slot.innerHTML = '';
|
||||
slot.replaceChildren();
|
||||
slot.appendChild(buildAnswerForm(q.id));
|
||||
}
|
||||
}
|
||||
|
|
@ -1110,7 +1110,7 @@ window.marked = marked;
|
|||
(s.status === 'needs_login_in_progress' && outLen !== lastOutputLen);
|
||||
if (dirty) {
|
||||
const root = $('status');
|
||||
root.innerHTML = '';
|
||||
root.replaceChildren();
|
||||
if (s.status === 'online') renderOnline(s.label, root);
|
||||
else if (s.status === 'needs_login_idle') renderNeedsLoginIdle(root);
|
||||
else if (s.status === 'needs_login_in_progress') renderLoginInProgress(s.session || {}, root);
|
||||
|
|
@ -1139,7 +1139,7 @@ window.marked = marked;
|
|||
(function() {
|
||||
const log = $('live');
|
||||
if (!log || !window.HiveTerminal) return;
|
||||
log.innerHTML = '';
|
||||
log.replaceChildren();
|
||||
|
||||
function trim(s, n) { return s.length > n ? s.slice(0, n) + '…' : s; }
|
||||
// Render a message body as markdown into a new <div class="md">.
|
||||
|
|
@ -1543,7 +1543,7 @@ window.marked = marked;
|
|||
// login UI; clear it so the operator sees a clean
|
||||
// online state without a separate refetch.
|
||||
const root = $('status');
|
||||
if (root) root.innerHTML = '';
|
||||
if (root) root.replaceChildren();
|
||||
lastStatus = 'online';
|
||||
}
|
||||
},
|
||||
|
|
@ -1566,7 +1566,7 @@ window.marked = marked;
|
|||
// Expose the panel API for slash commands (`/help`, `/clear`).
|
||||
termAPI = {
|
||||
row: (cls, text) => term.row(cls, text),
|
||||
clear: () => { log.innerHTML = ''; },
|
||||
clear: () => { log.replaceChildren(); },
|
||||
};
|
||||
})();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue