feat(regions): show clickable No region badge when channel has no scope

The status-bar pill used to disappear when the active channel had no
region scope, forcing users into Manage Channels to assign one. Now it
stays visible as a muted "No region" badge that opens the same Set
Region Scope picker when clicked.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-04-26 20:57:57 +02:00
parent da82a46591
commit 0d4e81d105

View File

@@ -3113,11 +3113,17 @@ function updateRegionIndicator() {
const nameEl = document.getElementById('regionIndicatorName');
if (!el || !nameEl) return;
const scope = (window.channelScopes || {})[String(currentChannelIdx)];
el.classList.remove('d-none');
if (scope && scope.name) {
nameEl.textContent = scope.name;
el.classList.remove('d-none');
el.classList.remove('bg-light', 'text-secondary', 'border');
el.classList.add('bg-info', 'text-dark');
el.title = 'Click to change region for this channel';
} else {
el.classList.add('d-none');
nameEl.textContent = 'No region';
el.classList.remove('bg-info', 'text-dark');
el.classList.add('bg-light', 'text-secondary', 'border');
el.title = 'Click to set a region for this channel';
}
}