Update
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user