mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
feat(orbit): per-guest suggestion mute + global pending-cap setting
Two anti-spam knobs the host can dial during a live session: 1. Per-guest suggestion mute — Mic / MicOff toggle next to the kick/ban buttons in the participants popover. Symmetric (re-enable later). State lives in OrbitState.suggestionBlocked: string[]; the guest reads it and disables its own Suggest controls so the user sees a clear "muted" state instead of silent failures. Host-side sweep also drops their outbox entries as a safety net. 2. Max pending approvals cap — number input in the session-settings popover, default 0 (= unlimited so existing sessions are unaffected). When set, the host sweep stops folding new outbox entries into the approval list once the cap is reached. The OrbitQueueHead surfaces "X / Y pending" so guests can see when they're getting close. State changes are additive on the wire — both fields are optional, with parseOrbitState defaulting them, so older clients keep working. evaluateOrbitSuggestGate() centralises the guest-side allow/block check shared between useOrbitSongRowBehavior and the ContextMenu Add-to-Session items, plus suggestOrbitTrack as a defensive last line. i18n: en + de + fr + nl + zh + nb + ru + es. Also fixes an earlier dedupe-key collision: the (user, trackId) cache keys were missing their separator (NULL byte slipped in during the previous patch), so two tracks could share a key and one of them silently overwrite the other. Restored the space separator. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11847,6 +11847,11 @@ html[data-psy-native-hidden="true"] *::after {
|
||||
background: color-mix(in srgb, var(--ctp-red, #f38ba8) 12%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ctp-red, #f38ba8) 35%, transparent);
|
||||
}
|
||||
.orbit-participants-pop__kick.is-active {
|
||||
color: var(--ctp-peach, #fab387);
|
||||
background: color-mix(in srgb, var(--ctp-peach, #fab387) 16%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ctp-peach, #fab387) 45%, transparent);
|
||||
}
|
||||
|
||||
/* ── Exit modal ────────────────────────────────────────────────────── */
|
||||
.orbit-exit-overlay {
|
||||
@@ -12383,6 +12388,22 @@ html[data-psy-native-hidden="true"] *::after {
|
||||
.orbit-settings-pop__row--stacked:hover {
|
||||
background: transparent;
|
||||
}
|
||||
.orbit-settings-pop__number {
|
||||
width: 64px;
|
||||
padding: 4px 6px;
|
||||
border-radius: 6px;
|
||||
background: var(--ctp-surface0, rgba(127, 127, 127, 0.12));
|
||||
border: 1px solid color-mix(in srgb, var(--text-secondary) 18%, transparent);
|
||||
color: var(--text-primary);
|
||||
font-size: 12px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
text-align: right;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.orbit-settings-pop__number:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.orbit-settings-pop__preset-group {
|
||||
display: flex;
|
||||
@@ -12519,6 +12540,26 @@ html[data-psy-native-hidden="true"] *::after {
|
||||
white-space: nowrap;
|
||||
min-width: 0;
|
||||
}
|
||||
.orbit-queue-head__pending {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
margin-left: auto;
|
||||
padding: 1px 6px;
|
||||
border-radius: 9px;
|
||||
background: color-mix(in srgb, var(--accent) 12%, transparent);
|
||||
border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
|
||||
color: var(--text-secondary);
|
||||
font-size: 10px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.orbit-queue-head__pending.is-full {
|
||||
color: var(--ctp-red, #f38ba8);
|
||||
background: color-mix(in srgb, var(--ctp-red, #f38ba8) 14%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ctp-red, #f38ba8) 40%, transparent);
|
||||
}
|
||||
.orbit-queue-head__pending svg { color: inherit; }
|
||||
|
||||
.orbit-guest-queue__current {
|
||||
position: relative;
|
||||
|
||||
Reference in New Issue
Block a user