Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

workbenchthis machine

src/ui/mod-menu.js builds the moderator menu for one chat line - Remove, Mute 10m/1h/24h/forever, Ban - and the exact /live frame each sends - module and test only #384

shipped merged opened this has it
opened this

From #198, piece 1 of 2. The server side is on main: /live takes {type:'delete',id}, {type:'mute',id,on:true,for:'10m'|'1h'|'24h'|'forever'} and {type:'ban',id,on:true} from the owner or a verified moderator (src/lobby.ts, MUTE_FOR).

Done:

  • [ ] New Software/so101/src/ui/mod-menu.js exports pure menuItems(line, me) (empty for your own line, for the owner's or a moderator's line when you are a moderator, and for anyone not owner or moderator) and frameFor(item, line) returning exactly the frames above, plus renderMenu(doc, items, onPick) that builds buttons of at least 44x44 px with text through textContent.
  • [ ] New src/ui/mod-menu.test.ts checks every frame shape, who sees no menu, and the button size.
  • [ ] Nothing loads it yet; viewer.html and lobby-panel.js are unchanged. bun --cwd Software/so101 test passes.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs