manager-app/lib/Components/fetch_section_icon.dart
Thomas Fransolet c8947880ba Ecran VR, section Scene3D et medias immersifs
Canal VR
- L'entree VR affiche VrScreen au lieu de « non configuree » : sous-onglet
  Configuration (AppConfigurationLinkScreen reutilise) et sous-onglet Casques
  (pincode d'appairage, etat, batterie, version, dernier vu).
- Le dialogue de plan SuperAdmin porte aussi les canaux et les add-ons
  (assistant, contenu immersif). Activer un canal cree son
  ApplicationInstance s'il n'existe pas ; le desactiver ne supprime rien.

Medias immersifs
- Types Image360, Video360, Model3D : icones, libelles, extensions, apercu
  dans la Mediatheque et facettes.
- Au depot, la pastille de type bascule Image <-> Image 360 et
  Video <-> Video 360 : rien dans un .jpg ne dit qu'il est
  equirectangulaire. Un .glb est reconnu seul.
- ImageCompressor ne touche plus aux 360 ni aux GLB, sur les deux chemins
  d'upload : ramenee a 2560 px, une equirectangulaire devient illisible dans
  un casque.

Scene3D
- Nouveau type de section (famille des lieux) et son ecran de configuration :
  modele, mode objet/decor, points d'interet.
- Fond immersif d'une configuration, visible si l'instance a l'add-on : le
  type est deduit de la ressource choisie, avec une image de repli.

Client API edite a la main en miroir du backend : SectionScene3DApi,
Scene3DDTO, ImmersiveBackgroundDTO, Position3D, AppType sur les devices,
ResourceType etendu. Libelles FR/EN/NL.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 16:54:13 +02:00

79 lines
3.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:manager_app/l10n/app_localizations.dart';
import 'package:manager_api_new/api.dart';
String getSectionTypeName(AppLocalizations l, SectionType? type) {
switch (type) {
case SectionType.Map: return l.sectionTypeMap;
case SectionType.Slider: return l.sectionTypeSlider;
case SectionType.Video: return l.sectionTypeVideo;
case SectionType.Web: return l.sectionTypeWeb;
case SectionType.Menu: return l.sectionTypeMenu;
case SectionType.Quiz: return l.sectionTypeQuiz;
case SectionType.Article: return l.sectionTypeArticle;
case SectionType.Pdf: return l.sectionTypePdf;
case SectionType.Game: return l.sectionTypeGame;
case SectionType.Agenda: return l.sectionTypeAgenda;
case SectionType.Weather: return l.sectionTypeWeather;
case SectionType.Event: return l.sectionTypeEvent;
case SectionType.Parcours: return l.sectionTypeParcours;
case SectionType.Scene3D: return l.sectionTypeScene3D;
default: return l.sectionTypeDefault;
}
}
/// Une ligne qui dit ce que fait le type, pour la grille de choix : le client
/// choisit sans avoir à connaître le vocabulaire du produit.
String getSectionTypeDescription(AppLocalizations l, SectionType? type) {
switch (type) {
case SectionType.Map: return l.sectionTypeDescMap;
case SectionType.Slider: return l.sectionTypeDescSlider;
case SectionType.Video: return l.sectionTypeDescVideo;
case SectionType.Web: return l.sectionTypeDescWeb;
case SectionType.Menu: return l.sectionTypeDescMenu;
case SectionType.Quiz: return l.sectionTypeDescQuiz;
case SectionType.Article: return l.sectionTypeDescArticle;
case SectionType.Pdf: return l.sectionTypeDescPdf;
case SectionType.Game: return l.sectionTypeDescGame;
case SectionType.Agenda: return l.sectionTypeDescAgenda;
case SectionType.Weather: return l.sectionTypeDescWeather;
case SectionType.Event: return l.sectionTypeDescEvent;
case SectionType.Parcours: return l.sectionTypeDescParcours;
case SectionType.Scene3D: return l.sectionTypeDescScene3D;
default: return "";
}
}
IconData getSectionIcon(elementType) {
switch(elementType) {
case SectionType.Map:
return Icons.location_on;
case SectionType.Slider:
return Icons.collections; // art_track
case SectionType.Video:
return Icons.ondemand_video_rounded;
case SectionType.Web:
return Icons.web;
case SectionType.Menu:
return Icons.apps_sharp;
case SectionType.Quiz:
return Icons.question_answer;
case SectionType.Article:
return Icons.article_outlined;
case SectionType.Pdf:
return Icons.picture_as_pdf_outlined;
case SectionType.Game:
return Icons.sports_esports;
case SectionType.Agenda:
return Icons.calendar_month_outlined;
case SectionType.Weather:
return Icons.sunny;
case SectionType.Event:
return Icons.event;
case SectionType.Parcours:
return Icons.route;
case SectionType.Scene3D:
return Icons.view_in_ar;
}
return Icons.question_mark;
}