Big commit
This commit is contained in:
@@ -18,7 +18,7 @@ import { ScreenShareViewerComponent } from '../../voice/screen-share-viewer/scre
|
||||
import { AdminPanelComponent } from '../../admin/admin-panel/admin-panel.component';
|
||||
import { RoomsSidePanelComponent } from '../rooms-side-panel/rooms-side-panel.component';
|
||||
|
||||
import { selectCurrentRoom } from '../../../store/rooms/rooms.selectors';
|
||||
import { selectCurrentRoom, selectActiveChannelId, selectTextChannels } from '../../../store/rooms/rooms.selectors';
|
||||
import { selectIsCurrentUserAdmin } from '../../../store/users/users.selectors';
|
||||
|
||||
type SidebarPanel = 'rooms' | 'users' | 'admin' | null;
|
||||
@@ -32,6 +32,7 @@ type SidebarPanel = 'rooms' | 'users' | 'admin' | null;
|
||||
ChatMessagesComponent,
|
||||
ScreenShareViewerComponent,
|
||||
RoomsSidePanelComponent,
|
||||
AdminPanelComponent,
|
||||
],
|
||||
viewProviders: [
|
||||
provideIcons({
|
||||
@@ -49,11 +50,20 @@ export class ChatRoomComponent {
|
||||
private store = inject(Store);
|
||||
private router = inject(Router);
|
||||
showMenu = signal(false);
|
||||
showAdminPanel = signal(false);
|
||||
|
||||
currentRoom = this.store.selectSignal(selectCurrentRoom);
|
||||
isAdmin = this.store.selectSignal(selectIsCurrentUserAdmin);
|
||||
activeChannelId = this.store.selectSignal(selectActiveChannelId);
|
||||
textChannels = this.store.selectSignal(selectTextChannels);
|
||||
|
||||
// Sidebar always visible; panel toggles removed
|
||||
get activeChannelName(): string {
|
||||
const id = this.activeChannelId();
|
||||
const ch = this.textChannels().find(c => c.id === id);
|
||||
return ch ? ch.name : id;
|
||||
}
|
||||
|
||||
// Header moved to TitleBar
|
||||
toggleAdminPanel() {
|
||||
this.showAdminPanel.update(v => !v);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user