website cleanup

This commit is contained in:
2025-12-25 00:19:36 +01:00
parent d78854a4c6
commit 9486455b9e
82 changed files with 1223 additions and 363 deletions

View File

@@ -1,9 +1,4 @@
// Note: No generated DTO available for RequestAvatarGeneration yet
interface RequestAvatarGenerationDTO {
success: boolean;
avatarUrl?: string;
error?: string;
}
import { RequestAvatarGenerationOutputDTO } from '../types/generated/RequestAvatarGenerationOutputDTO';
/**
* Request Avatar Generation View Model
@@ -12,13 +7,15 @@ interface RequestAvatarGenerationDTO {
*/
export class RequestAvatarGenerationViewModel {
success: boolean;
avatarUrl?: string;
error?: string;
requestId?: string;
avatarUrls?: string[];
errorMessage?: string;
constructor(dto: RequestAvatarGenerationDTO) {
constructor(dto: RequestAvatarGenerationOutputDTO) {
this.success = dto.success;
if (dto.avatarUrl !== undefined) this.avatarUrl = dto.avatarUrl;
if (dto.error !== undefined) this.error = dto.error;
if (dto.requestId !== undefined) this.requestId = dto.requestId;
if (dto.avatarUrls !== undefined) this.avatarUrls = dto.avatarUrls;
if (dto.errorMessage !== undefined) this.errorMessage = dto.errorMessage;
}
/** UI-specific: Whether generation was successful */
@@ -28,6 +25,11 @@ export class RequestAvatarGenerationViewModel {
/** UI-specific: Whether there was an error */
get hasError(): boolean {
return !!this.error;
return !!this.errorMessage;
}
/** UI-specific: Get first avatar URL */
get firstAvatarUrl(): string | undefined {
return this.avatarUrls?.[0];
}
}