feat(daily-prep): add DailyPrepMaxTasks editor to Prime Claude settings
This commit is contained in:
@@ -50,6 +50,7 @@
|
|||||||
"prime": {
|
"prime": {
|
||||||
"description": "Bereite dein Claude-Nutzungsfenster vor, indem an den von dir gewählten Tagen zu einer bestimmten Zeit ein einzelner nicht-interaktiver Ping ausgelöst wird. Läuft nur, solange ClaudeDo geöffnet ist. Wenn die App innerhalb von 30 Minuten vor der Zielzeit startet, wird der Ping sofort ausgelöst.",
|
"description": "Bereite dein Claude-Nutzungsfenster vor, indem an den von dir gewählten Tagen zu einer bestimmten Zeit ein einzelner nicht-interaktiver Ping ausgelöst wird. Läuft nur, solange ClaudeDo geöffnet ist. Wenn die App innerhalb von 30 Minuten vor der Zielzeit startet, wird der Ping sofort ausgelöst.",
|
||||||
"addSchedule": "+ Zeitplan hinzufügen",
|
"addSchedule": "+ Zeitplan hinzufügen",
|
||||||
|
"dailyPrepMaxTasks": "Max. Aufgaben pro Tag",
|
||||||
"dayMo": "Mo",
|
"dayMo": "Mo",
|
||||||
"dayTu": "Di",
|
"dayTu": "Di",
|
||||||
"dayWe": "Mi",
|
"dayWe": "Mi",
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
"prime": {
|
"prime": {
|
||||||
"description": "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.",
|
"description": "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.",
|
||||||
"addSchedule": "+ Add schedule",
|
"addSchedule": "+ Add schedule",
|
||||||
|
"dailyPrepMaxTasks": "Max tasks per day",
|
||||||
"dayMo": "Mo",
|
"dayMo": "Mo",
|
||||||
"dayTu": "Tu",
|
"dayTu": "Tu",
|
||||||
"dayWe": "We",
|
"dayWe": "We",
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ public sealed partial class PrimeClaudeTabViewModel : ViewModelBase
|
|||||||
private readonly IPrimeScheduleApi _api;
|
private readonly IPrimeScheduleApi _api;
|
||||||
private readonly HashSet<Guid> _initialIds = new();
|
private readonly HashSet<Guid> _initialIds = new();
|
||||||
|
|
||||||
|
[ObservableProperty] private int _dailyPrepMaxTasks = 5;
|
||||||
|
|
||||||
public ObservableCollection<PrimeScheduleRowViewModel> Rows { get; } = new();
|
public ObservableCollection<PrimeScheduleRowViewModel> Rows { get; } = new();
|
||||||
|
|
||||||
public PrimeClaudeTabViewModel(IPrimeScheduleApi api) => _api = api;
|
public PrimeClaudeTabViewModel(IPrimeScheduleApi api) => _api = api;
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
|
|||||||
[ObservableProperty] private bool _isBusy;
|
[ObservableProperty] private bool _isBusy;
|
||||||
[ObservableProperty] private string _statusMessage = "";
|
[ObservableProperty] private string _statusMessage = "";
|
||||||
|
|
||||||
private int _loadedDailyPrepMaxTasks = 5;
|
|
||||||
|
|
||||||
public Action? CloseAction { get; set; }
|
public Action? CloseAction { get; set; }
|
||||||
|
|
||||||
public SettingsModalViewModel(WorkerClient worker, PrimeClaudeTabViewModel prime,
|
public SettingsModalViewModel(WorkerClient worker, PrimeClaudeTabViewModel prime,
|
||||||
@@ -62,7 +60,7 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
|
|||||||
: string.Join(Environment.NewLine,
|
: string.Join(Environment.NewLine,
|
||||||
System.Text.Json.JsonSerializer.Deserialize<List<string>>(dto.ReportExcludedPaths) ?? new());
|
System.Text.Json.JsonSerializer.Deserialize<List<string>>(dto.ReportExcludedPaths) ?? new());
|
||||||
General.StandupWeekday = dto.StandupWeekday is >= 0 and <= 6 ? dto.StandupWeekday : (int)DayOfWeek.Wednesday;
|
General.StandupWeekday = dto.StandupWeekday is >= 0 and <= 6 ? dto.StandupWeekday : (int)DayOfWeek.Wednesday;
|
||||||
_loadedDailyPrepMaxTasks = dto.DailyPrepMaxTasks < 1 ? 5 : dto.DailyPrepMaxTasks;
|
Prime.DailyPrepMaxTasks = dto.DailyPrepMaxTasks < 1 ? 5 : dto.DailyPrepMaxTasks;
|
||||||
}
|
}
|
||||||
else StatusMessage = Loc.T("vm.settingsModal.workerOffline");
|
else StatusMessage = Loc.T("vm.settingsModal.workerOffline");
|
||||||
|
|
||||||
@@ -95,7 +93,7 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
|
|||||||
General.ReportExcludedPaths
|
General.ReportExcludedPaths
|
||||||
.Split('\n').Select(l => l.Trim().TrimEnd('\r')).Where(l => l.Length > 0).ToList()),
|
.Split('\n').Select(l => l.Trim().TrimEnd('\r')).Where(l => l.Length > 0).ToList()),
|
||||||
General.StandupWeekday,
|
General.StandupWeekday,
|
||||||
_loadedDailyPrepMaxTasks);
|
Prime.DailyPrepMaxTasks);
|
||||||
await _worker.UpdateAppSettingsAsync(dto);
|
await _worker.UpdateAppSettingsAsync(dto);
|
||||||
await Prime.SaveAsync();
|
await Prime.SaveAsync();
|
||||||
CloseAction?.Invoke();
|
CloseAction?.Invoke();
|
||||||
|
|||||||
@@ -239,6 +239,11 @@
|
|||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
<Button Classes="btn" Content="{loc:Tr settings.prime.addSchedule}" Command="{Binding Prime.AddScheduleCommand}" HorizontalAlignment="Left"/>
|
<Button Classes="btn" Content="{loc:Tr settings.prime.addSchedule}" Command="{Binding Prime.AddScheduleCommand}" HorizontalAlignment="Left"/>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8" VerticalAlignment="Center">
|
||||||
|
<TextBlock Classes="field-label" Text="{loc:Tr settings.prime.dailyPrepMaxTasks}" VerticalAlignment="Center"/>
|
||||||
|
<NumericUpDown Minimum="1" Maximum="50" Increment="1" Width="100" FormatString="0"
|
||||||
|
Value="{Binding Prime.DailyPrepMaxTasks, Mode=TwoWay}"/>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|||||||
Reference in New Issue
Block a user