Fix welcome modal when saving config
This commit is contained in:
parent
918058dea3
commit
414131338d
1 changed files with 2 additions and 1 deletions
|
@ -4,7 +4,7 @@ import { Event, GuardsCheckStart, NavigationEnd, Router, Scroll } from '@angular
|
||||||
import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core'
|
import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core'
|
||||||
import { is18nPath } from '../../../shared/models/i18n'
|
import { is18nPath } from '../../../shared/models/i18n'
|
||||||
import { ScreenService } from '@app/shared/misc/screen.service'
|
import { ScreenService } from '@app/shared/misc/screen.service'
|
||||||
import { debounceTime, filter, map, pairwise, skip, switchMap } from 'rxjs/operators'
|
import { debounceTime, filter, first, map, pairwise, skip, switchMap } from 'rxjs/operators'
|
||||||
import { Hotkey, HotkeysService } from 'angular2-hotkeys'
|
import { Hotkey, HotkeysService } from 'angular2-hotkeys'
|
||||||
import { I18n } from '@ngx-translate/i18n-polyfill'
|
import { I18n } from '@ngx-translate/i18n-polyfill'
|
||||||
import { fromEvent } from 'rxjs'
|
import { fromEvent } from 'rxjs'
|
||||||
|
@ -234,6 +234,7 @@ export class AppComponent implements OnInit {
|
||||||
private async openModalsIfNeeded () {
|
private async openModalsIfNeeded () {
|
||||||
this.serverService.configLoaded
|
this.serverService.configLoaded
|
||||||
.pipe(
|
.pipe(
|
||||||
|
first(),
|
||||||
switchMap(() => this.authService.userInformationLoaded),
|
switchMap(() => this.authService.userInformationLoaded),
|
||||||
map(() => this.authService.getUser()),
|
map(() => this.authService.getUser()),
|
||||||
filter(user => user.role === UserRole.ADMINISTRATOR)
|
filter(user => user.role === UserRole.ADMINISTRATOR)
|
||||||
|
|
Loading…
Reference in a new issue