fix(client-ui): relabel Shelve dialog button to Unshelve when that kind is selected (review)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user