json viewer
This commit is contained in:
@@ -80,20 +80,17 @@ export class HomePageComponent {
|
||||
this.accessKeyLabel = '';
|
||||
}
|
||||
|
||||
canOpenChatUi(): boolean {
|
||||
return this.session.peers().length > 0;
|
||||
}
|
||||
|
||||
async openChatUi(): Promise<void> {
|
||||
const peerId = this.session.activePeerId() ?? this.session.peers()[0]?.id;
|
||||
|
||||
if (!peerId) {
|
||||
this.session.error.set('No connected peers are available yet.');
|
||||
if (peerId) {
|
||||
this.session.selectPeer(peerId);
|
||||
await this.router.navigate(['/chat', peerId]);
|
||||
return;
|
||||
}
|
||||
|
||||
this.session.selectPeer(peerId);
|
||||
await this.router.navigate(['/chat', peerId]);
|
||||
this.session.error.set(null);
|
||||
await this.router.navigate(['/chat']);
|
||||
}
|
||||
|
||||
cycleTheme(): void {
|
||||
|
||||
Reference in New Issue
Block a user