mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 23:16:21 +00:00
feat: soundboard pads can load from a JSON5 file (DB fallback)
When the server (soundboard_sounds table) returns no pads, the client now loads them from a JSON5 config file (loadGamedata accepts plain JSON and JSON5). Useful when the DB / CMS isn't set up yet. File-defined pads play locally for the clicker; DB-backed pads still go through the server broadcast so everyone in the room hears them. Ships a radio-style soundboard-sounds.json5.example template.
This commit is contained in:
@@ -53,7 +53,7 @@ export const SoundboardView: FC<{}> = () =>
|
||||
{ sounds.map(sound => (
|
||||
<button
|
||||
key={ sound.id }
|
||||
onClick={ () => play(sound.id) }
|
||||
onClick={ () => play(sound) }
|
||||
title={ sound.name }
|
||||
className="flex h-20 cursor-pointer flex-col items-center justify-center gap-1 rounded-lg bg-[#3a7bb5] px-2 text-white shadow transition-transform hover:bg-[#336ea3] active:scale-95">
|
||||
<span className="text-2xl leading-none">🔊</span>
|
||||
|
||||
Reference in New Issue
Block a user