fix: Improve plugin ui entry points, Fix chat scroll, fix notifications, fix user rights

This commit is contained in:
2026-05-17 16:09:16 +02:00
parent 8e3ccf4157
commit 8631290c01
35 changed files with 1560 additions and 619 deletions

View File

@@ -259,13 +259,26 @@
</div>
</section>
@if (pluginChannelSections().length > 0 || pluginSidePanels().length > 0) {
@if (pluginChannelSections().length > 0 || pluginMenuActions().length > 0 || pluginSidePanels().length > 0) {
<section
class="border-t border-border px-2 py-3"
data-testid="plugin-room-side-panel"
>
<div class="mb-2 px-1">
<div class="mb-2 flex items-center justify-between gap-2 px-1">
<h4 class="text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground">Plugins</h4>
<button
type="button"
class="inline-flex items-center gap-1 rounded-md px-1.5 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-secondary/60 hover:text-foreground"
aria-haspopup="menu"
title="View plugins"
(click)="openPluginActionMenu($event)"
>
<ng-icon
name="lucidePackage"
class="h-3.5 w-3.5"
/>
<span>View plugins</span>
</button>
</div>
@if (pluginChannelSections().length > 0) {

View File

@@ -24,7 +24,8 @@ import {
lucideUsers,
lucidePlus,
lucideVolumeX,
lucideGamepad2
lucideGamepad2,
lucidePackage
} from '@ng-icons/lucide';
import { selectOnlineUsers, selectCurrentUser } from '../../../store/users/users.selectors';
import {
@@ -53,7 +54,7 @@ import { formatGameActivityElapsed } from '../../../domains/game-activity';
import { ExternalLinkService } from '../../../core/platform/external-link.service';
import { VoiceControlsComponent } from '../../../domains/voice-session/feature/voice-controls/voice-controls.component';
import { PluginRenderHostComponent } from '../../../domains/plugins/feature/plugin-render-host/plugin-render-host.component';
import { PluginUiRegistryService } from '../../../domains/plugins';
import { PluginActionMenuService, PluginUiRegistryService } from '../../../domains/plugins';
import { isChannelNameTaken, normalizeChannelName } from '../../../store/rooms/room-channels.rules';
import {
canManageMember,
@@ -108,7 +109,8 @@ type PanelMode = 'channels' | 'users';
lucideUsers,
lucidePlus,
lucideVolumeX,
lucideGamepad2
lucideGamepad2,
lucidePackage
})
],
templateUrl: './rooms-side-panel.component.html'
@@ -127,6 +129,7 @@ export class RoomsSidePanelComponent implements OnDestroy {
private profileCard = inject(ProfileCardService);
private directMessages = inject(DirectMessageService);
private readonly externalLinks = inject(ExternalLinkService);
private readonly pluginActionMenu = inject(PluginActionMenuService);
private readonly voiceActivity = inject(VoiceActivityService);
private readonly voiceConnectivity = inject(VoiceConnectivityHealthService);
private readonly pluginUi = inject(PluginUiRegistryService);
@@ -144,6 +147,7 @@ export class RoomsSidePanelComponent implements OnDestroy {
textChannels = this.store.selectSignal(selectTextChannels);
voiceChannels = this.store.selectSignal(selectVoiceChannels);
pluginChannelSections = this.pluginUi.channelSectionRecords;
pluginMenuActions = this.pluginUi.toolbarActionRecords;
pluginSidePanels = this.pluginUi.sidePanelRecords;
localUserHasDesync = this.voiceConnectivity.localUserHasDesync;
roomMembers = computed(() => this.currentRoom()?.members ?? []);
@@ -219,6 +223,7 @@ export class RoomsSidePanelComponent implements OnDestroy {
ngOnDestroy(): void {
clearInterval(this.activityTimer);
this.cancelQueuedProfileCardOpen();
this.pluginActionMenu.close();
}
gameActivityElapsed(user: User | null | undefined): string {
@@ -258,6 +263,12 @@ export class RoomsSidePanelComponent implements OnDestroy {
this.queueProfileCardOpen(event.currentTarget as HTMLElement, this.roomMemberToUser(member), false);
}
openPluginActionMenu(event: Event): void {
event.stopPropagation();
this.cancelQueuedProfileCardOpen();
this.pluginActionMenu.open(event.currentTarget as HTMLElement);
}
async openDirectMessage(event: Event, user: User): Promise<void> {
event.stopPropagation();
this.cancelQueuedProfileCardOpen();