You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

45 regels
1.8 KiB

  1. // Feature flags compilati nel bundle. Modifica e ricostruisci (npm run build) per applicare.
  2. // Sotto-percorso pubblico del portale. '' = servito sulla radice.
  3. // Es. '/cards' → tutto risponde sotto https://host/cards/ (dietro reverse proxy).
  4. // Build-time: deve combaciare con basePath in next.config.ts (che lo importa da qui).
  5. export const BASE_PATH = '/cards';
  6. export const EXTERNAL_LINK_ENABLED = true;
  7. // Mostra la sezione "Factory Preset" (salva preset + factory reset) nell'admin.
  8. // Funzione developer: tienila a false in produzione, true solo quando serve
  9. // preparare/distribuire un preset standard. Gli endpoint API restano comunque attivi.
  10. export const FACTORY_RESET_ENABLED = false;
  11. // Font di default se il portale non ne ha impostato uno.
  12. // Lascia stringa vuota per usare il font di sistema (Arial).
  13. // Per usare un font, scrivi il nome esatto del file presente in data/fonts/ (es. "Geist-Variable.woff2").
  14. export const DEFAULT_FONT = '';
  15. // Limiti caratteri per tutti i campi testuali compilabili dall'admin.
  16. // Validati lato server (app/api/cards/route.ts, app/api/portals/route.ts) e
  17. // usati lato client come maxLength + contatore (app/admin/page.tsx).
  18. export const TEXT_LIMITS = {
  19. card: {
  20. title: 200,
  21. shortDescription: 500,
  22. fullContent: 20_000,
  23. actionUrl: 2000,
  24. },
  25. portal: {
  26. title: 200,
  27. welcomeText: 1000,
  28. },
  29. } as const;
  30. // Dimensioni massime upload per famiglia di file (in byte).
  31. // Usati lato server in app/api/upload/route.ts; sforare → 413.
  32. // Nota: i video grandi vengono comunque transcodificati (può durare minuti).
  33. const MB = 1024 * 1024;
  34. export const UPLOAD_LIMITS = {
  35. image: 25 * MB, // 25 MB
  36. pdf: 20 * MB, // 20 MB (pdfjs lato browser non regge bene molto di più)
  37. video: 1024 * MB, // 1 GB
  38. } as const;