Compare commits

..

3 Commits

Author SHA1 Message Date
ce5b3c7285 feat: Hub Village — page interactive avec 5 zones et PNJ
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 23s
- VillagePage: 5 zones (place, arène, quêtes, forge, échoppe) avec ambiance
- NPC cards: dialogue résolu par niveau/arc, actions directes (soins, navigation)
- Mira heal via POST /characters/rest + toast feedback
- Navigation actions → pages existantes (quêtes, boutique, forge, combat)
- NpcView type + npcApi endpoint frontend
- Route /village + icône Landmark dans la sidebar

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-28 18:08:14 +02:00
3ccb4a867c fix: multi-combat n'émettait pas quest.progress kill_monster
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 27s
Le combat x5 émettait kill_any mais pas kill_monster — les quêtes ciblant
un monstre spécifique ne progressaient pas en batch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-28 17:47:18 +02:00
06e082b11c feat: UI evolution — HudBar Tailwind + arcs collapsés intelligents
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 48s
- HudBar: migration inline styles → Tailwind, breakpoint 480px ultra-compact mobile
- QuestPage: arcs fermés par défaut sauf quête active/à réclamer, barre progression par arc
- QuestPage: migration inline styles → Tailwind (QuestCard, ArcSection, ArcQuestRow)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-28 17:39:01 +02:00
3 changed files with 9 additions and 25 deletions

View File

@@ -31,9 +31,7 @@ jobs:
- name: Restart pm2
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
pm2 describe tetardpg-backend >/dev/null 2>&1 \
&& pm2 reload tetardpg-backend --update-env \
|| (cd /var/www/tetardpg/backend && pm2 start dist/main.js --name tetardpg-backend && pm2 save)
su - tetardtek-brain -c 'pm2 reload tetardpg-backend --update-env'
# ── Frontend ─────────────────────────────────────────────────────────────
- name: Install & build frontend

View File

@@ -1,36 +1,23 @@
import { Controller, Get, Query, Req, UseGuards, BadRequestException } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { Controller, Get, Query, Req, UseGuards } from '@nestjs/common';
import { NpcService } from './npc.service';
import { AuthGuard } from '../auth/guards/auth.guard';
import { Character } from '../character/entities/character.entity';
@Controller('npcs')
@UseGuards(AuthGuard)
export class NpcController {
constructor(
private readonly npcService: NpcService,
@InjectRepository(Character)
private readonly characterRepo: Repository<Character>,
) {}
private async getCharacter(req: any) {
const character = await this.characterRepo.findOne({ where: { userId: req.user.id } });
if (!character) throw new BadRequestException('Aucun personnage trouvé');
return character;
}
constructor(private readonly npcService: NpcService) {}
/** GET /api/npcs — tous les PNJ visibles pour le joueur */
@Get()
async getAll(@Req() req: any) {
const char = await this.getCharacter(req);
return this.npcService.getVisibleNpcs(char.id, char.level);
const { characterId, level } = req.character;
return this.npcService.getVisibleNpcs(characterId, level);
}
/** GET /api/npcs/location?location=village_plaza — PNJ d'un emplacement */
/** GET /api/npcs?location=village_plaza — PNJ d'un emplacement */
@Get('location')
async getByLocation(@Req() req: any, @Query('location') location: string) {
const char = await this.getCharacter(req);
return this.npcService.getNpcsByLocation(char.id, char.level, location);
const { characterId, level } = req.character;
return this.npcService.getNpcsByLocation(characterId, level, location);
}
}

View File

@@ -4,11 +4,10 @@ import { Npc } from './npc.entity';
import { NpcController } from './npc.controller';
import { NpcService } from './npc.service';
import { PlayerQuestArc } from '../quest/player-quest-arc.entity';
import { Character } from '../character/entities/character.entity';
import { AuthModule } from '../auth/auth.module';
@Module({
imports: [TypeOrmModule.forFeature([Npc, PlayerQuestArc, Character]), AuthModule],
imports: [TypeOrmModule.forFeature([Npc, PlayerQuestArc]), AuthModule],
controllers: [NpcController],
providers: [NpcService],
exports: [NpcService],