From d1636a3a2ae8e34bcbb5c51ce4afa4a3b13d0671 Mon Sep 17 00:00:00 2001 From: ReaperOfVeriod Date: Sun, 25 Oct 2026 06:16:07 +0100 Subject: [PATCH] Show collaboration action notices --- src/App.svelte | 9 +++++++-- src/styles.css | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index e207267..b84e308 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -138,6 +138,7 @@ let collaborationInvites: Array<{ user_id: string; invited_at: string; status: string }> = []; let collaborationBusy = false; let collaborationError = ''; + let collaborationNotice = ''; let showCollaboration = false; let collaborationGuestId = ''; let collaborators: Array<{ twitch_user_id: string; display_name: string; favorite: boolean; last_invited_at: string | null }> = []; @@ -562,6 +563,7 @@ const response = await fetch(`${serverAddress}/api/v1/twitch/collaboration/session`, { method: 'POST', headers: { authorization: `Bearer ${sessionToken}` } }); if (!response.ok) throw new Error('Twitch could not start a Guest Star session.'); collaborationSession = await response.json(); + collaborationNotice = 'Guest Star session started.'; await loadCollaboration(); } catch (error) { collaborationError = error instanceof Error ? error.message : 'Collaboration session failed.'; @@ -580,6 +582,7 @@ if (!response.ok) throw new Error('Twitch could not end the Guest Star session.'); collaborationSession = null; collaborationInvites = []; + collaborationNotice = 'Guest Star session ended.'; } catch (error) { collaborationError = error instanceof Error ? error.message : 'Collaboration session could not end.'; } finally { @@ -596,6 +599,7 @@ const response = await fetch(`${serverAddress}/api/v1/twitch/collaboration/invites/send?${query}`, { method: 'POST', headers: { authorization: `Bearer ${sessionToken}` } }); if (!response.ok) throw new Error('Twitch could not send the collaboration invite.'); collaborationGuestId = ''; + collaborationNotice = 'Collaboration invite sent.'; await loadCollaboration(); } catch (error) { collaborationError = error instanceof Error ? error.message : 'Invite could not be sent.'; @@ -613,6 +617,7 @@ const query = `session_id=${encodeURIComponent(collaborationSession.id)}&guest_id=${encodeURIComponent(guestId)}`; const response = await fetch(`${serverAddress}/api/v1/twitch/collaboration/invites/cancel?${query}`, { method: 'POST', headers: { authorization: `Bearer ${sessionToken}` } }); if (!response.ok) throw new Error('Twitch could not cancel the collaboration invite.'); + collaborationNotice = 'Collaboration invite cancelled.'; await loadCollaboration(); } catch (error) { collaborationError = error instanceof Error ? error.message : 'Invite could not be cancelled.'; @@ -1490,7 +1495,7 @@
GUEST STAR CALL
The call is controlled by Twitch

Twitch does not expose the call media as an embeddable Trixie API. Use Twitch for the live call controls while Trixie keeps the session, slots, invites, and shared-chat state synchronized.

PARTICIPANTS
{#each collaborationSession.guests as guest}
{guest.user_display_name || guest.user_id}{guest.is_live ? 'LIVE' : 'WAITING'}{guest.slot_id ? ` · SLOT ${guest.slot_id}` : ''}
{:else}
No participants have joined.
{/each}
SHARED CHAT
{#if sharedChatSession}
ACTIVE · {sharedChatSession.participants.length} CHANNELS
{:else}
Shared Chat is not active.
{/if}{#if collaborationSettings}
CHANNEL SETTINGS
{collaborationSettings.slot_count} SLOTS · {collaborationSettings.group_layout}
AUDIO {collaborationSettings.is_browser_source_audio_enabled ? 'ENABLED' : 'DISABLED'} · MODERATOR LIVE CONTROL {collaborationSettings.is_moderator_send_live_enabled ? 'ENABLED' : 'DISABLED'}
{/if}
- {#if collaborationError}
{collaborationError}
{/if} + {#if collaborationNotice}
{collaborationNotice}
{/if}{#if collaborationError}
{collaborationError}
{/if} {:else}
@@ -1499,7 +1504,7 @@
FIND A COLLABORATOR
searchCollaborators(event.currentTarget.value)} autocomplete="off" placeholder="Search Twitch" />
{#if collaboratorSearchBusy}
SEARCHING TWITCH…
{/if}{#if collaboratorSearchError}
{collaboratorSearchError}
{/if}{#if collaboratorResults.length}
{#each collaboratorResults as result}
{result.display_name} @{result.login}
{/each}
{:else if collaboratorSearch && !collaboratorSearchBusy && !collaboratorSearchError}
No exact Twitch user found.
{/if}
FAVORITES & RECENT
{#if collaborators.length}
{#each collaborators as collaborator}
{collaborator.display_name}{collaborator.favorite ? 'FAVORITE' : 'RECENT'}
{/each}
{:else}
No saved collaborators yet.
{/if}
INCOMING INVITATIONS
⌁
Waiting for a collaboration inviteAccept or decline invitations in Twitch. Trixie will reflect the authoritative status here when Twitch reports it.
- {#if collaborationError}
{collaborationError}
{/if} + {#if collaborationNotice}
{collaborationNotice}
{/if}{#if collaborationError}
{collaborationError}
{/if}
{/if} {:else if activeView === 'Overlays'} diff --git a/src/styles.css b/src/styles.css index 63a32e3..cf66462 100644 --- a/src/styles.css +++ b/src/styles.css @@ -416,6 +416,11 @@ label { color: var(--ed-warn); font: 10px/1.4 var(--font-data); } +.collaboration-notice { + margin-top: 8px; + color: var(--ed-good); + font: 10px/1.4 var(--font-data); +} .auth-gate { min-height: 300px; }