Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
3c45191d11
|
@@ -31,7 +31,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@for (channel of channels(); track channel.channel_id) {
|
@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>
|
<td>
|
||||||
<div class="channel-name">{{ channel.display_name }}</div>
|
<div class="channel-name">{{ channel.display_name }}</div>
|
||||||
@if (channel.description_name) {
|
@if (channel.description_name) {
|
||||||
|
|||||||
@@ -78,6 +78,10 @@ export class ChannelListComponent implements OnInit {
|
|||||||
return resolved?.displayName || ownerId;
|
return resolved?.displayName || ownerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isOwned(channel: ChannelWithSubscription): boolean {
|
||||||
|
return channel.owner_user_id === this.authService.getUserId();
|
||||||
|
}
|
||||||
|
|
||||||
viewChannel(channel: ChannelWithSubscription): void {
|
viewChannel(channel: ChannelWithSubscription): void {
|
||||||
this.router.navigate(['/channels', channel.channel_id]);
|
this.router.navigate(['/channels', channel.channel_id]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user