Nightly: Panic stoppt jetzt auch CHAOS und setzt Mode zurück; CHAOS-Button zeigt immer 'CHAOS' (aktiv mit Rainbow)
This commit is contained in:
parent
ec71858345
commit
399ab0a14b
1 changed files with 3 additions and 3 deletions
|
|
@ -270,7 +270,7 @@ export default function App() {
|
||||||
<button className="bg-gray-700 hover:bg-gray-600 text-white font-bold py-3 px-6 rounded-lg transition duration-300" onClick={async () => {
|
<button className="bg-gray-700 hover:bg-gray-600 text-white font-bold py-3 px-6 rounded-lg transition duration-300" onClick={async () => {
|
||||||
try { const res = await fetch('/api/sounds'); const data = await res.json(); const items = data?.items || []; if (!items.length || !selected) return; const rnd = items[Math.floor(Math.random()*items.length)]; const [guildId, channelId] = selected.split(':'); await playSound(rnd.name, guildId, channelId, volume, rnd.relativePath);} catch {}
|
try { const res = await fetch('/api/sounds'); const data = await res.json(); const items = data?.items || []; if (!items.length || !selected) return; const rnd = items[Math.floor(Math.random()*items.length)]; const [guildId, channelId] = selected.split(':'); await playSound(rnd.name, guildId, channelId, volume, rnd.relativePath);} catch {}
|
||||||
}}>Random</button>
|
}}>Random</button>
|
||||||
<button
|
<button
|
||||||
className={`font-bold py-3 px-6 rounded-lg transition duration-300 ${
|
className={`font-bold py-3 px-6 rounded-lg transition duration-300 ${
|
||||||
chaosMode
|
chaosMode
|
||||||
? 'chaos-rainbow text-white'
|
? 'chaos-rainbow text-white'
|
||||||
|
|
@ -278,9 +278,9 @@ export default function App() {
|
||||||
}`}
|
}`}
|
||||||
onClick={toggleChaosMode}
|
onClick={toggleChaosMode}
|
||||||
>
|
>
|
||||||
{chaosMode ? 'CHAOS ON' : 'CHAOS'}
|
CHAOS
|
||||||
</button>
|
</button>
|
||||||
<button className="bg-red-600 hover:bg-red-700 text-white font-bold py-3 px-6 rounded-lg transition duration-300" onClick={async () => { if (!selected) return; const [guildId] = selected.split(':'); await fetch(`/api/stop?guildId=${encodeURIComponent(guildId)}`, { method:'POST' }); }}>Panic</button>
|
<button className="bg-red-600 hover:bg-red-700 text-white font-bold py-3 px-6 rounded-lg transition duration-300" onClick={async () => { setChaosMode(false); await stopChaosMode(); }}>Panic</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue