mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-05-02 03:22:40 +02:00
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:
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user