Move toju-app into own its folder

This commit is contained in:
2026-03-29 23:30:37 +02:00
parent 0467a7b612
commit 8162e0444a
287 changed files with 42 additions and 34 deletions

View File

@@ -0,0 +1,23 @@
import type { Room } from '../../../shared-kernel';
import type { VoiceSessionInfo } from './voice-session.models';
export function isViewingVoiceSessionServer(
session: VoiceSessionInfo | null,
currentServerId: string | null
): boolean {
return !session || currentServerId === session.serverId;
}
export function buildVoiceSessionRoom(session: VoiceSessionInfo): Room {
return {
id: session.serverId,
name: session.serverName,
description: session.serverDescription,
hostId: '',
isPrivate: false,
createdAt: 0,
userCount: 0,
maxUsers: 50,
icon: session.serverIcon
};
}

View File

@@ -0,0 +1,21 @@
/**
* Snapshot of an active voice session, retained so that floating
* voice controls can display the connection details when the user
* navigates away from the server view.
*/
export interface VoiceSessionInfo {
/** Unique server identifier. */
serverId: string;
/** Display name of the server. */
serverName: string;
/** Room/channel ID within the server. */
roomId: string;
/** Display name of the room/channel. */
roomName: string;
/** Optional server icon (data-URL or remote URL). */
serverIcon?: string;
/** Optional server description. */
serverDescription?: string;
/** Angular route path to navigate back to the server. */
serverRoute: string;
}