refactor(shop): découpe MesPersos en sous-sections + nettoyage ProductCard
All checks were successful
Deploy XIP / deploy (push) Successful in 35s

- MesPersos.vue (347L) éclaté en 5 sous-composants autonomes sous
  shop/persos/ (BgPrefsSection, SendButtonPrefsSection, SendSkinPrefsSection,
  IpColorPrefsSection, PetsPrefsSection). MesPersos n'est plus qu'un wrapper.
- CSS partagé des sections déplacé en classes globales .pf-* dans style.css
  (plus de duplication entre les sections).
- ProductCard : metaJson typé via parseMeta<ProductMeta>(), suppression des
  casts `any` (find/designs) — comportement identique.
- vue-tsc --noEmit : 0 erreur.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 20:03:23 +02:00
parent aca608e520
commit 9dd72b9b2d
8 changed files with 323 additions and 342 deletions

View File

@@ -76,3 +76,41 @@ body,
background: var(--xip-app-bg);
font-family: 'Lato', sans-serif;
}
/* ── Styles partagés des sections « Mes Persos » (shop/persos/*) ──
Globaux (non scopés) pour être réutilisés par chaque sous-section sans
dupliquer le CSS. Préfixe .pf- (persos-form) pour éviter les collisions. */
.pf-section {
background: #101018;
border: 1px solid #20203a;
border-radius: 10px;
padding: 18px 20px;
}
.pf-section.pf-locked { opacity: 0.6; }
.pf-title {
font-size: 14px; font-weight: bold; color: #ccccee;
margin: 0 0 6px; display: flex; align-items: center; gap: 10px;
}
.pf-sub { font-size: 11px; color: #5a5a80; margin: 0 0 12px; }
.pf-lock {
font-size: 10px; font-weight: normal; color: #886644;
background: #1a1408; border: 1px solid #44330066; border-radius: 8px; padding: 2px 8px;
}
.pf-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-tile {
display: flex; flex-direction: column; align-items: center; gap: 6px;
background: #141420; border: 1px solid #222234; border-radius: 8px;
padding: 10px 14px; cursor: pointer; transition: border-color 0.1s, background 0.1s;
}
.pf-tile:hover:not(:disabled) { background: #1a1a2e; border-color: #333355; }
.pf-tile--active { border-color: #00ddff; background: #0a1a20; }
.pf-tile:disabled { cursor: not-allowed; opacity: 0.5; }
.pf-swatch {
width: 34px; height: 34px; border-radius: inherit;
display: flex; align-items: center; justify-content: center;
font-size: 14px; font-weight: bold; border: 1px solid #ffffff10;
}
.pf-label { font-size: 10px; color: #8888aa; white-space: nowrap; }
.pf-tile--active .pf-label { color: #00ddff; }
.pf-dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #ffffff22; }
.pf-dot--auto { background: conic-gradient(#00ddff, #ff00cc, #00ee77, #ffdd44, #00ddff); }