mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
add feedbacks on steam logout
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { Observable } from "rxjs";
|
||||
import { map } from "rxjs/operators";
|
||||
import { ConfigurationService } from "./configuration.service";
|
||||
|
||||
export class AuthUserService {
|
||||
@@ -22,6 +24,10 @@ export class AuthUserService {
|
||||
return !!this.configService.get(this.STEAM_USERNAME_KEY);
|
||||
}
|
||||
|
||||
public get sessionExist$(): Observable<boolean>{
|
||||
return this.configService.watch(this.STEAM_USERNAME_KEY).pipe(map(v => !!v));
|
||||
}
|
||||
|
||||
public setSteamSession(username: string, stay = true): void{
|
||||
this.configService.set(this.STEAM_USERNAME_KEY, username, stay);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user