ui: record_detail: click to expand compiler message

This commit is contained in:
undefined committed 2024-08-14 15:50:01 +08:00
1 parent d8a21bc5b8
commit 6eb4d56724
5 files changed
+44 -13

No files matched your search

@@ -5,6 +5,20 @@ import { NamedPage } from 'vj/misc/Page';
import { tpl, withTransistionCallback } from 'vj/utils';
export default new NamedPage('record_detail', async () => {
$(document).on('click', '.compiler-text', () => {
withTransistionCallback(() => {
$('.collapsed').removeClass('collapsed');
});
});
$(document).on('click', '.subtask-case', function () {
const text = $(this).find('.message').text();
const data = $(this).find('.message').html();
if (!text?.trim()) return;
new InfoDialog({
$body: tpl(<pre dangerouslySetInnerHTML={{ __html: data }} />),
}).open();
});
if (!UiContext.socketUrl) return;
const [{ default: WebSocket }, { DiffDOM }] = await Promise.all([
import('../components/socket'),
@@ -25,12 +39,4 @@ export default new NamedPage('record_detail', async () => {
dd.apply(oldSummary[0], dd.diff(oldSummary[0], newSummary[0]));
});
};
$(document).on('click', '.subtask-case', function () {
const text = $(this).find('.message').text();
const data = $(this).find('.message').html();
if (!text?.trim()) return;
new InfoDialog({
$body: tpl(<pre dangerouslySetInnerHTML={{ __html: data }} />),
}).open();
});
});