Files
ToBePlayed-Frontend/src/utils/limits.js
T
lobo 0c300c455d feat(audit): game catalog search and time to beat correction
New page /audit/games: search every game and open the correction dialog
without owning it. Time to beat as hours + minutes. Audit log game links
open /audit/games?appid=. Menu entry next to the link queue.
2026-10-02 11:21:15 +02:00

41 lines
1.7 KiB
JavaScript

// Limits and enums that Core or Auth check. Each copy names its server source: change both together.
// Core GameStatus
export const GAME_STATUSES = ['BACKLOG', 'PLAYING', 'FINISHED', 'COMPLETED', 'DROPPED'];
// Core GamePriority, in the order the UI shows it
export const GAME_PRIORITIES = ['HIGH', 'MEDIUM', 'LOW'];
// Core ManualGameUpdate.MAX_PLATFORM_LENGTH, Auth FavoritePlatformRequest @Size(max = 32)
export const MAX_PLATFORM_LENGTH = 32;
// Core ManualGameUpdate.MAX_MINUTES
export const MAX_PLAYTIME_MINUTES = 6_000_000;
// Core BacklogEntryDto.notes @Size(max = 2000)
export const MAX_NOTES_LENGTH = 2000;
// Core ImportRequest.MAX_ROWS
export const MAX_IMPORT_ROWS = 1000;
// Core ImportRequest.Row.title @Size(max = 100)
export const MAX_IMPORT_TITLE_LENGTH = 100;
// Core ManualGameController.search @Size(min = 2, max = 100)
export const MIN_GAME_SEARCH_LENGTH = 2;
export const MAX_GAME_SEARCH_LENGTH = 100;
// Frontend only: Core's library search takes any length.
export const MAX_LIBRARY_SEARCH_LENGTH = 100;
// Core GameCorrectionService.MAX_TEXT
export const MAX_CORRECTION_LENGTH = 512;
// Core GameCorrectionService.MAX_TIME_TO_BEAT_MINUTES
export const MAX_TIME_TO_BEAT_MINUTES = 60_000;
// Core GameCorrectionService.MAX_GENRES
export const MAX_CORRECTION_GENRES = 10;
// Auth DisplayNameFormat.PATTERN (3 to 24 characters)
export const MAX_DISPLAY_NAME_LENGTH = 24;
// Auth CreateHintRequest @Size(max = 500)
export const MAX_HINT_LENGTH = 500;
// Auth NewsRequest @Size(max = 100) and @Size(max = 2000)
export const MAX_NEWS_TITLE_LENGTH = 100;
export const MAX_NEWS_TEXT_LENGTH = 2000;
// Auth BroadcastRequest @Size(max = 150) and @Size(max = 5000)
export const MAX_BROADCAST_SUBJECT_LENGTH = 150;
export const MAX_BROADCAST_BODY_LENGTH = 5000;