mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: friendly user-lostpass
This commit is contained in:
1 parent
39b90b3ff5
commit
a8074d0872
10 files changed
+47
-31
No files matched your search
+3
-3
@@ -31,8 +31,8 @@
|
|||||||
"@shelf/jest-mongodb": "^1.3.4",
|
"@shelf/jest-mongodb": "^1.3.4",
|
||||||
"@types/cross-spawn": "^6.0.2",
|
"@types/cross-spawn": "^6.0.2",
|
||||||
"@types/jest": "^26.0.24",
|
"@types/jest": "^26.0.24",
|
||||||
"@types/node": "^15.14.2",
|
"@types/node": "^15.14.3",
|
||||||
"@types/semver": "^7.3.7",
|
"@types/semver": "^7.3.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.28.4",
|
"@typescript-eslint/eslint-plugin": "^4.28.4",
|
||||||
"@typescript-eslint/parser": "^4.28.4",
|
"@typescript-eslint/parser": "^4.28.4",
|
||||||
"cac": "^6.7.3",
|
"cac": "^6.7.3",
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
"nmls": "^3.0.1",
|
"nmls": "^3.0.1",
|
||||||
"ora": "^5.4.1",
|
"ora": "^5.4.1",
|
||||||
"semver": "^7.3.5",
|
"semver": "^7.3.5",
|
||||||
"ts-jest": "^27.0.3",
|
"ts-jest": "^27.0.4",
|
||||||
"typedoc": "^0.21.4",
|
"typedoc": "^0.21.4",
|
||||||
"typescript": "4.2.4"
|
"typescript": "4.2.4"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/js-yaml": "^4.0.2",
|
"@types/js-yaml": "^4.0.2",
|
||||||
"@types/node": "^15.14.2"
|
"@types/node": "^15.14.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"hydrooj": "*"
|
"hydrooj": "*"
|
||||||
|
|||||||
@@ -614,6 +614,7 @@ Rejudge records: 重测记录
|
|||||||
Rejudge: 重测
|
Rejudge: 重测
|
||||||
Related Discussions: 相关讨论
|
Related Discussions: 相关讨论
|
||||||
Related: 相关
|
Related: 相关
|
||||||
|
Relax and try to remember your password.: 放松,尝试回忆您设置的密码。
|
||||||
Remember me: 记住我
|
Remember me: 记住我
|
||||||
Remove Selected User: 将所选用户移出
|
Remove Selected User: 将所选用户移出
|
||||||
Remove this data: 移除这组数据
|
Remove this data: 移除这组数据
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.29.42",
|
"version": "2.29.43",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
|
|||||||
@@ -140,7 +140,6 @@ class UserRegisterWithCodeHandler extends Handler {
|
|||||||
|
|
||||||
class UserLostPassHandler extends Handler {
|
class UserLostPassHandler extends Handler {
|
||||||
async get() {
|
async get() {
|
||||||
if (!system.get('smtp.user')) throw new SystemError('Cannot send mail');
|
|
||||||
this.response.template = 'user_lostpass.html';
|
this.response.template = 'user_lostpass.html';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import { AutoloadPage } from 'vj/misc/Page';
|
import { AutoloadPage } from 'vj/misc/Page';
|
||||||
import DomDialog from 'vj/components/dialog/DomDialog';
|
import DomDialog from 'vj/components/dialog/DomDialog';
|
||||||
|
import { InfoDialog } from 'vj/components/dialog/index';
|
||||||
import responsiveCutoff from 'vj/breakpoints.json';
|
import responsiveCutoff from 'vj/breakpoints.json';
|
||||||
import { isBelow } from 'vj/utils/mediaQuery';
|
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 signinDialogPage = new AutoloadPage('signinDialogPage', null, () => {
|
||||||
const signInDialog = DomDialog.getOrConstruct($('.dialog--signin'), {
|
const signInDialog = DomDialog.getOrConstruct($('.dialog--signin'), {
|
||||||
@@ -36,6 +39,13 @@ const signinDialogPage = new AutoloadPage('signinDialogPage', null, () => {
|
|||||||
}
|
}
|
||||||
signInDialog.show();
|
signInDialog.show();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$('[data-lostpass]').on('click', (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
new InfoDialog({
|
||||||
|
body: tpl`<p>${i18n('Relax and try to remember your password.')}</p>`,
|
||||||
|
}).open();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
export default signinDialogPage;
|
export default signinDialogPage;
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.13.7",
|
"version": "4.13.8",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
"preferUnplugged": true,
|
"preferUnplugged": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.14.5",
|
"@babel/cli": "^7.14.8",
|
||||||
"@babel/core": "^7.14.6",
|
"@babel/core": "^7.14.8",
|
||||||
"@babel/eslint-parser": "7.14.7",
|
"@babel/eslint-parser": "7.14.7",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
||||||
"@babel/plugin-proposal-export-namespace-from": "^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-dynamic-import": "^7.8.3",
|
||||||
"@babel/plugin-syntax-import-meta": "^7.10.4",
|
"@babel/plugin-syntax-import-meta": "^7.10.4",
|
||||||
"@babel/plugin-transform-runtime": "^7.14.5",
|
"@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/preset-react": "^7.14.5",
|
||||||
"@babel/register": "^7.14.5",
|
"@babel/register": "^7.14.5",
|
||||||
"@babel/runtime-corejs3": "^7.14.7",
|
"@babel/runtime-corejs3": "^7.14.8",
|
||||||
"@blockly/block-extension-tooltip": "^1.0.13",
|
"@blockly/block-extension-tooltip": "^1.0.14",
|
||||||
"@blueprintjs/core": "^3.47.0",
|
"@blueprintjs/core": "^3.47.0",
|
||||||
"@blueprintjs/icons": "^3.27.0",
|
"@blueprintjs/icons": "^3.27.0",
|
||||||
"@blueprintjs/select": "^3.16.6",
|
"@blueprintjs/select": "^3.16.6",
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
"vditor": "^3.8.6",
|
"vditor": "^3.8.6",
|
||||||
"vinyl-buffer": "^1.0.1",
|
"vinyl-buffer": "^1.0.1",
|
||||||
"wastyle": "^0.0.5",
|
"wastyle": "^0.0.5",
|
||||||
"web-streams-polyfill": "^3.0.3",
|
"web-streams-polyfill": "^3.1.0",
|
||||||
"webpack": "^4.46.0",
|
"webpack": "^4.46.0",
|
||||||
"webpack-bundle-analyzer": "^4.4.2",
|
"webpack-bundle-analyzer": "^4.4.2",
|
||||||
"webpack-dev-server": "^3.11.2",
|
"webpack-dev-server": "^3.11.2",
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"jsesc": "^3.0.2",
|
"jsesc": "^3.0.2",
|
||||||
"katex": "^0.13.11",
|
"katex": "^0.13.13",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"markdown-it": "^12.1.0",
|
"markdown-it": "^12.1.0",
|
||||||
"markdown-it-anchor": "^7.1.0",
|
"markdown-it-anchor": "^7.1.0",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
<div class="row"><div class="columns">
|
<div class="row"><div class="columns">
|
||||||
<div class="supplementary text-center">
|
<div class="supplementary text-center">
|
||||||
<a href="{{ url('user_lostpass') }}">{{ _('Forgot password or username?') }}</a>
|
<a {% if not model.system.get('smtp.user') %}data-lostpass href="#"{% else %}href="{{ url('user_lostpass') }}"{% endif %}>{{ _('Forgot password or username?') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div></div>
|
</div></div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -3,20 +3,26 @@
|
|||||||
<div class="row"><div class="columns">
|
<div class="row"><div class="columns">
|
||||||
<div class="immersive--content immersive--center">
|
<div class="immersive--content immersive--center">
|
||||||
<h1>{{ _('Lost Password') }}</h1>
|
<h1>{{ _('Lost Password') }}</h1>
|
||||||
<form method="POST">
|
{% if not model.system.get('smtp.user') %}
|
||||||
<div class="row"><div class="columns">
|
<div class="text-center">
|
||||||
<label class="inverse material textbox">
|
{{ _('Relax and try to remember your password.') }}
|
||||||
{{ _('Email') }}
|
</div>
|
||||||
<input name="mail" type="text" autofocus>
|
{% else %}
|
||||||
</label>
|
<form method="POST">
|
||||||
</div></div>
|
<div class="row"><div class="columns">
|
||||||
<div class="row"><div class="columns">
|
<label class="inverse material textbox">
|
||||||
<div class="text-center">
|
{{ _('Email') }}
|
||||||
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
|
<input name="mail" type="text" autofocus>
|
||||||
<input type="submit" value="{{ _('Send Password Reset Email') }}" class="inverse rounded primary button">
|
</label>
|
||||||
</div>
|
</div></div>
|
||||||
</div></div>
|
<div class="row"><div class="columns">
|
||||||
</form>
|
<div class="text-center">
|
||||||
|
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
|
||||||
|
<input type="submit" value="{{ _('Send Password Reset Email') }}" class="inverse rounded primary button">
|
||||||
|
</div>
|
||||||
|
</div></div>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div></div>
|
</div></div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -12,11 +12,11 @@
|
|||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"mongodb": "^3.6.10",
|
"mongodb": "^3.6.10",
|
||||||
"systeminformation": "^5.7.8"
|
"systeminformation": "^5.7.9"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/fs-extra": "^9.0.12",
|
"@types/fs-extra": "^9.0.12",
|
||||||
"@types/node": "^15.14.2",
|
"@types/node": "^15.14.3",
|
||||||
"moment-timezone": "^0.5.33"
|
"moment-timezone": "^0.5.33"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user