fix(ui): warn and block save when a list's working dir isn't a git repo
Reuses RepoScanner.IsRepo (now public) to validate WorkingDir whenever it changes in ListSettingsModalViewModel — Browse or typing. A missing folder or a non-repo folder shows an inline warning and gates Save via the same CanExecute pattern the load-failure gate already uses; an empty WorkingDir is untouched. Previously this only surfaced as a Failed task deep in WorktreeManager on first run. Also localizes the two hardcoded EN strings in the same file (delete confirm, planning-sessions block) into vm.listSettings.* keys.
This commit is contained in:
@@ -94,6 +94,9 @@
|
||||
<TextBox Grid.Column="0" Text="{Binding WorkingDir}" PlaceholderText="{loc:Tr modals.listSettings.workingDirectoryPlaceholder}" />
|
||||
<Button Classes="btn" Grid.Column="1" Content="{loc:Tr modals.listSettings.browse}" Margin="8,0,0,0" Click="BrowseClicked" />
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding WorkingDirWarning}"
|
||||
IsVisible="{Binding WorkingDirWarning, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
||||
Foreground="{DynamicResource StatusErrorBrush}" FontSize="12" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Spacing="4" IsVisible="{Binding !IsFolder}">
|
||||
|
||||
Reference in New Issue
Block a user