fix: nested router
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
660648e01f
commit
314e98b838
|
@ -13,7 +13,7 @@ module.exports = function(Self) {
|
|||
const params = {
|
||||
recipient: info.email,
|
||||
lang: user.lang,
|
||||
url: `${origin}/#!/login/reset-password?access_token=${info.accessToken.id}`
|
||||
url: `${origin}/#!/reset-password?access_token=${info.accessToken.id}`
|
||||
};
|
||||
|
||||
const email = new Email('recover-password', params);
|
||||
|
|
|
@ -23,7 +23,10 @@ export default class Auth {
|
|||
|
||||
initialize() {
|
||||
let criteria = {
|
||||
to: state => !state.name.includes('login')
|
||||
to: state => {
|
||||
const outLayout = ['login', 'recoverPassword', 'resetPassword'];
|
||||
return !outLayout.some(ol => ol == state.name);
|
||||
}
|
||||
};
|
||||
this.$transitions.onStart(criteria, transition => {
|
||||
if (this.loggedIn)
|
||||
|
|
|
@ -14,21 +14,9 @@ export default class App extends Component {
|
|||
}
|
||||
|
||||
get showLayout() {
|
||||
let state = this.$state.current.name;
|
||||
console.log(this.$state.current.name);
|
||||
return state && !this.isLogin && !this.isRecover && !this.isReset;
|
||||
}
|
||||
|
||||
get isLogin() {
|
||||
return this.$state.current.name == 'login';
|
||||
}
|
||||
|
||||
get isRecover() {
|
||||
return this.$state.current.name == 'login.recover-password';
|
||||
}
|
||||
|
||||
get isReset() {
|
||||
return this.$state.current.name == 'login.reset-password';
|
||||
const state = this.$state.current.name;
|
||||
const outLayout = ['login', 'recoverPassword', 'resetPassword'];
|
||||
return state && !outLayout.some(ol => ol == state);
|
||||
}
|
||||
|
||||
$onDestroy() {
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
HOLA
|
||||
<ui-view>HOLA</ui-view>
|
||||
<ui-view></ui-view>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<vn-spinner enable="$ctrl.loading"></vn-spinner>
|
||||
</div>
|
||||
<div class="vn-pt-lg">
|
||||
<a ui-sref="login.recover-password" translate>
|
||||
<a ui-sref="recoverPassword" translate>
|
||||
I do not remember my password
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -9,14 +9,14 @@ function config($stateProvider, $urlRouterProvider) {
|
|||
.state('login', {
|
||||
url: '/login?continue',
|
||||
description: 'Login',
|
||||
component: '<vn-out-layout></vn-out-layout>'
|
||||
template: '<vn-login></vn-login>'
|
||||
})
|
||||
.state('login.recover-password', {
|
||||
.state('recoverPassword', {
|
||||
url: '/recover-password',
|
||||
description: 'Recover-password',
|
||||
template: '<vn-recover-password></vn-recover-password>'
|
||||
template: '<vn-recover-password>asd</vn-recover-password>'
|
||||
})
|
||||
.state('login.reset-password', {
|
||||
.state('resetPassword', {
|
||||
url: '/reset-password',
|
||||
description: 'Reset-password',
|
||||
template: '<vn-reset-password></vn-reset-password>'
|
||||
|
|
|
@ -245,5 +245,6 @@
|
|||
"Already has this status": "Ya tiene este estado",
|
||||
"There aren't records for this week": "No existen registros para esta semana",
|
||||
"Empty data source": "Origen de datos vacio",
|
||||
"Email verify": "Correo de verificación"
|
||||
}
|
||||
"Email verify": "Correo de verificación",
|
||||
"Landing cannot be lesser than shipment": "Landing cannot be lesser than shipment"
|
||||
}
|
Loading…
Reference in New Issue