Save tour completion, hide welcome widget

This commit is contained in:
shamoon
2023-05-04 23:18:02 -07:00
parent ccba2e32e1
commit 54e8f64af3
8 changed files with 96 additions and 57 deletions

View File

@@ -484,7 +484,22 @@ export class SettingsService {
offerTour(): boolean {
return (
!this.savedViewService.loading &&
this.savedViewService.dashboardViews.length == 0
this.savedViewService.dashboardViews.length == 0 &&
!this.get(SETTINGS_KEYS.TOUR_COMPLETE)
)
}
completeTour() {
const tourCompleted = this.get(SETTINGS_KEYS.TOUR_COMPLETE)
if (!tourCompleted) {
this.set(SETTINGS_KEYS.TOUR_COMPLETE, true)
this.storeSettings()
.pipe(first())
.subscribe(() => {
this.toastService.showInfo(
$localize`You can restart the tour from the settings page.`
)
})
}
}
}