More webapp changes+fixes
Build Docker and Deploy / Build Docker Container (push) Successful in 1m41s
Build Docker and Deploy / Run Unit-Tests (push) Successful in 9m31s
Build Docker and Deploy / Deploy to Server (push) Successful in 18s

This commit is contained in:
2025-12-05 21:36:50 +01:00
parent c554479604
commit 2b7950f5dc
44 changed files with 1245 additions and 189 deletions
@@ -0,0 +1,18 @@
export type DeliveryStatus = 'RETRY' | 'SUCCESS' | 'FAILED';
export interface Delivery {
delivery_id: string;
message_id: string;
receiver_user_id: string;
receiver_client_id: string;
timestamp_created: string;
timestamp_finalized: string | null;
status: DeliveryStatus;
retry_count: number;
next_delivery: string | null;
fcm_message_id: string | null;
}
export interface DeliveryListResponse {
deliveries: Delivery[];
}
+1
View File
@@ -5,4 +5,5 @@ export * from './subscription.model';
export * from './key-token.model';
export * from './client.model';
export * from './sender-name.model';
export * from './delivery.model';
export * from './api-response.model';
@@ -26,7 +26,8 @@ export interface CreateSubscriptionRequest {
}
export interface ConfirmSubscriptionRequest {
confirmed: boolean;
confirmed?: boolean;
active?: boolean;
}
export interface SubscriptionListResponse {
@@ -28,6 +28,7 @@ import {
ClientListResponse,
SenderNameStatistics,
SenderNameListResponse,
DeliveryListResponse,
} from '../models';
@Injectable({
@@ -167,6 +168,10 @@ export class ApiService {
return this.http.delete<Message>(`${this.baseUrl}/messages/${messageId}`);
}
getDeliveries(messageId: string): Observable<DeliveryListResponse> {
return this.http.get<DeliveryListResponse>(`${this.baseUrl}/messages/${messageId}/deliveries`);
}
// Subscription endpoints
getSubscriptions(userId: string, filter?: SubscriptionFilter): Observable<SubscriptionListResponse> {
let httpParams = new HttpParams();
@@ -0,0 +1,32 @@
import { Injectable, signal } from '@angular/core';
const EXPERT_MODE_KEY = 'scn_expert_mode';
@Injectable({
providedIn: 'root'
})
export class SettingsService {
private _expertMode = signal(false);
expertMode = this._expertMode.asReadonly();
constructor() {
this.loadFromStorage();
}
private loadFromStorage(): void {
const stored = localStorage.getItem(EXPERT_MODE_KEY);
if (stored === 'true') {
this._expertMode.set(true);
}
}
setExpertMode(enabled: boolean): void {
localStorage.setItem(EXPERT_MODE_KEY, String(enabled));
this._expertMode.set(enabled);
}
toggleExpertMode(): void {
this.setExpertMode(!this._expertMode());
}
}