mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[AAE-10766] upgrade to new About component
This commit is contained in:
@@ -1,5 +1,29 @@
|
||||
<aca-page-layout>
|
||||
<aca-page-layout-content [scrollable]="true">
|
||||
<adf-about [dev]="dev" [pkg]="pkg"> </adf-about>
|
||||
<adf-about>
|
||||
<adf-about-panel *ngIf="dev" [label]="'ABOUT.SERVER_SETTINGS.TITLE' | translate">
|
||||
<ng-template>
|
||||
<adf-about-server-settings></adf-about-server-settings>
|
||||
</ng-template>
|
||||
</adf-about-panel>
|
||||
|
||||
<adf-about-panel [label]="'ABOUT.REPOSITORY' | translate" *ngIf="repository">
|
||||
<ng-template>
|
||||
<adf-about-repository-info [data]="repository"></adf-about-repository-info>
|
||||
</ng-template>
|
||||
</adf-about-panel>
|
||||
|
||||
<adf-about-panel *ngIf="dev" [label]="'ABOUT.PACKAGES.TITLE' | translate">
|
||||
<ng-template>
|
||||
<adf-about-package-list [dependencies]="pkg?.dependencies"></adf-about-package-list>
|
||||
</ng-template>
|
||||
</adf-about-panel>
|
||||
|
||||
<adf-about-panel *ngIf="extensions$ | async as extensions" [label]="'ABOUT.PLUGINS.TITLE' | translate">
|
||||
<ng-template>
|
||||
<adf-about-extension-list [data]="extensions"></adf-about-extension-list>
|
||||
</ng-template>
|
||||
</adf-about-panel>
|
||||
</adf-about>
|
||||
</aca-page-layout-content>
|
||||
</aca-page-layout>
|
||||
|
@@ -23,21 +23,44 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { DEV_MODE_TOKEN } from './dev-mode.tokens';
|
||||
import pkg from 'package.json';
|
||||
import { Observable } from 'rxjs';
|
||||
import { AppExtensionService, ExtensionRef } from '@alfresco/adf-extensions';
|
||||
import { AuthenticationService, DiscoveryApiService, RepositoryInfo } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-about-page',
|
||||
templateUrl: './about.component.html',
|
||||
styleUrls: ['./about.component.scss']
|
||||
})
|
||||
export class AboutComponent {
|
||||
export class AboutComponent implements OnInit {
|
||||
pkg: any;
|
||||
dev = false;
|
||||
extensions$: Observable<ExtensionRef[]>;
|
||||
repository: RepositoryInfo = null;
|
||||
|
||||
constructor(@Inject(DEV_MODE_TOKEN) devMode) {
|
||||
constructor(
|
||||
@Inject(DEV_MODE_TOKEN) devMode,
|
||||
private authService: AuthenticationService,
|
||||
private appExtensions: AppExtensionService,
|
||||
private discovery: DiscoveryApiService
|
||||
) {
|
||||
this.dev = !devMode;
|
||||
this.pkg = pkg;
|
||||
this.extensions$ = this.appExtensions.references$;
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.authService.isEcmLoggedIn()) {
|
||||
this.setECMInfo();
|
||||
}
|
||||
}
|
||||
|
||||
setECMInfo() {
|
||||
this.discovery.getEcmProductInfo().subscribe((repository) => {
|
||||
this.repository = repository as RepositoryInfo;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user