mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
ui: add hint to pid input
This commit is contained in:
1 parent
0301de94cf
commit
80f34547da
3 files changed
+19
-1
No files matched your search
@@ -0,0 +1,17 @@
|
|||||||
|
import { NamedPage } from 'vj/misc/Page';
|
||||||
|
import { InfoDialog } from 'vj/components/dialog';
|
||||||
|
import tpl from 'vj/utils/tpl';
|
||||||
|
import i18n from 'vj/utils/i18n';
|
||||||
|
|
||||||
|
export default new NamedPage(['problem_create', 'problem_edit', 'problem_import_syzoj'], () => {
|
||||||
|
$('input[name="pid"]').on('blur', () => {
|
||||||
|
if (/^[0-9]+$/.test($('input[name="pid"]').val())) {
|
||||||
|
new InfoDialog({
|
||||||
|
$body: tpl`
|
||||||
|
<div class="typo">
|
||||||
|
<p>${i18n('Problem ID cannot be a pure number. Leave blank if you want to use numberic id.')}</p>
|
||||||
|
</div>`,
|
||||||
|
}).open();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -550,6 +550,7 @@ Pretest?: 自测?
|
|||||||
Privacy: 隐私
|
Privacy: 隐私
|
||||||
Problem {1} not found.: 题目 {1} 不存在。
|
Problem {1} not found.: 题目 {1} 不存在。
|
||||||
Problem Data: 题目数据
|
Problem Data: 题目数据
|
||||||
|
Problem ID cannot be a pure number. Leave blank if you want to use numberic id.: 题目ID不能为纯数字。 若要自动分配数字ID请将此处留空。
|
||||||
Problem ID List: 题目 ID 列表
|
Problem ID List: 题目 ID 列表
|
||||||
Problem Set: 题库
|
Problem Set: 题库
|
||||||
Problem Settings: 题目设置
|
Problem Settings: 题目设置
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.18.8",
|
"version": "4.18.9",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
|
|||||||
Reference in new issue
Block a user