4077-login_recover-password & account_verifyEmail #1063

Merged
alexm merged 52 commits from 4077-login_recover-password into dev 2022-11-28 11:34:03 +00:00
2 changed files with 11 additions and 4 deletions
Showing only changes of commit d9e4ff6772 - Show all commits

View File

@ -12,9 +12,10 @@ export default class Component extends EventEmitter {
* @param {HTMLElement} $element The main component element * @param {HTMLElement} $element The main component element
* @param {$rootScope.Scope} $scope The element scope * @param {$rootScope.Scope} $scope The element scope
* @param {Function} $transclude The transclusion function * @param {Function} $transclude The transclusion function
* @param {Function} $location The location function
*/ */
constructor($element, $scope, $transclude) { constructor($element, $scope, $transclude, $location) {
super(); super($element, $scope, $transclude, $location);
this.$ = $scope; this.$ = $scope;
if (!$element) return; if (!$element) return;
@ -164,7 +165,7 @@ export default class Component extends EventEmitter {
$transclude.$$boundTransclude.$$slots[slot]; $transclude.$$boundTransclude.$$slots[slot];
} }
} }
Component.$inject = ['$element', '$scope']; Component.$inject = ['$element', '$scope', '$location', '$state'];
/* /*
* Automatically adds the most used services to the prototype, so they are * Automatically adds the most used services to the prototype, so they are

View File

@ -9,12 +9,18 @@ import Component from 'core/lib/component';
* @property {SideMenu} rightMenu The left menu, if it's present * @property {SideMenu} rightMenu The left menu, if it's present
*/ */
export default class App extends Component { export default class App extends Component {
constructor($element, $, $location, $state) {
super($element, $, $location, $state);
this.$location = $location;
this.$state = $state;
}
$postLink() { $postLink() {
alexm marked this conversation as resolved Outdated
Outdated
Review

Açò funciona en tots els casos? Que passa si un estat conte login?

Açò funciona en **tots** els casos? Que passa si un estat conte login?
this.vnApp.logger = this; this.vnApp.logger = this;
} }
get showLayout() { get showLayout() {
const state = this.$state.current.name; const state = this.$state.current.name || this.$location.$$path.substring(1).replace('/', '.');
const outLayout = ['login', 'recoverPassword', 'resetPassword']; const outLayout = ['login', 'recoverPassword', 'resetPassword'];
return state && !outLayout.some(ol => ol == state); return state && !outLayout.some(ol => ol == state);
} }