feat(login): recover-password section
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
5cff983d4c
commit
cf7016c28a
|
@ -23,7 +23,7 @@ export default class Auth {
|
|||
|
||||
initialize() {
|
||||
let criteria = {
|
||||
to: state => state.name != 'login'
|
||||
to: state => !state.name.includes('login')
|
||||
};
|
||||
this.$transitions.onStart(criteria, transition => {
|
||||
if (this.loggedIn)
|
||||
|
|
|
@ -6,6 +6,7 @@ import './home/home';
|
|||
import './layout';
|
||||
import './left-menu/left-menu';
|
||||
import './login/login';
|
||||
import './login/recover-password';
|
||||
import './module-card';
|
||||
import './module-main';
|
||||
import './side-menu/side-menu';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
User: Usuario
|
||||
Password: Contraseña
|
||||
Do not close session: No cerrar sesión
|
||||
Enter: Entrar
|
||||
Enter: Entrar
|
||||
I do not remember my password: No recuerdo mi contraseña
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<div class="spinner-wrapper">
|
||||
<vn-spinner enable="$ctrl.loading"></vn-spinner>
|
||||
</div>
|
||||
<div class="vn-pt-lg">
|
||||
<a ui-sref="login.recover-password" translate>
|
||||
I do not remember my password
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<div class="box">
|
||||
<img src="./logo.svg"/>
|
||||
<form name="form" ng-submit="$ctrl.submit()">
|
||||
<vn-textfield
|
||||
label="User"
|
||||
ng-model="$ctrl.user"
|
||||
vn-id="userField"
|
||||
vn-focus>
|
||||
</vn-textfield>
|
||||
</form>
|
||||
</div>
|
|
@ -0,0 +1,22 @@
|
|||
import ngModule from '../../module';
|
||||
import './style.scss';
|
||||
|
||||
/**
|
||||
* A simple login form.
|
||||
*/
|
||||
export default class Controller {
|
||||
constructor($, $element) {
|
||||
Object.assign(this, {
|
||||
$,
|
||||
$element,
|
||||
user: localStorage.getItem('lastUser'),
|
||||
remember: true
|
||||
});
|
||||
}
|
||||
}
|
||||
Controller.$inject = ['$scope', '$element'];
|
||||
|
||||
ngModule.vnComponent('vnRecoverPassword', {
|
||||
template: require('./recover-password.html'),
|
||||
controller: Controller
|
||||
});
|
|
@ -71,4 +71,8 @@ vn-login {
|
|||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
a{
|
||||
color: $color-primary;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,13 @@ function config($stateProvider, $urlRouterProvider) {
|
|||
login: {template: '<vn-login></vn-login>'}
|
||||
}
|
||||
})
|
||||
.state('login.recover-password', {
|
||||
url: '/recover-password',
|
||||
description: 'Recover-password',
|
||||
views: {
|
||||
recoverPassword: {template: '<vn-recover-password></vn-recover-password>'}
|
||||
}
|
||||
})
|
||||
.state('home', {
|
||||
url: '/',
|
||||
description: 'Home',
|
||||
|
|
Loading…
Reference in New Issue