diff --git a/Controls/LeftPanel.xaml b/Controls/LeftPanel.xaml index 65d5a4c..6e5c1d3 100644 --- a/Controls/LeftPanel.xaml +++ b/Controls/LeftPanel.xaml @@ -456,10 +456,10 @@ inert until there is an account; signing in re-enables them through the ordinary IsConnected notification. --> + IsEnabled="{Binding CanUseScoreboard}" Margin="0,0,0,8"> + Visibility="{Binding CanUseScoreboard, Converter={StaticResource InverseBoolToVis}}"/> Can the scoreboard be configured at all? Signed-in creators yes; in a DEBUG build + /// always, so the strip can be previewed and judged before there is an account (creator, + /// 2026-10-30). + public bool CanUseScoreboard => IsConnected || IsDevelopmentBuild; + /// True in a DEBUG build. Used only to expose development-only controls, never to /// change behaviour — the shipped binary differs by their absence, not by a code path. public bool IsDevelopmentBuild => DevelopmentBuild; diff --git a/ytLive.Tests/ScoreboardPropertiesTests.cs b/ytLive.Tests/ScoreboardPropertiesTests.cs index 84913e6..c157a2e 100644 --- a/ytLive.Tests/ScoreboardPropertiesTests.cs +++ b/ytLive.Tests/ScoreboardPropertiesTests.cs @@ -17,13 +17,13 @@ public class ScoreboardPropertiesTests // Gated on the selected layer being a scoreboard. Assert.Contains("SelectedElement.IsScoreboard", panel); - // Signed out: the whole block is inert (the board is fed by the signed-in channel), with a - // one-line explanation. Signing in re-enables it through the ordinary IsConnected raise. + // Signed out: the block is inert with a one-line explanation — EXCEPT in a DEBUG build, where + // CanUseScoreboard is true so the strip can be previewed without an account. var block = panel[panel.IndexOf("Scoreboard config", System.StringComparison.Ordinal)..]; block = block[..block.IndexOf("", System.StringComparison.Ordinal)]; - Assert.Contains("IsEnabled=\"{Binding IsConnected}\"", block); + Assert.Contains("IsEnabled=\"{Binding CanUseScoreboard}\"", block); Assert.Contains("Sign in to YouTube to use the scoreboard.", block); - Assert.Contains("InverseBoolToVis", block); + Assert.Contains("CanUseScoreboard, Converter={StaticResource InverseBoolToVis}", block); // The master switch sits in the same panel: off hides the strip and stops the polling. Assert.Contains("ScoreboardEnabled", panel); @@ -57,7 +57,7 @@ public class ScoreboardPropertiesTests { "ScoreboardTextColor", "ScoreboardBackgroundColor", "ScoreboardBackgroundOpacity", "ScoreboardFontSize", "ScoreboardColorOptions", "ScoreboardShowSubscribers", - "ScoreboardEnabled", + "ScoreboardEnabled", "CanUseScoreboard", }) Assert.NotNull(type.GetProperty(name)); }