code cleanup (#3210)

* code cleanup

* rollback changes

* remove dead code

* remove debug app config

* cleanup unused locales

* no-unused-vars rule

* test fixes and cleanup

* remove unnecessary translate modules
This commit is contained in:
Denys Vuika
2023-05-22 08:23:35 +01:00
committed by GitHub
parent 19e31adbb9
commit fd495f6e95
87 changed files with 197 additions and 841 deletions

View File

@@ -33,7 +33,7 @@ describe('AppSharedRuleGuard', () => {
const guard = new AppSharedRuleGuard(store);
const emittedSpy = jasmine.createSpy('emitted');
guard.canActivate({} as any).subscribe(emittedSpy);
guard.canActivate().subscribe(emittedSpy);
expect(emittedSpy).toHaveBeenCalledWith(true);
});
@@ -44,7 +44,7 @@ describe('AppSharedRuleGuard', () => {
const guard = new AppSharedRuleGuard(store);
const emittedSpy = jasmine.createSpy('emitted');
guard.canActivateChild({} as any).subscribe(emittedSpy);
guard.canActivateChild().subscribe(emittedSpy);
expect(emittedSpy).toHaveBeenCalledWith(true);
});
});

View File

@@ -23,7 +23,7 @@
*/
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot } from '@angular/router';
import { CanActivate } from '@angular/router';
import { Observable } from 'rxjs';
import { Store } from '@ngrx/store';
import { AppStore, isQuickShareEnabled } from '@alfresco/aca-shared/store';
@@ -38,11 +38,11 @@ export class AppSharedRuleGuard implements CanActivate {
this.isQuickShareEnabled$ = store.select(isQuickShareEnabled);
}
canActivate(_: ActivatedRouteSnapshot): Observable<boolean> {
canActivate(): Observable<boolean> {
return this.isQuickShareEnabled$;
}
canActivateChild(route: ActivatedRouteSnapshot): Observable<boolean> {
return this.canActivate(route);
canActivateChild(): Observable<boolean> {
return this.canActivate();
}
}