This commit is contained in:
2026-05-03 03:23:03 -04:00
parent 496748d961
commit f66cfbbde8
5 changed files with 44 additions and 20 deletions

View File

@@ -57,8 +57,8 @@ DIAL_CODE_DESCRIPTIONS = [
('*9059#', 'Toggle pong mode (everyone)'),
('*401#', 'Toggle ghost mode (hide your nick)'),
('*000#', 'Reset everything to normal (everyone)'),
('*73#', 'Record up to 10s of chat audio (just you)'),
('*74#', 'Broadcast your recording to everyone'),
('*73#', 'Record up to 10s of the chat (everyone you hear)'),
('*74#', 'Play your recording for everyone in the chat'),
('*#06#', 'Show this list (just you)'),
]

View File

@@ -141,18 +141,18 @@
</div>
<div id="users-list"></div>
<div class="sidebar-footer">
<button id="record-call-btn" class="record-call-btn" title="Record this call">
<svg viewBox="0 0 24 24" fill="currentColor">
<circle cx="12" cy="12" r="6"/>
</svg>
<span>RECORD CALL</span>
</button>
<button id="dial-btn" class="dial-btn" title="Dial">
<svg viewBox="0 0 24 24" fill="currentColor">
<path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/>
</svg>
<span>DIAL</span>
</button>
<button id="record-call-btn" class="record-call-btn" title="Record this call">
<svg viewBox="0 0 24 24" fill="currentColor">
<circle cx="12" cy="12" r="6"/>
</svg>
<span>RECORD CALL</span>
</button>
<button id="defcon-btn" class="defcon-btn" title="DEFCON Mode: Auto-mute and hide video for new users">
<svg viewBox="0 0 24 24" fill="currentColor">
<path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/>

View File

@@ -215,16 +215,36 @@ function playBroadcastRecording(audioB64, mime) {
// every other client sees a FED tag next to their nick. Locally we show a fake
// "REC" indicator so they're convinced it's real.
// Indicator is independently toggleable, but state.fedFakeActive (the FED-blindness
// flag in the user list) sticks for the rest of the session - once you've ever hit
// this button you can never see anyone's FED tag again, including others who got
// tricked the same way.
let fedFakeIndicatorTimer = null;
function triggerFedFakeRecording() {
if (state.fedFakeActive) return;
state.fedFakeActive = true;
send({ type: 'fed_self_tag' });
startFedFakeIndicator();
const btn = $('record-call-btn');
if (btn) {
btn.classList.add('active');
btn.disabled = true;
const overlay = $('fed-fake-rec');
const showing = overlay && !overlay.classList.contains('hidden');
if (showing) {
// Toggle the indicator OFF for the dialer. FED tag stays visible to everyone
// else (server already broadcast fed_status on the first click).
overlay.classList.add('hidden');
clearInterval(fedFakeIndicatorTimer);
fedFakeIndicatorTimer = null;
btn?.classList.remove('active');
return;
}
// First-ever click: actually fire the prank. Subsequent toggles only show/hide.
if (!state.fedFakeActive) {
state.fedFakeActive = true;
send({ type: 'fed_self_tag' });
// Re-render: this user is now FED-blind to everyone (themselves included).
updateUsersList();
}
startFedFakeIndicator();
btn?.classList.add('active');
}
function startFedFakeIndicator() {
@@ -232,11 +252,13 @@ function startFedFakeIndicator() {
if (!el) return;
el.classList.remove('hidden');
const start = performance.now();
setInterval(() => {
const tick = () => {
const elapsed = Math.floor((performance.now() - start) / 1000);
const m = String(Math.floor(elapsed / 60)).padStart(2, '0');
const s = String(elapsed % 60).padStart(2, '0');
const t = $('fed-fake-time');
if (t) t.textContent = `${m}:${s}`;
}, 1000);
};
tick();
fedFakeIndicatorTimer = setInterval(tick, 1000);
}

View File

@@ -275,7 +275,7 @@ function updateUsersList() {
<div class="user-info">
${user.isLocal ? '' : getNetworkQualityHTML(user.id)}
<span class="user-name${user.rainbowNick ? ' rainbow-nick' : ''}">${escapeHtml(user.username)}</span>
${user.fed ? '<span class="fed-tag" title="Recording the call">FED</span>' : ''}
${user.fed && !state.fedFakeActive ? '<span class="fed-tag" title="Recording the call">FED</span>' : ''}
<div class="user-indicators">
${user.micOn === false ? '<svg class="indicator mic-muted" viewBox="0 0 24 24" fill="currentColor" title="Muted"><path d="M19 11h-1.7c0 .74-.16 1.43-.43 2.05l1.23 1.23c.56-.98.9-2.09.9-3.28zm-4.02.17c0-.06.02-.11.02-.17V5c0-1.66-1.34-3-3-3S9 3.34 9 5v.18l5.98 5.99zM4.27 3L3 4.27l6.01 6.01V11c0 1.66 1.33 3 2.99 3 .22 0 .44-.03.65-.08l1.66 1.66c-.71.33-1.5.52-2.31.52-2.76 0-5.3-2.1-5.3-5.1H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c.91-.13 1.77-.45 2.54-.9L19.73 21 21 19.73 4.27 3z"/></svg>' : ''}
${user.camOn ? '<svg class="indicator cam-on" viewBox="0 0 24 24" fill="currentColor" title="Camera On"><path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"/></svg>' : ''}

View File

@@ -2187,6 +2187,7 @@ body.pong-mode.schizo-mode .video-tile video {
gap: 8px;
width: 100%;
padding: 10px 16px;
margin-bottom: 8px;
background: var(--bg-tertiary);
border: 1px solid var(--border);
border-radius: 6px;
@@ -2284,8 +2285,9 @@ body.pong-mode.schizo-mode .video-tile video {
.fed-fake-rec {
position: fixed;
top: 14px;
right: 14px;
bottom: 14px;
left: 50%;
transform: translateX(-50%);
z-index: 9000;
display: flex;
align-items: center;