mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-22 00:52:42 -05:00
Save tour completion, hide welcome widget
This commit is contained in:
@@ -2,6 +2,7 @@ import { Component } from '@angular/core'
|
||||
import { SavedViewService } from 'src/app/services/rest/saved-view.service'
|
||||
import { SettingsService } from 'src/app/services/settings.service'
|
||||
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
|
||||
import { TourService } from 'ngx-ui-tour-ng-bootstrap'
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
@@ -11,7 +12,8 @@ import { ComponentWithPermissions } from '../with-permissions/with-permissions.c
|
||||
export class DashboardComponent extends ComponentWithPermissions {
|
||||
constructor(
|
||||
public settingsService: SettingsService,
|
||||
public savedViewService: SavedViewService
|
||||
public savedViewService: SavedViewService,
|
||||
private tourService: TourService
|
||||
) {
|
||||
super()
|
||||
}
|
||||
@@ -23,4 +25,12 @@ export class DashboardComponent extends ComponentWithPermissions {
|
||||
return $localize`Welcome to Paperless-ngx`
|
||||
}
|
||||
}
|
||||
|
||||
completeTour() {
|
||||
if (this.tourService.getStatus() !== 0) {
|
||||
this.tourService.end() // will call settingsService.completeTour()
|
||||
} else {
|
||||
this.settingsService.completeTour()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user