mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
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:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user