Browse Source

Features dialog fixed.

pull/347/head
Sebastian Stehle 7 years ago
parent
commit
7740d2f5f1
  1. 16
      src/Squidex/app/features/apps/pages/apps-page.component.ts
  2. 2
      src/Squidex/app/features/apps/pages/news-dialog.component.html

16
src/Squidex/app/features/apps/pages/apps-page.component.ts

@ -42,18 +42,21 @@ export class AppsPageComponent implements OnInit {
} }
public ngOnInit() { public ngOnInit() {
this.appsState.apps.pipe( const shouldShowOnboarding = this.onboardingService.shouldShow('dialog');
take(1))
this.appsState.apps.pipe(take(1))
.subscribe(apps => { .subscribe(apps => {
if (this.onboardingService.shouldShow('dialog')) { if (shouldShowOnboarding && apps.length === 0) {
if (apps.length === 0) {
this.onboardingService.disable('dialog'); this.onboardingService.disable('dialog');
this.onboardingDialog.show(); this.onboardingDialog.show();
} }
} else { });
if (!shouldShowOnboarding) {
const newsVersion = this.localStore.getInt('squidex.news.version'); const newsVersion = this.localStore.getInt('squidex.news.version');
this.newsService.getFeatures(newsVersion).subscribe(result => { this.newsService.getFeatures(newsVersion)
.subscribe(result => {
if (result.version !== newsVersion) { if (result.version !== newsVersion) {
if (result.features.length > 0) { if (result.features.length > 0) {
this.newsFeatures = result.features; this.newsFeatures = result.features;
@ -64,7 +67,6 @@ export class AppsPageComponent implements OnInit {
} }
}); });
} }
});
} }
public createNewApp(template: string) { public createNewApp(template: string) {

2
src/Squidex/app/features/apps/pages/news-dialog.component.html

@ -1,4 +1,4 @@
<sqx-modal-dialog large="true"> <sqx-modal-dialog large="true" (closed)="closed.emit()">
<ng-container title> <ng-container title>
New Features New Features
</ng-container> </ng-container>

Loading…
Cancel
Save