fix: token bug
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
/* ============ THEME TOKENS ============ */
|
/* ============ THEME TOKENS ============ */
|
||||||
:host {
|
:host {
|
||||||
/* Light mode: warm sunset palette from background gradient */
|
/* Light mode: warm sunset palette from background gradient */
|
||||||
--nc-accent: #ff6b3d;
|
--nc-accent: #ff3dbb;
|
||||||
--nc-accent-hover: rgba(255, 107, 61, 0.15);
|
--nc-accent-hover: rgba(255, 107, 61, 0.15);
|
||||||
--nc-accent-badge: rgba(255, 107, 61, 0.9);
|
--nc-accent-badge: rgba(223, 61, 255, 0.9);
|
||||||
--nc-badge-text: #1a0800;
|
--nc-badge-text: #1a0800;
|
||||||
--nc-surface: rgba(26, 24, 56, 0.97);
|
--nc-surface: rgba(26, 24, 56, 0.97);
|
||||||
--nc-nav-bg: linear-gradient(180deg, rgba(26,24,56,0.88) 0%, rgba(46,32,80,0.6) 70%, rgba(74,41,98,0) 100%);
|
--nc-nav-bg: linear-gradient(180deg, rgba(26,24,56,0.88) 0%, rgba(46,32,80,0.6) 70%, rgba(74,41,98,0) 100%);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Injectable, inject } from '@angular/core';
|
import { Injectable, inject } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { BehaviorSubject, Observable } from 'rxjs';
|
import { BehaviorSubject, Observable } from 'rxjs';
|
||||||
import { map, tap } from 'rxjs/operators';
|
import { map, switchMap, tap } from 'rxjs/operators';
|
||||||
import { environment } from '../../environments/environment';
|
import { environment } from '../../environments/environment';
|
||||||
import { LoginRequest, RegisterRequest, RegisterResponse, LoginResponse, CurrentUser } from '../models/auth.models';
|
import { LoginRequest, RegisterRequest, RegisterResponse, LoginResponse, CurrentUser } from '../models/auth.models';
|
||||||
|
|
||||||
@@ -42,16 +42,9 @@ export class AuthService {
|
|||||||
email
|
email
|
||||||
})
|
})
|
||||||
.pipe(
|
.pipe(
|
||||||
tap((response) => {
|
switchMap((response) =>
|
||||||
localStorage.setItem('username', response.username);
|
this.login(username, password).pipe(map(() => response))
|
||||||
localStorage.setItem('userId', response.id);
|
)
|
||||||
this.currentUserSubject.next({
|
|
||||||
id: response.id,
|
|
||||||
username: response.username,
|
|
||||||
rating: response.rating,
|
|
||||||
createdAt: response.createdAt
|
|
||||||
});
|
|
||||||
})
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user