Release 1.179.1 (#1144)

This commit is contained in:
Thomas Kaul
2022-08-13 12:16:39 +02:00
committed by GitHub
parent c7173761a3
commit e4e0a7d9f0
6 changed files with 17 additions and 3 deletions

View File

@@ -48,6 +48,8 @@ export class AuthGuard implements CanActivate {
.get()
.pipe(
catchError(() => {
console.log(`TODO: canActivate error (${state.url})`);
if (utmSource === 'ios') {
this.router.navigate(['/demo']);
resolve(false);
@@ -72,6 +74,8 @@ export class AuthGuard implements CanActivate {
})
)
.subscribe((user) => {
console.log(`TODO: canActivate`, user);
if (
state.url.startsWith('/home') &&
user.settings.viewMode === ViewMode.ZEN

View File

@@ -24,10 +24,15 @@ export class AuthPageComponent implements OnDestroy, OnInit {
) {}
public ngOnInit() {
console.log('TODO: Init AuthPageComponent');
this.route.params
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe((params) => {
const jwt = params['jwt'];
console.log(`TODO: ${jwt}`);
this.tokenStorageService.saveToken(
jwt,
this.settingsStorageService.getSetting(STAY_SIGNED_IN) === 'true'

View File

@@ -22,6 +22,8 @@ export class TokenStorageService {
}
public saveToken(token: string, staySignedIn = false): void {
console.log('TODO: saveToken', token);
if (staySignedIn) {
window.localStorage.setItem(TOKEN_KEY, token);
}