Commit 4b8bf43
Claude Code Agent
fix(mafia-vue): prevent game master from kicking themselves
Two-part guard so the GM cannot accidentally kick themselves out of
the room (which used to leave the room hostless until someone else
claimed it):
- Template: change the per-player kick button's v-if from 'admin'
to 'admin && !p.admin', hiding the X next to the GM's own row.
- Method: defensive check in kickPlayer — if the target name
matches this.iPlayer.name, flash an alert and short-circuit
before emitting the socket event. Covers the case where the
component state somehow lets the button slip through, and
keeps the rule local to the component without needing a
server-side change.
ReARM-Agentic-Session: no-self-kick-1779379668
ReARM-Agent: 324b2ca3-403e-4126-b353-4787140daa651 parent cbbdb27 commit 4b8bf43
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
338 | 342 | | |
339 | 343 | | |
340 | 344 | | |
| |||
0 commit comments