mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 08:33:11 +00:00
@@ -23,7 +23,7 @@ import {ConfigProvider} from '../../config/config.provider';
|
||||
styleUrls: ['about-page.scss'],
|
||||
})
|
||||
export class AboutPageComponent implements OnInit {
|
||||
content: Promise<SCAboutPage>;
|
||||
content: SCAboutPage;
|
||||
|
||||
constructor(
|
||||
private readonly route: ActivatedRoute,
|
||||
@@ -33,12 +33,11 @@ export class AboutPageComponent implements OnInit {
|
||||
async ngOnInit() {
|
||||
const route = this.route.snapshot.url.map(it => it.path).join('/');
|
||||
|
||||
this.content = new Promise(resolve => {
|
||||
this.configProvider
|
||||
.getValue('aboutPages')
|
||||
.then(value =>
|
||||
resolve((value as SCAppConfiguration['aboutPages'])[route] ?? {}),
|
||||
);
|
||||
});
|
||||
this.content =
|
||||
(
|
||||
this.configProvider.getValue(
|
||||
'aboutPages',
|
||||
) as SCAppConfiguration['aboutPages']
|
||||
)[route] ?? {};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<ion-menu-button></ion-menu-button>
|
||||
<ion-back-button></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-title *ngIf="content | async as content; else titleLoading">{{
|
||||
<ion-title *ngIf="content; else titleLoading">{{
|
||||
'title' | translateSimple: content
|
||||
}}</ion-title>
|
||||
<ng-template #titleLoading>
|
||||
@@ -29,7 +29,7 @@
|
||||
</ng-template>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content *ngIf="content | async as content">
|
||||
<ion-content *ngIf="content">
|
||||
<about-page-content
|
||||
*ngFor="let element of content.content"
|
||||
[content]="element"
|
||||
|
||||
Reference in New Issue
Block a user