mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17: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
@@ -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`<p>${i18n('Relax and try to remember your password.')}</p>`,
|
||||
}).open();
|
||||
});
|
||||
});
|
||||
|
||||
export default signinDialogPage;
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.13.7",
|
||||
"version": "4.13.8",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"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",
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
{%- endfor -%}
|
||||
<div class="row"><div class="columns">
|
||||
<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>
|
||||
</form>
|
||||
|
||||
@@ -3,20 +3,26 @@
|
||||
<div class="row"><div class="columns">
|
||||
<div class="immersive--content immersive--center">
|
||||
<h1>{{ _('Lost Password') }}</h1>
|
||||
<form method="POST">
|
||||
<div class="row"><div class="columns">
|
||||
<label class="inverse material textbox">
|
||||
{{ _('Email') }}
|
||||
<input name="mail" type="text" autofocus>
|
||||
</label>
|
||||
</div></div>
|
||||
<div class="row"><div class="columns">
|
||||
<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>
|
||||
{% if not model.system.get('smtp.user') %}
|
||||
<div class="text-center">
|
||||
{{ _('Relax and try to remember your password.') }}
|
||||
</div>
|
||||
{% else %}
|
||||
<form method="POST">
|
||||
<div class="row"><div class="columns">
|
||||
<label class="inverse material textbox">
|
||||
{{ _('Email') }}
|
||||
<input name="mail" type="text" autofocus>
|
||||
</label>
|
||||
</div></div>
|
||||
<div class="row"><div class="columns">
|
||||
<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>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user