mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: problemconfig: patch autoconfigure
This commit is contained in:
5 files changed
+15
-4
No files matched your search
@@ -111,11 +111,16 @@ export function SubtaskConfigTree() {
|
||||
const store = useStore<RootState>();
|
||||
function autoConfigure() {
|
||||
const state = store.getState();
|
||||
const subtasks = readSubtasksFromFiles(state.testdata, state.config);
|
||||
const subtasks = readSubtasksFromFiles(state.testdata.map((t) => t.name), state.config);
|
||||
const cases = subtasks.reduce((a, b) => a.concat(b.cases), []);
|
||||
dispatch({
|
||||
type: 'CONFIG_AUTOCASES_UPDATE',
|
||||
subtasks: normalizeSubtasks(subtasks, (i) => i, state.config.time, state.config.memory, true),
|
||||
});
|
||||
dispatch({
|
||||
type: 'problemconfig/delTestcases',
|
||||
cases,
|
||||
});
|
||||
}
|
||||
return (
|
||||
<div className="bp4-tree">
|
||||
|
||||
Reference in new issue
Block a user