ui: post judge result to parent window

This commit is contained in:
undefined committed 2023-11-24 06:32:55 +08:00
1 parent c9fad505c5
commit e517577080
2 files changed
+2

No files matched your search

+1
View File
@@ -364,6 +364,7 @@ class RecordDetailConnectionHandler extends ConnectionHandler {
async sendUpdate(rdoc: RecordDoc) {
this.send({
status: rdoc.status,
status_html: await this.renderHTML('record_detail_status.html', { rdoc, pdoc: this.pdoc }),
summary_html: await this.renderHTML('record_detail_summary.html', { rdoc, pdoc: this.pdoc }),
});
@@ -18,6 +18,7 @@ const page = new NamedPage('record_detail', async () => {
const newSummary = $(msg.summary_html);
const oldSummary = $('#summary');
dd.apply(oldSummary[0], dd.diff(oldSummary[0], newSummary[0]));
if (typeof msg.status === 'number' && window.parent) window.parent.postMessage({ status: msg.status });
};
});