|
|
@ -3,7 +3,7 @@ import { Filter, User } from '@ghostfolio/common/interfaces'; |
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
|
|
|
|
|
|
import { HttpClient } from '@angular/common/http'; |
|
|
import { HttpClient } from '@angular/common/http'; |
|
|
import { DestroyRef, Injectable } from '@angular/core'; |
|
|
import { DestroyRef, inject, Injectable } from '@angular/core'; |
|
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; |
|
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; |
|
|
import { MatDialog } from '@angular/material/dialog'; |
|
|
import { MatDialog } from '@angular/material/dialog'; |
|
|
import { ObservableStore } from '@codewithdan/observable-store'; |
|
|
import { ObservableStore } from '@codewithdan/observable-store'; |
|
|
@ -24,13 +24,13 @@ import { UserStoreState } from './user-store.state'; |
|
|
export class UserService extends ObservableStore<UserStoreState> { |
|
|
export class UserService extends ObservableStore<UserStoreState> { |
|
|
private deviceType: string; |
|
|
private deviceType: string; |
|
|
|
|
|
|
|
|
public constructor( |
|
|
private readonly destroyRef = inject(DestroyRef); |
|
|
private destroyRef: DestroyRef, |
|
|
private readonly deviceDetectorService = inject(DeviceDetectorService); |
|
|
private deviceDetectorService: DeviceDetectorService, |
|
|
private readonly dialog = inject(MatDialog); |
|
|
private dialog: MatDialog, |
|
|
private readonly http = inject(HttpClient); |
|
|
private http: HttpClient, |
|
|
private readonly webAuthnService = inject(WebAuthnService); |
|
|
private webAuthnService: WebAuthnService |
|
|
|
|
|
) { |
|
|
public constructor() { |
|
|
super({ trackStateHistory: true }); |
|
|
super({ trackStateHistory: true }); |
|
|
|
|
|
|
|
|
this.setState({ user: undefined }, UserStoreActions.Initialize); |
|
|
this.setState({ user: undefined }, UserStoreActions.Initialize); |
|
|
|