fix: dashboard controller support for multi-channel mode

The Indiekit backend UI was broken when using channels array
because the dashboard controller only checked for channelId/channelHandle.

Now uses getPrimaryChannel() helper to extract the first channel
from either single-channel or multi-channel configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ricardo
2026-01-24 13:59:25 +01:00
parent 2b8de8027b
commit 43090ce8af
11 changed files with 318 additions and 196 deletions

View File

@@ -188,8 +188,8 @@
<div class="yt-channel__info">
<h2 class="yt-channel__name">{{ channel.title }}</h2>
<div class="yt-channel__stats">
<span>{{ channel.subscriberCount | localeNumber }} {{ __("youtube.subscribers") }}</span>
<span>{{ channel.videoCount | localeNumber }} videos</span>
<span>{{ channel.subscriberCount }} {{ __("youtube.subscribers") }}</span>
<span>{{ channel.videoCount }} videos</span>
</div>
</div>
{% if isLive %}
@@ -255,7 +255,7 @@
<a href="{{ video.url }}" target="_blank" rel="noopener">{{ video.title }}</a>
</h3>
<div class="yt-video__meta">
{{ video.viewCount | localeNumber }} {{ __("youtube.views") }}
{{ video.viewCount }} {{ __("youtube.views") }}
</div>
</div>
</li>