From 53a6dbeb1ac2104c90d392263240344ded20f4d3 Mon Sep 17 00:00:00 2001 From: masnn Date: Thu, 9 Apr 2020 18:57:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86monaco-editor=E4=BD=9C=E4=B8=BA?= =?UTF-8?q?=E5=9C=A8=E7=BA=BFIDE=E7=BC=96=E8=BE=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hydro/handler/base.js | 5 +- .../partials/problem_sidebar_normal.html | 6 +- templates/problem_detail.html | 10 +-- ui/build/config/webpack.js | 8 +- .../scratchpad/ScratchpadEditorContainer.js | 28 ++---- ui/constant/language.js | 29 +++---- ui/package.json | 2 + ui/pages/problem_detail.page.js | 86 ++----------------- ui/yarn.lock | 41 ++++++++- 9 files changed, 81 insertions(+), 134 deletions(-) diff --git a/hydro/handler/base.js b/hydro/handler/base.js index 826204e60..6a932b24b 100644 --- a/hydro/handler/base.js +++ b/hydro/handler/base.js @@ -44,10 +44,7 @@ MIDDLEWARE(async (ctx, next) => { } } }; - ctx.back = () => { - console.log(122143); - ctx.redirect(ctx.request.headers.referer || '/'); - }; + ctx.back = () => ctx.redirect(ctx.request.headers.referer || '/'); ctx.csrf_token = await token.add(token.TYPE_CSRF_TOKEN, 600, ctx.path); await next(); if (ctx.session.sid) diff --git a/templates/partials/problem_sidebar_normal.html b/templates/partials/problem_sidebar_normal.html index dbf823e75..70216ef4c 100644 --- a/templates/partials/problem_sidebar_normal.html +++ b/templates/partials/problem_sidebar_normal.html @@ -100,16 +100,12 @@ {% if pdoc['psdoc']['status'] %} - {{ status.STATUS_TEXTS[pdoc['psdoc']['status']] }} + {{ builtin.STATUS_TEXTS[pdoc['psdoc']['status']] }} {% else %} {{ _('(None)') }} {% endif %} - {% if pdoc['ac_msg'] and pdoc['psdoc']['status'] == status.STATUS_ACCEPTED %} -
{{ _('AC Message') }}
-
{{ pdoc['ac_msg'] }}
- {% endif %} {% endif %} {% endif %}
{{ _('Difficulty') }}
diff --git a/templates/problem_detail.html b/templates/problem_detail.html index 0d1e9809d..f7ae2e1ee 100644 --- a/templates/problem_detail.html +++ b/templates/problem_detail.html @@ -4,9 +4,9 @@