This commit is contained in:
NAME
2026-05-20 03:10:28 +00:00
parent b18cd6d79f
commit fe22461a07
2 changed files with 7 additions and 4 deletions
+5 -3
View File
@@ -112,7 +112,7 @@
return false;
}
if (req.action === 'SHOW_TRANSLATE_RESULT') {
showTranslateResult(req.content);
showTranslateResult(req.content, req.model);
sendResponse({ ok: true });
return false;
}
@@ -628,7 +628,7 @@
if (drawer) drawer.classList.add('open');
}
function showTranslateResult(content) {
function showTranslateResult(content, model = '') {
if (!sidebarHost) return;
const s = sidebarHost.shadowRoot;
const status = s.querySelector('#trans-status');
@@ -636,7 +636,9 @@
const runBtn = s.querySelector('#trans-run');
const drawer = s.querySelector('.drawer');
if (status) { status.style.display = 'block'; status.className = 'status ok'; status.textContent = content; }
if (hint) hint.style.display = 'block';
if (hint) {
hint.style.display = 'block';hint.textContent = model
}
if (runBtn) runBtn.disabled = false;
if (drawer) drawer.classList.add('open');
}