core&ui: pretest support for remote_judge

This commit is contained in:
undefined committed 2022-02-13 18:07:56 +08:00
1 parent 3762bb31f5
commit af994325b5
7 files changed
+16 -7

No files matched your search

@@ -87,7 +87,10 @@ export default connect(mapStateToProps, mapDispatchToProps)(class ScratchpadTool
}
const keys = Object.keys(LANGS);
if (!keys.includes(this.props.editorLang)) this.props.setEditorLanguage(keys[0]);
const canUsePretest = ['default', 'fileio'].includes(UiContext.pdoc.config?.type);
let canUsePretest = ['default', 'fileio'].includes(UiContext.pdoc.config?.type);
if (UiContext.pdoc.config?.type === 'remote_judge') {
if (window.LANGS[this.props.editorLang].pretest) canUsePretest = true;
}
return (
<Toolbar>
{canUsePretest && (
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.31.16",
"version": "4.31.17",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
@@ -5,7 +5,7 @@
{% if pdoc.domainId !== handler.domainId %}{{ set(_linkArgs, 'domainId', pdoc.domainId) }}{% endif %}
<a href="{{ url('problem_detail', _linkArgs) }}"{% if small %} data-tooltip="{{ pdoc.title }}"{% endif %}>
{%- endif -%}
{%- if pdoc.domainId !== handler.domainId -%}{{ pdoc.domainId }}#{%- endif -%}
{%- if pdoc.domainId !== handler.domainId -%}<b>{{ pdoc.domainId }}#</b>{%- endif -%}
<b>{{ pdoc.pid or 'P'+pdoc.docId if pdoc.domainId === handler.domainId else pdoc.docId }}</b>
{%- if not small -%}&nbsp;&nbsp;{{ pdoc.title }}{%- endif -%}
{%- if not invalid -%}