fix broken links on non-owned channels
Some checks failed
Build Docker and Deploy / Build Docker Container (push) Successful in 1m7s
Build Docker and Deploy / Run Unit-Tests (push) Failing after 10m56s
Build Docker and Deploy / Deploy to Server (push) Has been skipped

This commit is contained in:
2025-12-03 22:38:24 +01:00
parent 9db56f6db6
commit 3c45191d11
2 changed files with 5 additions and 1 deletions

View File

@@ -31,7 +31,7 @@
</thead>
<tbody>
@for (channel of channels(); track channel.channel_id) {
<tr class="clickable-row" (click)="viewChannel(channel)">
<tr [class.clickable-row]="isOwned(channel)" (click)="isOwned(channel) && viewChannel(channel)">
<td>
<div class="channel-name">{{ channel.display_name }}</div>
@if (channel.description_name) {

View File

@@ -78,6 +78,10 @@ export class ChannelListComponent implements OnInit {
return resolved?.displayName || ownerId;
}
isOwned(channel: ChannelWithSubscription): boolean {
return channel.owner_user_id === this.authService.getUserId();
}
viewChannel(channel: ChannelWithSubscription): void {
this.router.navigate(['/channels', channel.channel_id]);
}