feat(ui): add enhanced user popover + rearrange sidebar (#1246)

Co-authored-by: brios <127139797+balazs-szucs@users.noreply.github.com>
This commit is contained in:
Alex
2026-05-10 14:23:55 +01:00
committed by GitHub
co-authored by brios
parent 868e8e6262
commit 1042cad74a
12 changed files with 579 additions and 140 deletions
@@ -33,11 +33,25 @@ describe('VersionService', () => {
expect(version).toEqual({current: '1.0.0', latest: '1.0.1'});
});
const request = httpTestingController.expectOne(`${API_CONFIG.BASE_URL}/api/v1/version`);
const request = httpTestingController.expectOne(req =>
req.url === `${API_CONFIG.BASE_URL}/api/v1/version` && req.params.has('_')
);
expect(request.request.method).toBe('GET');
request.flush({current: '1.0.0', latest: '1.0.1'});
});
it('returns unknown version details when the version request fails', () => {
service.getVersion().subscribe(version => {
expect(version).toEqual({current: 'unknown', latest: 'unknown'});
});
const request = httpTestingController.expectOne(req =>
req.url === `${API_CONFIG.BASE_URL}/api/v1/version` && req.params.has('_')
);
expect(request.request.method).toBe('GET');
request.flush('Version unavailable', {status: 500, statusText: 'Server Error'});
});
it('fetches the changelog entries', () => {
service.getChangelog().subscribe(entries => {
expect(entries).toEqual([{
@@ -1,6 +1,6 @@
import {inject, Injectable} from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import {HttpClient, HttpParams} from '@angular/common/http';
import {catchError, Observable, of} from 'rxjs';
import {API_CONFIG} from '../../core/config/api-config';
export interface AppVersion {
@@ -24,7 +24,9 @@ export class VersionService {
private versionUrl = `${API_CONFIG.BASE_URL}/api/v1/version`;
getVersion(): Observable<AppVersion> {
return this.http.get<AppVersion>(this.versionUrl);
return this.http.get<AppVersion>(this.versionUrl, {
params: new HttpParams().set('_', Date.now().toString()),
}).pipe(catchError(() => of({current: 'unknown', latest: 'unknown'})));
}
getChangelog(): Observable<ReleaseNote[]> {