ui: new judge config (#533)

Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
undefinedandpanda authored and GitHub committed 2023-03-15 21:15:04 +08:00
1 parent f4d8cd7a5d
commit 85cb1d6dff
26 files changed
+910 -222

No files matched your search

@@ -85,9 +85,8 @@ const page = new NamedPage('problem_config', () => {
}
async function mountComponent() {
const [{ default: ProblemConfigEditor }, { default: ProblemConfigForm }, { default: ProblemConfigReducer }] = await Promise.all([
import('vj/components/problemconfig/ProblemConfigEditor'),
import('vj/components/problemconfig/ProblemConfigForm'),
const [{ default: ProblemConfig }, { default: ProblemConfigReducer }] = await Promise.all([
import('vj/components/problemconfig/index'),
import('vj/components/problemconfig/reducer'),
]);
@@ -120,15 +119,7 @@ const page = new NamedPage('problem_config', () => {
});
createRoot(document.getElementById('ProblemConfig')!).render(
<Provider store={store}>
<div className="row">
<div className="medium-5 columns">
<ProblemConfigEditor />
</div>
<div className="medium-7 columns">
<ProblemConfigForm />
</div>
</div>
<button className="rounded primary button" onClick={() => uploadConfig(store.getState().config)}>{i18n('Submit')}</button>
<ProblemConfig onSave={() => uploadConfig(store.getState().config)} />
</Provider>,
);
}