mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: pretest support for remote_judge
This commit is contained in:
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 && (
|
||||
|
||||
Reference in new issue
Block a user