feat: dashboard

This commit is contained in:
2026-06-05 01:25:16 +02:00
parent 147858de2f
commit 2f6c52e73c
73 changed files with 3490 additions and 1061 deletions

View File

@@ -13,7 +13,7 @@ import { FormsModule } from '@angular/forms';
import { Store } from '@ngrx/store';
import { NavigationEnd, Router } from '@angular/router';
import { NgIcon, provideIcons } from '@ng-icons/core';
import { lucidePhone, lucidePlus } from '@ng-icons/lucide';
import { lucidePhone } from '@ng-icons/lucide';
import {
EMPTY,
Subject,
@@ -61,7 +61,7 @@ const ACTIVATION_DEBOUNCE_MS = 150;
ThemeNodeDirective,
UserBarComponent
],
viewProviders: [provideIcons({ lucidePhone, lucidePlus })],
viewProviders: [provideIcons({ lucidePhone })],
templateUrl: './servers-rail.component.html'
})
export class ServersRailComponent {
@@ -107,6 +107,13 @@ export class ServersRailComponent {
),
{ initialValue: this.isDirectMessageUrl(this.router.url) }
);
isOnDashboard = toSignal(
this.router.events.pipe(
filter((navigationEvent): navigationEvent is NavigationEnd => navigationEvent instanceof NavigationEnd),
map((navigationEvent) => navigationEvent.urlAfterRedirects.startsWith('/dashboard'))
),
{ initialValue: this.router.url.startsWith('/dashboard') }
);
isOnCall = toSignal(
this.router.events.pipe(
filter((navigationEvent): navigationEvent is NavigationEnd => navigationEvent instanceof NavigationEnd),
@@ -238,7 +245,7 @@ export class ServersRailComponent {
trackRoomId = (index: number, room: Room) => room.id;
createServer(): void {
goToDashboard(): void {
const voiceServerId = this.voiceSession.getVoiceServerId();
this.optimisticSelectedRoomId.set(null);
@@ -247,7 +254,7 @@ export class ServersRailComponent {
this.voiceSession.setViewingVoiceServer(false);
}
this.router.navigate(['/search']);
this.router.navigate(['/dashboard']);
}
joinSavedRoom(room: Room): void {
@@ -407,7 +414,7 @@ export class ServersRailComponent {
}
isSelectedRoom(room: Room): boolean {
if (this.isOnDirectMessage() || this.isOnCall()) {
if (this.isOnDirectMessage() || this.isOnCall() || this.isOnDashboard()) {
return false;
}