diff --git a/frontend/src/app/pages/altitude/chat/chat.component.ts b/frontend/src/app/pages/altitude/chat/chat.component.ts index e351228..5609440 100644 --- a/frontend/src/app/pages/altitude/chat/chat.component.ts +++ b/frontend/src/app/pages/altitude/chat/chat.component.ts @@ -7,6 +7,7 @@ import {FullSizeComponent} from '@shared-components/full-size/full-size.componen import {ChatBoxComponent} from '@pages/altitude/chat/components/chat/chat-box.component'; import {ServerListComponent} from '@pages/altitude/chat/components/server-list/server-list.component'; import {ChatInfoComponent} from '@pages/altitude/chat/components/chat-info/chat-info.component'; +import {BreakpointObserver, Breakpoints} from '@angular/cdk/layout'; @Component({ selector: 'app-chat', @@ -27,14 +28,21 @@ export class ChatComponent implements OnInit, AfterViewInit, OnDestroy { protected readonly messages = this.chatService.messages; protected readonly servers = this.chatService.servers; protected readonly selectedServer = this.chatService.selectedServer; - protected readonly showFullscreenPrompt = signal(true); + protected readonly showFullscreenPrompt = signal(false); + protected readonly isMobile = signal(false); - constructor(private interaction: MiniMessageInteractionService) { + constructor(private interaction: MiniMessageInteractionService, private breakpointObserver: BreakpointObserver) { interaction.clicks$.subscribe(({action, value}) => { if (action === 'run_command') { alert(value); } }); + this.breakpointObserver + .observe([Breakpoints.Handset]) + .subscribe(result => { + this.isMobile.set(result.matches); + this.showFullscreenPrompt.set(this.isMobile()); + }); } public onSelectedServerChange(server: string) {