fix(api,frontend): delete is the true inverse of adopt, no reseed
/creatures/:id/delete now just removes the row, matching how POST /creatures (adopt) just inserts one — no side effects on anything else. The auto-reseed was scope creep for a feature that only ever made sense as a public marketing-site action; now that delete lives in the app itself as a per-creature control, that safety net isn't needed. Adds a Delete button next to Feed/Play/Sleep/Revive on every creature card, same creatureAction() plumbing as the existing actions.
This commit is contained in:
@@ -29,6 +29,8 @@ const i18n = {
|
||||
play: '🎮 Play',
|
||||
sleep: '💤 Sleep',
|
||||
revive: '✨ Revive',
|
||||
delete: '🗑️',
|
||||
delete_title: 'Delete permanently — the opposite of Adopt',
|
||||
alive: 'Alive',
|
||||
dead: 'Dead',
|
||||
empty_title: 'No creatures yet!',
|
||||
@@ -47,6 +49,8 @@ const i18n = {
|
||||
play: '🎮 Jouer',
|
||||
sleep: '💤 Dormir',
|
||||
revive: '✨ Ressusciter',
|
||||
delete: '🗑️',
|
||||
delete_title: "Supprimer definitivement — l'oppose d'Adopter",
|
||||
alive: 'Vivant',
|
||||
dead: 'Mort',
|
||||
empty_title: 'Pas encore de créatures !',
|
||||
@@ -226,6 +230,7 @@ function renderCreatures() {
|
||||
` : `
|
||||
<button class="action-btn revive" onclick="creatureAction('${c.id}', 'revive')">${t('revive')}</button>
|
||||
`}
|
||||
<button class="action-btn delete" title="${t('delete_title')}" onclick="creatureAction('${c.id}', 'delete')">${t('delete')}</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user