fix(client-ui): relabel Shelve dialog button to Unshelve when that kind is selected (review)

This commit is contained in:
Joseph Doherty
2026-06-16 18:31:32 -04:00
parent 6a61f35ac0
commit fd986c3bd3
@@ -46,8 +46,12 @@ public partial class ShelveAlarmWindow : Window
{
var durationPanel = this.FindControl<StackPanel>("DurationPanel");
var kindCombo = this.FindControl<ComboBox>("KindCombo");
var shelveButton = this.FindControl<Button>("ShelveButton");
if (durationPanel != null && kindCombo != null)
durationPanel.IsEnabled = kindCombo.SelectedIndex == 1; // Timed
// Relabel the action button so selecting "Unshelve" doesn't read "Shelve".
if (shelveButton != null)
shelveButton.Content = kindCombo?.SelectedIndex == 2 ? "Unshelve" : "Shelve";
}
private async void OnShelveClicked(object? sender, RoutedEventArgs e)