Evolutions :
- Ajout d'icônes dans la scène, chapitre et arc - Possibilité de bouger les cases dans la partie graphe et les textes associés si ces derniers ne sont pas visibles - Changement sur le thème du graphe : mode sombre et plus blanc - Barre d'action en haut, même pour la partie scène - Mode sticky corrigé : plus de trou entre le haut du navigateur web et de la barre d'action Passage version 0.6.5
This commit is contained in:
@@ -36,11 +36,16 @@ public class ArcService {
|
||||
public record DeletionImpact(int chapters, int scenes) {}
|
||||
|
||||
public Arc createArc(String name, String description, String campaignId, int order) {
|
||||
return createArc(name, description, campaignId, order, null);
|
||||
}
|
||||
|
||||
public Arc createArc(String name, String description, String campaignId, int order, String icon) {
|
||||
Arc arc = Arc.builder()
|
||||
.name(name)
|
||||
.description(description)
|
||||
.campaignId(campaignId)
|
||||
.order(order)
|
||||
.icon(icon)
|
||||
.build();
|
||||
return arcRepository.save(arc);
|
||||
}
|
||||
|
||||
@@ -30,11 +30,16 @@ public class ChapterService {
|
||||
public record DeletionImpact(int scenes) {}
|
||||
|
||||
public Chapter createChapter(String name, String description, String arcId, int order) {
|
||||
return createChapter(name, description, arcId, order, null);
|
||||
}
|
||||
|
||||
public Chapter createChapter(String name, String description, String arcId, int order, String icon) {
|
||||
Chapter chapter = Chapter.builder()
|
||||
.name(name)
|
||||
.description(description)
|
||||
.arcId(arcId)
|
||||
.order(order)
|
||||
.icon(icon)
|
||||
.build();
|
||||
return chapterRepository.save(chapter);
|
||||
}
|
||||
|
||||
@@ -26,11 +26,16 @@ public class SceneService {
|
||||
}
|
||||
|
||||
public Scene createScene(String name, String description, String chapterId, int order) {
|
||||
return createScene(name, description, chapterId, order, null);
|
||||
}
|
||||
|
||||
public Scene createScene(String name, String description, String chapterId, int order, String icon) {
|
||||
Scene scene = Scene.builder()
|
||||
.name(name)
|
||||
.description(description)
|
||||
.chapterId(chapterId)
|
||||
.order(order)
|
||||
.icon(icon)
|
||||
.build();
|
||||
return sceneRepository.save(scene);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,9 @@ public class Arc {
|
||||
private String campaignId; // Référence vers la Campaign parente
|
||||
private int order; // Ordre de l'arc dans la campagne
|
||||
|
||||
/** Cle d'icone choisie par l'utilisateur (cf. CAMPAIGN_ICON_OPTIONS cote front). */
|
||||
private String icon;
|
||||
|
||||
// Champs narratifs enrichis (voir docs/maquettes/campagne/détail/)
|
||||
private String themes; // Thèmes principaux explorés dans cet arc
|
||||
private String stakes; // Enjeux globaux pour les personnages
|
||||
|
||||
@@ -21,6 +21,9 @@ public class Chapter {
|
||||
private String arcId; // Référence vers l'Arc parent
|
||||
private int order; // Ordre du chapitre dans l'arc
|
||||
|
||||
/** Cle d'icone choisie par l'utilisateur (cf. CAMPAIGN_ICON_OPTIONS cote front). */
|
||||
private String icon;
|
||||
|
||||
// Champs narratifs enrichis (voir docs/maquettes/campagne/détail/)
|
||||
private String gmNotes; // Notes privées du MJ (non exportées vers FoundryVTT)
|
||||
private String playerObjectives; // Objectifs des joueurs dans ce chapitre
|
||||
|
||||
@@ -21,6 +21,9 @@ public class Scene {
|
||||
private String chapterId; // Référence vers le Chapter parent
|
||||
private int order; // Ordre de la scène dans le chapitre
|
||||
|
||||
/** Cle d'icone choisie par l'utilisateur (cf. CAMPAIGN_ICON_OPTIONS cote front). */
|
||||
private String icon;
|
||||
|
||||
// === Contexte et ambiance ===
|
||||
private String location; // Lieu de la scène (ex: Taverne du Dragon d'Or)
|
||||
private String timing; // Moment (ex: Soir, à la tombée de la nuit)
|
||||
|
||||
@@ -37,6 +37,9 @@ public class ArcJpaEntity {
|
||||
@Column(name = "\"order\"", nullable = false)
|
||||
private int order;
|
||||
|
||||
@Column
|
||||
private String icon;
|
||||
|
||||
// Champs narratifs enrichis — ajoutés automatiquement par Hibernate DDL (ddl-auto=update)
|
||||
@Column(columnDefinition = "TEXT")
|
||||
private String themes;
|
||||
|
||||
@@ -37,6 +37,9 @@ public class ChapterJpaEntity {
|
||||
@Column(name = "\"order\"", nullable = false)
|
||||
private int order;
|
||||
|
||||
@Column
|
||||
private String icon;
|
||||
|
||||
// Champs narratifs enrichis — ajoutés automatiquement par Hibernate DDL (ddl-auto=update)
|
||||
@Column(name = "gm_notes", columnDefinition = "TEXT")
|
||||
private String gmNotes;
|
||||
|
||||
@@ -39,6 +39,9 @@ public class SceneJpaEntity {
|
||||
@Column(name = "\"order\"", nullable = false)
|
||||
private int order;
|
||||
|
||||
@Column
|
||||
private String icon;
|
||||
|
||||
// Champs narratifs enrichis — ajoutés automatiquement par Hibernate (ddl-auto=update)
|
||||
|
||||
// Contexte et ambiance
|
||||
|
||||
@@ -71,6 +71,7 @@ public class PostgresArcRepository implements ArcRepository {
|
||||
.description(jpaEntity.getDescription())
|
||||
.campaignId(jpaEntity.getCampaignId().toString())
|
||||
.order(jpaEntity.getOrder())
|
||||
.icon(jpaEntity.getIcon())
|
||||
.themes(jpaEntity.getThemes())
|
||||
.stakes(jpaEntity.getStakes())
|
||||
.gmNotes(jpaEntity.getGmNotes())
|
||||
@@ -99,6 +100,7 @@ public class PostgresArcRepository implements ArcRepository {
|
||||
.description(arc.getDescription())
|
||||
.campaignId(Long.parseLong(arc.getCampaignId()))
|
||||
.order(arc.getOrder())
|
||||
.icon(arc.getIcon())
|
||||
.themes(arc.getThemes())
|
||||
.stakes(arc.getStakes())
|
||||
.gmNotes(arc.getGmNotes())
|
||||
|
||||
@@ -71,6 +71,7 @@ public class PostgresChapterRepository implements ChapterRepository {
|
||||
.description(jpaEntity.getDescription())
|
||||
.arcId(jpaEntity.getArcId().toString())
|
||||
.order(jpaEntity.getOrder())
|
||||
.icon(jpaEntity.getIcon())
|
||||
.gmNotes(jpaEntity.getGmNotes())
|
||||
.playerObjectives(jpaEntity.getPlayerObjectives())
|
||||
.narrativeStakes(jpaEntity.getNarrativeStakes())
|
||||
@@ -96,6 +97,7 @@ public class PostgresChapterRepository implements ChapterRepository {
|
||||
.description(chapter.getDescription())
|
||||
.arcId(Long.parseLong(chapter.getArcId()))
|
||||
.order(chapter.getOrder())
|
||||
.icon(chapter.getIcon())
|
||||
.gmNotes(chapter.getGmNotes())
|
||||
.playerObjectives(chapter.getPlayerObjectives())
|
||||
.narrativeStakes(chapter.getNarrativeStakes())
|
||||
|
||||
@@ -71,6 +71,7 @@ public class PostgresSceneRepository implements SceneRepository {
|
||||
.description(jpaEntity.getDescription())
|
||||
.chapterId(jpaEntity.getChapterId().toString())
|
||||
.order(jpaEntity.getOrder())
|
||||
.icon(jpaEntity.getIcon())
|
||||
.location(jpaEntity.getLocation())
|
||||
.timing(jpaEntity.getTiming())
|
||||
.atmosphere(jpaEntity.getAtmosphere())
|
||||
@@ -104,6 +105,7 @@ public class PostgresSceneRepository implements SceneRepository {
|
||||
.description(scene.getDescription())
|
||||
.chapterId(Long.parseLong(scene.getChapterId()))
|
||||
.order(scene.getOrder())
|
||||
.icon(scene.getIcon())
|
||||
.location(scene.getLocation())
|
||||
.timing(scene.getTiming())
|
||||
.atmosphere(scene.getAtmosphere())
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ArcController {
|
||||
@PostMapping
|
||||
public ResponseEntity<ArcDTO> createArc(@RequestBody ArcDTO arcDTO) {
|
||||
Arc arc = arcMapper.toDomain(arcDTO);
|
||||
Arc createdArc = arcService.createArc(arc.getName(), arc.getDescription(), arc.getCampaignId(), arc.getOrder());
|
||||
Arc createdArc = arcService.createArc(arc.getName(), arc.getDescription(), arc.getCampaignId(), arc.getOrder(), arc.getIcon());
|
||||
return ResponseEntity.ok(arcMapper.toDTO(createdArc));
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ChapterController {
|
||||
@PostMapping
|
||||
public ResponseEntity<ChapterDTO> createChapter(@RequestBody ChapterDTO chapterDTO) {
|
||||
Chapter chapter = chapterMapper.toDomain(chapterDTO);
|
||||
Chapter createdChapter = chapterService.createChapter(chapter.getName(), chapter.getDescription(), chapter.getArcId(), chapter.getOrder());
|
||||
Chapter createdChapter = chapterService.createChapter(chapter.getName(), chapter.getDescription(), chapter.getArcId(), chapter.getOrder(), chapter.getIcon());
|
||||
return ResponseEntity.ok(chapterMapper.toDTO(createdChapter));
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public class SceneController {
|
||||
@PostMapping
|
||||
public ResponseEntity<SceneDTO> createScene(@RequestBody SceneDTO sceneDTO) {
|
||||
Scene scene = sceneMapper.toDomain(sceneDTO);
|
||||
Scene createdScene = sceneService.createScene(scene.getName(), scene.getDescription(), scene.getChapterId(), scene.getOrder());
|
||||
Scene createdScene = sceneService.createScene(scene.getName(), scene.getDescription(), scene.getChapterId(), scene.getOrder(), scene.getIcon());
|
||||
return ResponseEntity.ok(sceneMapper.toDTO(createdScene));
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,9 @@ public class ArcDTO {
|
||||
private String campaignId;
|
||||
private int order;
|
||||
|
||||
/** Cle d'icone (cf. CAMPAIGN_ICON_OPTIONS cote front). */
|
||||
private String icon;
|
||||
|
||||
// Champs narratifs enrichis
|
||||
private String themes;
|
||||
private String stakes;
|
||||
|
||||
@@ -17,6 +17,9 @@ public class ChapterDTO {
|
||||
private String arcId;
|
||||
private int order;
|
||||
|
||||
/** Cle d'icone (cf. CAMPAIGN_ICON_OPTIONS cote front). */
|
||||
private String icon;
|
||||
|
||||
// Champs narratifs enrichis
|
||||
private String gmNotes;
|
||||
private String playerObjectives;
|
||||
|
||||
@@ -17,6 +17,9 @@ public class SceneDTO {
|
||||
private String chapterId;
|
||||
private int order;
|
||||
|
||||
/** Cle d'icone (cf. CAMPAIGN_ICON_OPTIONS cote front). */
|
||||
private String icon;
|
||||
|
||||
// Champs narratifs enrichis
|
||||
private String location;
|
||||
private String timing;
|
||||
|
||||
@@ -24,6 +24,7 @@ public class ArcMapper {
|
||||
dto.setDescription(arc.getDescription());
|
||||
dto.setCampaignId(arc.getCampaignId());
|
||||
dto.setOrder(arc.getOrder());
|
||||
dto.setIcon(arc.getIcon());
|
||||
dto.setThemes(arc.getThemes());
|
||||
dto.setStakes(arc.getStakes());
|
||||
dto.setGmNotes(arc.getGmNotes());
|
||||
@@ -46,6 +47,7 @@ public class ArcMapper {
|
||||
.description(dto.getDescription())
|
||||
.campaignId(dto.getCampaignId())
|
||||
.order(dto.getOrder())
|
||||
.icon(dto.getIcon())
|
||||
.themes(dto.getThemes())
|
||||
.stakes(dto.getStakes())
|
||||
.gmNotes(dto.getGmNotes())
|
||||
|
||||
@@ -24,6 +24,7 @@ public class ChapterMapper {
|
||||
dto.setDescription(chapter.getDescription());
|
||||
dto.setArcId(chapter.getArcId());
|
||||
dto.setOrder(chapter.getOrder());
|
||||
dto.setIcon(chapter.getIcon());
|
||||
dto.setGmNotes(chapter.getGmNotes());
|
||||
dto.setPlayerObjectives(chapter.getPlayerObjectives());
|
||||
dto.setNarrativeStakes(chapter.getNarrativeStakes());
|
||||
@@ -44,6 +45,7 @@ public class ChapterMapper {
|
||||
.description(dto.getDescription())
|
||||
.arcId(dto.getArcId())
|
||||
.order(dto.getOrder())
|
||||
.icon(dto.getIcon())
|
||||
.gmNotes(dto.getGmNotes())
|
||||
.playerObjectives(dto.getPlayerObjectives())
|
||||
.narrativeStakes(dto.getNarrativeStakes())
|
||||
|
||||
@@ -27,6 +27,7 @@ public class SceneMapper {
|
||||
dto.setDescription(scene.getDescription());
|
||||
dto.setChapterId(scene.getChapterId());
|
||||
dto.setOrder(scene.getOrder());
|
||||
dto.setIcon(scene.getIcon());
|
||||
dto.setLocation(scene.getLocation());
|
||||
dto.setTiming(scene.getTiming());
|
||||
dto.setAtmosphere(scene.getAtmosphere());
|
||||
@@ -59,6 +60,7 @@ public class SceneMapper {
|
||||
.description(dto.getDescription())
|
||||
.chapterId(dto.getChapterId())
|
||||
.order(dto.getOrder())
|
||||
.icon(dto.getIcon())
|
||||
.location(dto.getLocation())
|
||||
.timing(dto.getTiming())
|
||||
.atmosphere(dto.getAtmosphere())
|
||||
|
||||
Reference in New Issue
Block a user