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