From ae59d3deac2095f7f013c1b2713d25e460845cbd Mon Sep 17 00:00:00 2001 From: Laurent Dubertrand Date: Wed, 11 Mar 2026 17:59:14 +0100 Subject: [PATCH] cosmetic fixes --- client/src/app/chat-page.component.scss | 4 +-- client/src/app/chat-page.component.ts | 37 ++++++++++++++++++------- client/src/app/chat-session.service.ts | 9 ++++++ 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/client/src/app/chat-page.component.scss b/client/src/app/chat-page.component.scss index f0a041b..81f0aff 100644 --- a/client/src/app/chat-page.component.scss +++ b/client/src/app/chat-page.component.scss @@ -22,7 +22,7 @@ width: min(95vw, 95%); height: min(calc(100dvh - 2rem), 1024px); max-height: 1024px; - margin-inline: 0 auto; + margin-inline: auto; overflow-x: hidden; } @@ -86,6 +86,7 @@ width: min(100%, 96rem); height: min(100dvh - 1.5rem, 100%); max-height: 100dvh; + border: 0; } .conversation-modal-header { @@ -94,7 +95,6 @@ justify-content: space-between; gap: 1rem; padding-bottom: 1rem; - border-bottom: 1px solid var(--surface-border-soft); } .conversation-modal-eyebrow { diff --git a/client/src/app/chat-page.component.ts b/client/src/app/chat-page.component.ts index 900c062..662ca1f 100644 --- a/client/src/app/chat-page.component.ts +++ b/client/src/app/chat-page.component.ts @@ -74,14 +74,31 @@ export class ChatPageComponent implements OnDestroy { readonly isDictating = signal(false); readonly isTranscribingDictation = signal(false); readonly emojiOptions = [ - '๐Ÿ˜€', '๐Ÿ˜', '๐Ÿ˜‚', '๐Ÿคฃ', '๐Ÿ˜Š', - '๐Ÿ˜‰', '๐Ÿ˜', '๐Ÿ˜˜', '๐Ÿ˜Ž', '๐Ÿค”', - '๐Ÿ˜…', '๐Ÿ˜ญ', '๐Ÿ˜ก', '๐Ÿ˜ด', '๐Ÿ™ƒ', - '๐Ÿ‘', '๐Ÿ‘Ž', '๐Ÿ‘', '๐Ÿ™', '๐Ÿค', - '๐ŸŽ‰', '๐Ÿ”ฅ', 'โค๏ธ', '๐Ÿ’ก', 'โœ…', - '๐Ÿš€', '๐Ÿ‘€', '๐Ÿ“น', '๐Ÿ“Ž', '๐Ÿ’ฌ', - '๐ŸŒ', 'โšก', 'โญ', '๐ŸŽต', '๐Ÿ“ท', - '๐Ÿ—‘๏ธ', 'โฉ', '๐Ÿ›‘', '๐Ÿ™Œ', '๐Ÿ‘Œ', + '๐Ÿ˜€', '๐Ÿ˜', '๐Ÿ˜‚', '๐Ÿคฃ', '๐Ÿ˜ƒ', '๐Ÿ˜„', '๐Ÿ˜…', '๐Ÿ˜†', '๐Ÿ˜‰', '๐Ÿ˜Š', + '๐Ÿ˜‹', '๐Ÿ˜Ž', '๐Ÿ˜', '๐Ÿ˜˜', '๐Ÿฅฐ', '๐Ÿ˜—', '๐Ÿ˜™', '๐Ÿ˜š', '๐Ÿ™‚', '๐Ÿค—', + '๐Ÿคฉ', '๐Ÿค”', '๐Ÿคจ', '๐Ÿ˜', '๐Ÿ˜‘', '๐Ÿ˜ถ', '๐Ÿ™„', '๐Ÿ˜', '๐Ÿ˜ฃ', '๐Ÿ˜ฅ', + '๐Ÿ˜ฎ', '๐Ÿค', '๐Ÿ˜ฏ', '๐Ÿ˜ช', '๐Ÿ˜ซ', '๐Ÿฅฑ', '๐Ÿ˜ด', '๐Ÿ˜Œ', '๐Ÿ˜›', '๐Ÿ˜œ', + '๐Ÿ˜', '๐Ÿคค', '๐Ÿ˜’', '๐Ÿ˜“', '๐Ÿ˜”', '๐Ÿ˜•', '๐Ÿ™ƒ', '๐Ÿซ ', '๐Ÿค‘', '๐Ÿ˜ฒ', + 'โ˜น๏ธ', '๐Ÿ™', '๐Ÿ˜–', '๐Ÿ˜ž', '๐Ÿ˜Ÿ', '๐Ÿ˜ค', '๐Ÿ˜ข', '๐Ÿ˜ญ', '๐Ÿ˜ฆ', '๐Ÿ˜ง', + '๐Ÿ˜จ', '๐Ÿ˜ฉ', '๐Ÿคฏ', '๐Ÿ˜ฌ', '๐Ÿ˜ฐ', '๐Ÿ˜ฑ', '๐Ÿฅต', '๐Ÿฅถ', '๐Ÿ˜ณ', '๐Ÿคช', + '๐Ÿ˜ต', '๐Ÿฅด', '๐Ÿ˜ ', '๐Ÿ˜ก', '๐Ÿคฌ', '๐Ÿ˜ท', '๐Ÿค’', '๐Ÿค•', '๐Ÿคข', '๐Ÿคฎ', + '๐Ÿคง', '๐Ÿ˜‡', '๐Ÿฅณ', '๐Ÿฅบ', '๐Ÿค ', '๐Ÿคก', '๐Ÿคฅ', '๐Ÿคซ', '๐Ÿคญ', '๐Ÿง', + '๐Ÿค“', '๐Ÿ˜ˆ', '๐Ÿ‘ฟ', '๐Ÿ‘น', '๐Ÿ‘บ', '๐Ÿ’€', 'โ˜ ๏ธ', '๐Ÿ‘ป', '๐Ÿ‘ฝ', '๐Ÿค–', + '๐Ÿ’ฉ', '๐Ÿ˜บ', '๐Ÿ˜ธ', '๐Ÿ˜น', '๐Ÿ˜ป', '๐Ÿ˜ผ', '๐Ÿ˜ฝ', '๐Ÿ™€', '๐Ÿ˜ฟ', '๐Ÿ˜พ', + '๐Ÿ™ˆ', '๐Ÿ™‰', '๐Ÿ™Š', '๐Ÿ’‹', '๐Ÿ’Œ', '๐Ÿ’˜', '๐Ÿ’', '๐Ÿ’–', '๐Ÿ’—', '๐Ÿ’“', + '๐Ÿ’ž', '๐Ÿ’•', 'โค๏ธ', '๐Ÿงก', '๐Ÿ’›', '๐Ÿ’š', '๐Ÿ’™', '๐Ÿ’œ', '๐Ÿ–ค', '๐Ÿค', + '๐ŸคŽ', '๐Ÿ’”', 'โค๏ธโ€๐Ÿ”ฅ', 'โค๏ธโ€๐Ÿฉน', 'โฃ๏ธ', '๐Ÿ’ฏ', '๐Ÿ’ข', '๐Ÿ’ฅ', '๐Ÿ’ซ', '๐Ÿ’ฆ', + '๐Ÿ’จ', '๐Ÿ•ณ๏ธ', '๐Ÿ’ฌ', '๐Ÿ—จ๏ธ', '๐Ÿ—ฏ๏ธ', '๐Ÿ’ญ', '๐Ÿ’ค', '๐Ÿ‘‹', '๐Ÿคš', '๐Ÿ–๏ธ', + 'โœ‹', '๐Ÿ––', '๐Ÿซฑ', '๐Ÿซฒ', '๐Ÿซณ', '๐Ÿซด', '๐Ÿ‘Œ', '๐ŸคŒ', '๐Ÿค', 'โœŒ๏ธ', + '๐Ÿคž', '๐Ÿซฐ', '๐ŸคŸ', '๐Ÿค˜', '๐Ÿค™', '๐Ÿ‘ˆ', '๐Ÿ‘‰', '๐Ÿ‘†', '๐Ÿ‘‡', 'โ˜๏ธ', + '๐Ÿ‘', '๐Ÿ‘Ž', 'โœŠ', '๐Ÿ‘Š', '๐Ÿค›', '๐Ÿคœ', '๐Ÿ‘', '๐Ÿ™Œ', '๐Ÿซถ', '๐Ÿ‘', + '๐Ÿคฒ', '๐Ÿ™', 'โœ๏ธ', '๐Ÿ’…', '๐Ÿคณ', '๐Ÿ’ช', '๐Ÿฆพ', '๐Ÿฆฟ', '๐Ÿฆต', '๐Ÿฆถ', + '๐Ÿ‘‚', '๐Ÿฆป', '๐Ÿ‘ƒ', '๐Ÿง ', '๐Ÿซ€', '๐Ÿซ', '๐Ÿฆท', '๐Ÿฆด', '๐Ÿ‘€', '๐Ÿ‘๏ธ', + '๐Ÿ‘…', '๐Ÿ‘„', '๐Ÿซฆ', '๐ŸŒ', '๐ŸŒŽ', '๐ŸŒ', '๐ŸŒ•', 'โญ', '๐ŸŒŸ', 'โœจ', + 'โšก', '๐Ÿ”ฅ', '๐Ÿ’ง', '๐ŸŒˆ', 'โ˜€๏ธ', '๐ŸŒค๏ธ', 'โ›…', '๐ŸŒง๏ธ', 'โ›ˆ๏ธ', '๐ŸŒฉ๏ธ', + 'โ„๏ธ', 'โ˜ƒ๏ธ', 'โ˜”', '๐ŸŽ', '๐ŸŠ', '๐Ÿ‹', '๐Ÿ‰', '๐Ÿ‡', '๐Ÿ“', '๐Ÿ’', + '๐Ÿ‘', '๐Ÿ', '๐Ÿฅฅ', '๐Ÿฅ‘', '๐Ÿ”', '๐Ÿ•', '๐ŸŒฎ', '๐Ÿฃ', '๐Ÿช', '๐ŸŽ‚', + 'โ˜•', '๐Ÿต', '๐Ÿน', '๐ŸŽ‰', '๐ŸŽˆ', '๐ŸŽ', '๐Ÿ†', '๐Ÿš€', '๐Ÿ“ท', '๐ŸŽต', ]; readonly peerId = computed(() => this.routeParamMap().get('peerId') ?? ''); readonly peer = computed(() => this.session.peers().find((item) => item.id === this.peerId()) ?? null); @@ -274,7 +291,7 @@ export class ChatPageComponent implements OnDestroy { } this.session.selectPeer(peerId); - await this.session.connectToPeer(peerId); + await this.session.reconnectToPeer(peerId); } async sendMessage(): Promise { @@ -730,7 +747,7 @@ export class ChatPageComponent implements OnDestroy { } canReconnectWebRtc(): boolean { - return this.indicatorTone(this.webRtcState()) === 'offline'; + return !!this.peerId() && this.indicatorTone(this.webRtcState()) !== 'ok'; } async switchPeer(peerId: string): Promise { diff --git a/client/src/app/chat-session.service.ts b/client/src/app/chat-session.service.ts index 7728691..544bcc2 100644 --- a/client/src/app/chat-session.service.ts +++ b/client/src/app/chat-session.service.ts @@ -382,6 +382,15 @@ export class ChatSessionService { await this.negotiatePeer(peerId, bundle); } + async reconnectToPeer(peerId: string): Promise { + if (!peerId) { + return; + } + + this.releasePeerBundle(peerId, true); + await this.connectToPeer(peerId); + } + localCallStreamForPeer(peerId: string): MediaStream | null { return this.localCallStreams().find((entry) => entry.peerId === peerId)?.stream ?? null; }