mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-01 14:41:14 +00:00
[ACA-2064] support custom icons for extensions (#864)
* icon component, custom svg * split components, fix modules * simplify code * universal icon component * support custom icon registration * update docs * test fixes
This commit is contained in:
@@ -44,8 +44,6 @@ import { currentFolder } from '../../../store/selectors/app.selectors';
|
||||
import { AppStore } from '../../../store/states';
|
||||
import { BreakpointObserver } from '@angular/cdk/layout';
|
||||
import { SetSelectedNodesAction } from '../../../store/actions';
|
||||
import { MatIconRegistry } from '@angular/material';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
@Component({
|
||||
selector: 'app-layout',
|
||||
@@ -70,25 +68,14 @@ export class AppLayoutComponent implements OnInit, OnDestroy {
|
||||
private minimizeConditions: string[] = ['search'];
|
||||
private hideConditions: string[] = ['preview'];
|
||||
|
||||
customIcon: any = {
|
||||
join_library: './assets/images/join-library.svg'
|
||||
};
|
||||
|
||||
constructor(
|
||||
protected store: Store<AppStore>,
|
||||
private permission: NodePermissionService,
|
||||
private router: Router,
|
||||
private userPreferenceService: UserPreferencesService,
|
||||
private appConfigService: AppConfigService,
|
||||
private breakpointObserver: BreakpointObserver,
|
||||
matIconRegistry: MatIconRegistry,
|
||||
sanitizer: DomSanitizer
|
||||
) {
|
||||
matIconRegistry.addSvgIcon(
|
||||
'join_library',
|
||||
sanitizer.bypassSecurityTrustResourceUrl(this.customIcon['join_library'])
|
||||
);
|
||||
}
|
||||
private breakpointObserver: BreakpointObserver
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.isSmallScreen$ = this.breakpointObserver
|
||||
|
Reference in New Issue
Block a user