diff --git a/package.json b/package.json index bd54e6177..6ae636501 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,8 @@ "@shelf/jest-mongodb": "^1.3.4", "@types/cross-spawn": "^6.0.2", "@types/jest": "^26.0.24", - "@types/node": "^15.14.2", - "@types/semver": "^7.3.7", + "@types/node": "^15.14.3", + "@types/semver": "^7.3.8", "@typescript-eslint/eslint-plugin": "^4.28.4", "@typescript-eslint/parser": "^4.28.4", "cac": "^6.7.3", @@ -50,7 +50,7 @@ "nmls": "^3.0.1", "ora": "^5.4.1", "semver": "^7.3.5", - "ts-jest": "^27.0.3", + "ts-jest": "^27.0.4", "typedoc": "^0.21.4", "typescript": "4.2.4" } diff --git a/packages/center/package.json b/packages/center/package.json index 9778b3ed6..9e088665a 100644 --- a/packages/center/package.json +++ b/packages/center/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@types/js-yaml": "^4.0.2", - "@types/node": "^15.14.2" + "@types/node": "^15.14.3" }, "peerDependencies": { "hydrooj": "*" diff --git a/packages/hydrooj/locales/zh.yaml b/packages/hydrooj/locales/zh.yaml index 8aab10921..6f72c2649 100644 --- a/packages/hydrooj/locales/zh.yaml +++ b/packages/hydrooj/locales/zh.yaml @@ -614,6 +614,7 @@ Rejudge records: 重测记录 Rejudge: 重测 Related Discussions: 相关讨论 Related: 相关 +Relax and try to remember your password.: 放松,尝试回忆您设置的密码。 Remember me: 记住我 Remove Selected User: 将所选用户移出 Remove this data: 移除这组数据 diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index 5d2b828c5..afc79438c 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "2.29.42", + "version": "2.29.43", "bin": "bin/hydrooj.js", "main": "dist/loader.js", "typings": "dist/loader.d.ts", diff --git a/packages/hydrooj/src/handler/user.ts b/packages/hydrooj/src/handler/user.ts index be2557f1d..d4979283b 100644 --- a/packages/hydrooj/src/handler/user.ts +++ b/packages/hydrooj/src/handler/user.ts @@ -140,7 +140,6 @@ class UserRegisterWithCodeHandler extends Handler { class UserLostPassHandler extends Handler { async get() { - if (!system.get('smtp.user')) throw new SystemError('Cannot send mail'); this.response.template = 'user_lostpass.html'; } diff --git a/packages/ui-default/components/signin/signInDialog.page.js b/packages/ui-default/components/signin/signInDialog.page.js index 3574bbfd9..d2b833844 100644 --- a/packages/ui-default/components/signin/signInDialog.page.js +++ b/packages/ui-default/components/signin/signInDialog.page.js @@ -1,7 +1,10 @@ import { AutoloadPage } from 'vj/misc/Page'; import DomDialog from 'vj/components/dialog/DomDialog'; +import { InfoDialog } from 'vj/components/dialog/index'; import responsiveCutoff from 'vj/breakpoints.json'; import { isBelow } from 'vj/utils/mediaQuery'; +import i18n from 'vj/utils/i18n'; +import tpl from 'vj/utils/tpl'; const signinDialogPage = new AutoloadPage('signinDialogPage', null, () => { const signInDialog = DomDialog.getOrConstruct($('.dialog--signin'), { @@ -36,6 +39,13 @@ const signinDialogPage = new AutoloadPage('signinDialogPage', null, () => { } signInDialog.show(); }; + + $('[data-lostpass]').on('click', (e) => { + e.preventDefault(); + new InfoDialog({ + body: tpl`

${i18n('Relax and try to remember your password.')}

`, + }).open(); + }); }); export default signinDialogPage; diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index 285252090..b2386c118 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -1,14 +1,14 @@ { "name": "@hydrooj/ui-default", - "version": "4.13.7", + "version": "4.13.8", "author": "undefined ", "license": "AGPL-3.0", "main": "hydro.js", "repository": "https://github.com/hydro-dev/Hydro.git", "preferUnplugged": true, "devDependencies": { - "@babel/cli": "^7.14.5", - "@babel/core": "^7.14.6", + "@babel/cli": "^7.14.8", + "@babel/core": "^7.14.8", "@babel/eslint-parser": "7.14.7", "@babel/plugin-proposal-class-properties": "^7.14.5", "@babel/plugin-proposal-export-namespace-from": "^7.14.5", @@ -19,11 +19,11 @@ "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-transform-runtime": "^7.14.5", - "@babel/preset-env": "^7.14.7", + "@babel/preset-env": "^7.14.8", "@babel/preset-react": "^7.14.5", "@babel/register": "^7.14.5", - "@babel/runtime-corejs3": "^7.14.7", - "@blockly/block-extension-tooltip": "^1.0.13", + "@babel/runtime-corejs3": "^7.14.8", + "@blockly/block-extension-tooltip": "^1.0.14", "@blueprintjs/core": "^3.47.0", "@blueprintjs/icons": "^3.27.0", "@blueprintjs/select": "^3.16.6", @@ -106,7 +106,7 @@ "vditor": "^3.8.6", "vinyl-buffer": "^1.0.1", "wastyle": "^0.0.5", - "web-streams-polyfill": "^3.0.3", + "web-streams-polyfill": "^3.1.0", "webpack": "^4.46.0", "webpack-bundle-analyzer": "^4.4.2", "webpack-dev-server": "^3.11.2", @@ -115,7 +115,7 @@ "dependencies": { "js-yaml": "^4.1.0", "jsesc": "^3.0.2", - "katex": "^0.13.11", + "katex": "^0.13.13", "lodash": "^4.17.21", "markdown-it": "^12.1.0", "markdown-it-anchor": "^7.1.0", diff --git a/packages/ui-default/templates/partials/login_dialog.html b/packages/ui-default/templates/partials/login_dialog.html index de86fea8f..ecfb2c4c0 100644 --- a/packages/ui-default/templates/partials/login_dialog.html +++ b/packages/ui-default/templates/partials/login_dialog.html @@ -44,7 +44,7 @@ {%- endfor -%}
diff --git a/packages/ui-default/templates/user_lostpass.html b/packages/ui-default/templates/user_lostpass.html index 3117a63e5..fcb2f0c11 100644 --- a/packages/ui-default/templates/user_lostpass.html +++ b/packages/ui-default/templates/user_lostpass.html @@ -3,20 +3,26 @@

{{ _('Lost Password') }}

-
-
- -
-
-
- - -
-
-
+ {% if not model.system.get('smtp.user') %} +
+ {{ _('Relax and try to remember your password.') }} +
+ {% else %} +
+
+ +
+
+
+ + +
+
+
+ {% endif %}
{% endblock %} diff --git a/packages/utils/package.json b/packages/utils/package.json index a6bf98581..10ea1eb0a 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -12,11 +12,11 @@ "js-yaml": "^4.1.0", "moment": "^2.29.1", "mongodb": "^3.6.10", - "systeminformation": "^5.7.8" + "systeminformation": "^5.7.9" }, "devDependencies": { "@types/fs-extra": "^9.0.12", - "@types/node": "^15.14.2", + "@types/node": "^15.14.3", "moment-timezone": "^0.5.33" } }