Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

English (US) release notes, mirroring CHANGELOG.md (Brazilian Portuguese). Before publishing a version, add a `## [VERSION]` section to **both** files: the workflow publishes the section matching the tag from each one and fails if either is missing.

## [Unreleased]
### What's new
- Settings → "Receive test versions (alpha and beta)": anyone can join the tests of upcoming versions from the app. Off by default; turning it on shows a warning that test versions can have bugs.

## [1.6.0-alpha.2]
### Changes
- 1.6 is all the project's own code: the option to go back to MultiMonitorTool / SoundVolumeView is gone too, and their old files in the `tools` folder are deleted when the app opens. (#91)
Expand All @@ -19,6 +23,10 @@ English (US) release notes, mirroring CHANGELOG.md (Brazilian Portuguese). Befor
- This release is not verified on many monitor and TV setups yet. If turning the TV on, turning the other screens off or restoring the desk fails, go back to 1.5.0 and tell us what happened with the feedback button (attach `consolemode.log`).
- People on the stable 1.5.0 don't get this release automatically.

## [1.5.1]
### What's new
- Settings → "Receive test versions (alpha and beta)": join the 1.6 tests from the app. 1.6 controls displays and audio with its own code, without the NirSoft tools. Off by default; turning it on warns that test versions can have bugs.

## [1.5.0]
### What's new
- Console interface: a full-screen, controller-first home and Settings, driven by the D-pad/stick and A/B with Xbox and PlayStation pads. Automatic mode picks it whenever a controller is connected. (#41, #42, #47)
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Notas em português do Brasil; a versão em inglês (Estados Unidos) fica em `CHANGELOG.en-US.md`. Antes de publicar uma versão, adicione uma seção `## [VERSÃO]` com o changelog daquela versão **nos dois arquivos**. O workflow publica as duas seções correspondentes à tag na mesma release e falha se faltar alguma.

## [Unreleased]
### Novidades
- Ajustes → "Receber versões de teste (alpha e beta)": qualquer pessoa pode entrar nos testes das próximas versões pelo próprio app. Desligado por padrão; ao ligar, o app avisa que a versão pode ter bugs.

## [1.6.0-alpha.2]
### Mudanças
- A 1.6 é só código do projeto: saiu também a opção de voltar ao MultiMonitorTool / SoundVolumeView, e os arquivos antigos deles na pasta `tools` são apagados ao abrir o app. (#91)
Expand All @@ -19,6 +23,10 @@ Notas em português do Brasil; a versão em inglês (Estados Unidos) fica em `CH
- Esta versão ainda não foi validada em muitos setups de monitores e TV. Se algo falhar ao ligar a TV, desligar as outras telas ou restaurar a mesa, volte para a 1.5.0 e conte o que aconteceu pelo botão de feedback (anexe o `consolemode.log`).
- Quem usa a 1.5.0 estável não recebe esta versão automaticamente.

## [1.5.1]
### Novidades
- Ajustes → "Receber versões de teste (alpha e beta)": entre nos testes da 1.6 pelo próprio app. A 1.6 controla telas e áudio com código próprio, sem as ferramentas da NirSoft. Desligado por padrão; ao ligar, o app avisa que versões de teste podem ter bugs.

## [1.5.0]
### Novidades
- Interface Console: tela inicial e Ajustes em tela cheia, pensados para o controle (direcional/analógico, A/B) com controles Xbox e PlayStation. O modo Automático escolhe essa interface sempre que há um controle conectado. (#41, #42, #47)
Expand Down
2 changes: 2 additions & 0 deletions src/ConsoleMode/Models/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public sealed class AppConfig

/// <summary>Look for new GitHub releases on startup.</summary>
public bool CheckUpdates { get; set; } = true;
/// <summary>Also offer alpha/beta releases (Settings → Receive test versions).</summary>
public bool BetaUpdates { get; set; }

/// <summary>Holding the Xbox Guide (Home) button while in the tray enters console mode.</summary>
public bool HomeButtonLaunch { get; set; } = true;
Expand Down
3 changes: 3 additions & 0 deletions src/ConsoleMode/Resources/Strings.en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
"CheckNow": "Check now",
"NotifyUpdatesCard": "Notify me when a new version is available",
"NotifyUpdatesDescription": "Checks GitHub releases when the app starts.",
"BetaUpdatesCard": "Receive test versions (alpha and beta)",
"BetaUpdatesDescription": "Get early versions before everyone else to help test them. They can have bugs. Turning this off doesn't go back to the stable version: you'll get the next stable one when it comes out.",
"BetaUpdatesWarning": "Test versions can fail on some setups. If something breaks, download the stable version from the releases page and tell us with the feedback button.",
"HelpDataSection": "Shortcut, help, and data",
"OtherAppsSection": "More apps from the developer",
"WakeOnDescription": "Automation with Wake-on-LAN",
Expand Down
3 changes: 3 additions & 0 deletions src/ConsoleMode/Resources/Strings.es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
"CheckNow": "Buscar ahora",
"NotifyUpdatesCard": "Avisarme cuando haya una versión nueva",
"NotifyUpdatesDescription": "Consulta las versiones de GitHub al abrir la aplicación.",
"BetaUpdatesCard": "Recibir versiones de prueba (alfa y beta)",
"BetaUpdatesDescription": "Recibe las versiones nuevas antes que nadie para ayudar a probarlas. Pueden tener errores. Desactivarlo no vuelve a la versión estable: recibirás la próxima estable cuando salga.",
"BetaUpdatesWarning": "Las versiones de prueba pueden fallar en algunas configuraciones. Si algo sale mal, descarga la versión estable en la página de versiones y cuéntanoslo con el botón de comentarios.",
"HelpDataSection": "Acceso directo, ayuda y datos",
"OtherAppsSection": "Más apps del desarrollador",
"WakeOnDescription": "Automatización con Wake-on-LAN",
Expand Down
3 changes: 3 additions & 0 deletions src/ConsoleMode/Resources/Strings.pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
"CheckNow": "Procurar agora",
"NotifyUpdatesCard": "Avisar quando sair versão nova",
"NotifyUpdatesDescription": "Consulta as releases no GitHub ao abrir o app.",
"BetaUpdatesCard": "Receber versões de teste (alpha e beta)",
"BetaUpdatesDescription": "Recebe as versões novas antes de todo mundo para ajudar a testar. Elas podem ter bugs. Desligar não volta para a versão estável: você recebe a próxima estável quando ela sair.",
"BetaUpdatesWarning": "Versões de teste podem falhar em alguns setups. Se algo der errado, baixe a versão estável na página de releases e conte pelo botão de feedback.",
"HelpDataSection": "Atalho, ajuda e dados",
"OtherAppsSection": "Outros apps do desenvolvedor",
"WakeOnDescription": "Automação com Wake-on-LAN",
Expand Down
1 change: 1 addition & 0 deletions src/ConsoleMode/Services/ConsoleEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ private AppConfig ResolveMonitorNames(AppConfig config)
TourDone = config.TourDone,
ConfirmedSetup = config.ConfirmedSetup,
CheckUpdates = config.CheckUpdates,
BetaUpdates = config.BetaUpdates,
SkippedUpdateVersion = config.SkippedUpdateVersion
};
}
Expand Down
2 changes: 2 additions & 0 deletions src/ConsoleMode/Services/LocalizationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ internal void NotifyAll()
public string AutoStartControllerDescription => LocalizationService.Get(nameof(AutoStartControllerDescription));
public string NotifyUpdatesCard => LocalizationService.Get(nameof(NotifyUpdatesCard));
public string NotifyUpdatesDescription => LocalizationService.Get(nameof(NotifyUpdatesDescription));
public string BetaUpdatesCard => LocalizationService.Get(nameof(BetaUpdatesCard));
public string BetaUpdatesDescription => LocalizationService.Get(nameof(BetaUpdatesDescription));
public string HelpDataSection => LocalizationService.Get(nameof(HelpDataSection));
public string OtherAppsSection => LocalizationService.Get(nameof(OtherAppsSection));
public string WakeOnDescription => LocalizationService.Get(nameof(WakeOnDescription));
Expand Down
12 changes: 12 additions & 0 deletions src/ConsoleMode/Services/UpdateChannel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace ConsoleMode.Services;

/// <summary>Which releases the update check offers. Pure, so it's tested.</summary>
public static class UpdateChannel
{
/// <summary>
/// Test versions (alpha/beta) are offered when the user opted in, or when a test version is
/// already installed. Turning the option off never downgrades: a test build keeps getting test
/// builds until a newer stable one comes out.
/// </summary>
public static bool IncludePrereleases(bool currentIsPrerelease, bool optedIn) => currentIsPrerelease || optedIn;
}
6 changes: 3 additions & 3 deletions src/ConsoleMode/Services/UpdateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private static HttpClient CreateClient()
}

/// <summary>Newest published release above the running version, or null when up to date.</summary>
public static async Task<UpdateInfo?> CheckAsync(CancellationToken ct = default)
public static async Task<UpdateInfo?> CheckAsync(bool optedIntoPrereleases = false, CancellationToken ct = default)
{
using var timeout = CancellationTokenSource.CreateLinkedTokenSource(ct);
timeout.CancelAfter(CheckTimeout);
Expand All @@ -52,8 +52,8 @@ private static HttpClient CreateClient()
using var doc = await JsonDocument.ParseAsync(stream, cancellationToken: ct);

var current = SemVer.Parse(CurrentVersion);
// Betas see betas; stable builds only get stable releases.
var allowPrerelease = current.IsPrerelease;
// Test builds see test builds; stable builds only get them when the user opted in.
var allowPrerelease = UpdateChannel.IncludePrereleases(current.IsPrerelease, optedIntoPrereleases);

UpdateInfo? best = null;
SemVer? bestVersion = null;
Expand Down
1 change: 1 addition & 0 deletions src/ConsoleMode/ViewModels/MainViewModel.ConsoleUi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
{
public ObservableCollection<ComboOption> UiModeOptions { get; } = [];

[ObservableProperty] private bool _isConsoleUi;

Check warning on line 15 in src/ConsoleMode/ViewModels/MainViewModel.ConsoleUi.cs

View workflow job for this annotation

GitHub Actions / Build and test

The field ConsoleMode.ViewModels.MainViewModel._isConsoleUi using
[ObservableProperty] private ComboOption? _selectedUiMode;

Check warning on line 16 in src/ConsoleMode/ViewModels/MainViewModel.ConsoleUi.cs

View workflow job for this annotation

GitHub Actions / Build and test

The field ConsoleMode.ViewModels.MainViewModel._selectedUiMode using
[ObservableProperty] private bool _isRolePanelOpen;

Check warning on line 17 in src/ConsoleMode/ViewModels/MainViewModel.ConsoleUi.cs

View workflow job for this annotation

GitHub Actions / Build and test

The field ConsoleMode.ViewModels.MainViewModel._isRolePanelOpen using
[ObservableProperty] private MonitorRowViewModel? _rolePanelMonitor;

Check warning on line 18 in src/ConsoleMode/ViewModels/MainViewModel.ConsoleUi.cs

View workflow job for this annotation

GitHub Actions / Build and test

The field ConsoleMode.ViewModels.MainViewModel._rolePanelMonitor using
[ObservableProperty] private bool _isPlayStationHints;

Check warning on line 19 in src/ConsoleMode/ViewModels/MainViewModel.ConsoleUi.cs

View workflow job for this annotation

GitHub Actions / Build and test

The field ConsoleMode.ViewModels.MainViewModel._isPlayStationHints using

/// <summary>Set by App when the session was requested from the controller's Home button.</summary>
public bool LaunchedByController { get; set; }
Expand Down Expand Up @@ -183,6 +183,7 @@
case "autostart": AutoStartOnController = !AutoStartOnController; break;
case "startup": StartWithWindows = !StartWithWindows; break;
case "updates": CheckUpdates = !CheckUpdates; break;
case "betas": BetaUpdates = !BetaUpdates; break;
}
}

Expand Down
10 changes: 9 additions & 1 deletion src/ConsoleMode/ViewModels/MainViewModel.Updates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public partial class MainViewModel
private enum UpdateStatusKind { InstallKind, Searching, Latest, Available, Failed }

[ObservableProperty] private bool _checkUpdates = true;
[ObservableProperty] private bool _betaUpdates;
[ObservableProperty] private bool _homeButtonLaunch = true;
[ObservableProperty] private bool _homeButtonShortPress;
[ObservableProperty] private bool _autoStartOnController;
Expand Down Expand Up @@ -80,6 +81,13 @@ partial void OnStartWithWindowsChanged(bool value)

partial void OnCheckUpdatesChanged(bool value) => SaveQuietly();

partial void OnBetaUpdatesChanged(bool value)
{
SaveQuietly();
if (_applying || IsLoading) return;
if (value) SetStatus(LocalizationService.Get("BetaUpdatesWarning"), InfoBarSeverity.Warning);
}

partial void OnHomeButtonLaunchChanged(bool value) => SaveQuietly();

partial void OnAutoStartOnControllerChanged(bool value) => SaveQuietly();
Expand Down Expand Up @@ -129,7 +137,7 @@ private async Task CheckForUpdatesAsync(bool manual)
}
try
{
var update = await UpdateService.CheckAsync();
var update = await UpdateService.CheckAsync(BetaUpdates);
if (update is null)
{
_updateStatusKind = UpdateStatusKind.Latest;
Expand Down
2 changes: 2 additions & 0 deletions src/ConsoleMode/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ private void Apply(LoadResult data)
HdrEnable = config.HdrEnable;
VrrEnable = config.VrrEnable;
CheckUpdates = config.CheckUpdates;
BetaUpdates = config.BetaUpdates;
HomeButtonLaunch = config.HomeButtonLaunch;
HomeButtonShortPress = config.HomeButtonShortPress;
AutoStartOnController = config.AutoStartOnController;
Expand Down Expand Up @@ -887,6 +888,7 @@ private AppConfig BuildConfig()
TourDone = _loadedConfig.TourDone,
ConfirmedSetup = _loadedConfig.ConfirmedSetup,
CheckUpdates = CheckUpdates,
BetaUpdates = BetaUpdates,
HomeButtonLaunch = HomeButtonLaunch,
HomeButtonShortPress = HomeButtonShortPress,
AutoStartOnController = AutoStartOnController,
Expand Down
6 changes: 6 additions & 0 deletions src/ConsoleMode/Views/ConsoleHomeView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,12 @@
<TextBlock Grid.Column="1" Style="{StaticResource RowValue}" Text="{x:Bind ViewModel.OnOff(ViewModel.CheckUpdates), Mode=OneWay}"/>
</Grid>
</Button>
<Button Style="{StaticResource ConsoleRow}" Command="{x:Bind ViewModel.CycleSettingCommand}" CommandParameter="betas">
<Grid ColumnSpacing="24"><Grid.ColumnDefinitions><ColumnDefinition Width="*"/><ColumnDefinition Width="Auto"/></Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource RowLabel}" Text="{x:Bind ViewModel.Texts.BetaUpdatesCard, Mode=OneWay}"/>
<TextBlock Grid.Column="1" Style="{StaticResource RowValue}" Text="{x:Bind ViewModel.OnOff(ViewModel.BetaUpdates), Mode=OneWay}"/>
</Grid>
</Button>
<Button Style="{StaticResource ConsoleRow}" Command="{x:Bind ViewModel.CheckNowCommand}">
<Grid ColumnSpacing="24"><Grid.ColumnDefinitions><ColumnDefinition Width="*"/><ColumnDefinition Width="Auto"/></Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource RowLabel}" Text="{x:Bind ViewModel.Texts.CheckNow, Mode=OneWay}"/>
Expand Down
7 changes: 7 additions & 0 deletions src/ConsoleMode/Views/SettingsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@
<ToggleSwitch IsOn="{x:Bind ViewModel.CheckUpdates, Mode=TwoWay}"
OnContent="{x:Bind ViewModel.Texts.ToggleOn, Mode=OneWay}" OffContent="{x:Bind ViewModel.Texts.ToggleOff, Mode=OneWay}"/>
</ctk:SettingsCard>
<ctk:SettingsCard Header="{x:Bind ViewModel.Texts.BetaUpdatesCard, Mode=OneWay}" Description="{x:Bind ViewModel.Texts.BetaUpdatesDescription, Mode=OneWay}">
<ctk:SettingsCard.HeaderIcon>
<FontIcon Glyph="&#xE9D5;"/>
</ctk:SettingsCard.HeaderIcon>
<ToggleSwitch IsOn="{x:Bind ViewModel.BetaUpdates, Mode=TwoWay}"
OnContent="{x:Bind ViewModel.Texts.ToggleOn, Mode=OneWay}" OffContent="{x:Bind ViewModel.Texts.ToggleOff, Mode=OneWay}"/>
</ctk:SettingsCard>

<!-- Shortcut, help & data -->
<TextBlock Text="{x:Bind ViewModel.Texts.HelpDataSection, Mode=OneWay}" Style="{StaticResource SettingsSectionHeader}"/>
Expand Down
1 change: 1 addition & 0 deletions tests/ConsoleMode.Tests/ConsoleMode.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<ItemGroup>
<Using Include="Xunit" />
<Compile Include="../../src/ConsoleMode/Services/UpdateIntegrity.cs" Link="UpdateIntegrity.cs" />
<Compile Include="../../src/ConsoleMode/Services/UpdateChannel.cs" Link="UpdateChannel.cs" />
<Compile Include="../../src/ConsoleMode/Services/ReleaseNotes.cs" Link="ReleaseNotes.cs" />
<Compile Include="../../src/ConsoleMode/Services/LocalizationService.cs" Link="LocalizationService.cs" />
<Compile Include="../../src/ConsoleMode/Services/FeedbackService.cs" Link="FeedbackService.cs" />
Expand Down
14 changes: 14 additions & 0 deletions tests/ConsoleMode.Tests/UpdateChannelTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using ConsoleMode.Services;

namespace ConsoleMode.Tests;

public sealed class UpdateChannelTests
{
[Theory]
[InlineData(false, false, false)] // stable, not opted in: stable releases only
[InlineData(false, true, true)] // stable, opted in: test versions too
[InlineData(true, false, true)] // already on a test version: keeps getting them
[InlineData(true, true, true)]
public void Test_versions_are_offered_when_opted_in_or_already_installed(bool currentIsPrerelease, bool optedIn, bool expected) =>
Assert.Equal(expected, UpdateChannel.IncludePrereleases(currentIsPrerelease, optedIn));
}
Loading