feat(ui): replace prime date range with weekday toggle buttons
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,6 @@
|
|||||||
</Window.KeyBindings>
|
</Window.KeyBindings>
|
||||||
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<conv:DateOnlyToDateTimeConverter x:Key="DateOnlyToDateTime"/>
|
|
||||||
<conv:TimeSpanToHhmmConverter x:Key="TimeSpanToHhmm"/>
|
<conv:TimeSpanToHhmmConverter x:Key="TimeSpanToHhmm"/>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
|
|
||||||
@@ -181,29 +180,30 @@
|
|||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel Spacing="12" Margin="0,8,0,0">
|
<StackPanel Spacing="12" Margin="0,8,0,0">
|
||||||
<TextBlock Classes="meta" TextWrapping="Wrap"
|
<TextBlock Classes="meta" TextWrapping="Wrap"
|
||||||
Text="Prime your Claude usage window each morning by firing a single non-interactive ping at a chosen time. Only runs while ClaudeDo is open. If the app starts within 30 minutes of the target time, the ping fires immediately."/>
|
Text="Prime your Claude usage window by firing a single non-interactive ping on the days you choose, at a chosen time. Only runs while ClaudeDo is open. If the app starts within 30 minutes of the target time, the ping fires immediately."/>
|
||||||
<ItemsControl ItemsSource="{Binding Prime.Rows}">
|
<ItemsControl ItemsSource="{Binding Prime.Rows}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate x:DataType="settings:PrimeScheduleRowViewModel">
|
<DataTemplate x:DataType="settings:PrimeScheduleRowViewModel">
|
||||||
<Border BorderBrush="{DynamicResource LineBrush}" BorderThickness="1"
|
<Border BorderBrush="{DynamicResource LineBrush}" BorderThickness="1"
|
||||||
CornerRadius="6" Padding="10,8" Margin="0,0,0,8"
|
CornerRadius="6" Padding="10,8" Margin="0,0,0,8"
|
||||||
Background="{DynamicResource DeepBrush}">
|
Background="{DynamicResource DeepBrush}">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto,Auto,Auto,Auto" ColumnSpacing="8">
|
<Grid ColumnDefinitions="Auto,*,Auto,Auto,Auto" ColumnSpacing="8">
|
||||||
<CheckBox Grid.Column="0" IsChecked="{Binding Enabled, Mode=TwoWay}" VerticalAlignment="Center"/>
|
<CheckBox Grid.Column="0" IsChecked="{Binding Enabled, Mode=TwoWay}" VerticalAlignment="Center"/>
|
||||||
<ctl:ThemedDatePicker Grid.Column="1"
|
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="4" VerticalAlignment="Center">
|
||||||
IsRange="True"
|
<ToggleButton Classes="day-toggle" Content="Mo" IsChecked="{Binding Monday, Mode=TwoWay}"/>
|
||||||
StartDate="{Binding StartDate, Mode=TwoWay, Converter={StaticResource DateOnlyToDateTime}}"
|
<ToggleButton Classes="day-toggle" Content="Tu" IsChecked="{Binding Tuesday, Mode=TwoWay}"/>
|
||||||
EndDate="{Binding EndDate, Mode=TwoWay, Converter={StaticResource DateOnlyToDateTime}}"
|
<ToggleButton Classes="day-toggle" Content="We" IsChecked="{Binding Wednesday, Mode=TwoWay}"/>
|
||||||
Watermark="Pick a range"
|
<ToggleButton Classes="day-toggle" Content="Th" IsChecked="{Binding Thursday, Mode=TwoWay}"/>
|
||||||
VerticalAlignment="Center"/>
|
<ToggleButton Classes="day-toggle" Content="Fr" IsChecked="{Binding Friday, Mode=TwoWay}"/>
|
||||||
|
<ToggleButton Classes="day-toggle" Content="Sa" IsChecked="{Binding Saturday, Mode=TwoWay}"/>
|
||||||
|
<ToggleButton Classes="day-toggle" Content="Su" IsChecked="{Binding Sunday, Mode=TwoWay}"/>
|
||||||
|
</StackPanel>
|
||||||
<TextBox Grid.Column="2" Width="64"
|
<TextBox Grid.Column="2" Width="64"
|
||||||
Text="{Binding TimeOfDay, Mode=TwoWay, Converter={StaticResource TimeSpanToHhmm}}"
|
Text="{Binding TimeOfDay, Mode=TwoWay, Converter={StaticResource TimeSpanToHhmm}}"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"/>
|
||||||
<CheckBox Grid.Column="3" Content="Mon–Fri"
|
<TextBlock Classes="meta" Grid.Column="3" Text="{Binding LastRunLabel}" VerticalAlignment="Center"
|
||||||
IsChecked="{Binding WorkdaysOnly, Mode=TwoWay}" VerticalAlignment="Center"/>
|
|
||||||
<TextBlock Classes="meta" Grid.Column="4" Text="{Binding LastRunLabel}" VerticalAlignment="Center"
|
|
||||||
MinWidth="80"/>
|
MinWidth="80"/>
|
||||||
<Button Classes="icon-btn" Grid.Column="5" Content="✕"
|
<Button Classes="icon-btn" Grid.Column="4" Content="✕"
|
||||||
Command="{Binding $parent[ItemsControl].((vm:SettingsModalViewModel)DataContext).Prime.RemoveScheduleCommand}"
|
Command="{Binding $parent[ItemsControl].((vm:SettingsModalViewModel)DataContext).Prime.RemoveScheduleCommand}"
|
||||||
CommandParameter="{Binding}"/>
|
CommandParameter="{Binding}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user