feat: Enhance Face AI upload functionality and UI
Some checks failed
Build Windows Avalonia / build (push) Failing after 1m48s
Release Windows Avalonia / build (push) Failing after 1m41s
Release Windows Avalonia / release (push) Has been skipped

- Updated MainWindow.axaml to increase height and add new UI elements for SSH upload configuration.
- Implemented commands for opening source and destination paths in file explorer.
- Added FaceUploadPath and SSH configuration properties to DataModel and AiSettingsViewModel.
- Introduced validation for FaceUploadPath format and commands for uploading face encoder output.
- Enhanced PickerPreferenceService to manage SSH credentials and upload preferences.
- Updated settings persistence to include FaceUploadPath and SSH preferences.
- Added tests for FaceUploadPath validation and upload command enabling logic.
This commit is contained in:
Maddo 2026-06-06 11:54:21 +02:00
commit e9142df97c
22 changed files with 1477 additions and 84 deletions

View file

@ -79,6 +79,19 @@
<TextBlock VerticalAlignment="Center" Text="{Binding FaceStatusMessage}" TextWrapping="Wrap" />
</StackPanel>
<Grid ColumnDefinitions="Auto,320,Auto,*" ColumnSpacing="6" Margin="0,2,0,0">
<TextBlock Grid.Column="0" Text="Upload:" VerticalAlignment="Center" />
<TextBox Grid.Column="1"
Text="{Binding FaceUploadPath, Mode=TwoWay}"
Watermark="2026/05.MAGGIO/EMPOLI" />
<Button Grid.Column="2" Command="{Binding UploadFaceEncoderOutputCommand}" Width="120">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="6">
<iconPacks:PackIconMaterial Kind="CloudUploadOutline" Width="16" Height="16" Foreground="#1565C0" />
<TextBlock Text="Upload" />
</StackPanel>
</Button>
</Grid>
<TextBlock Text="Output comando" FontWeight="Bold" Margin="0,6,0,0" />
<TextBox Name="FaceOutputTextBox"
Text="{Binding FaceCommandOutput}"
@ -110,6 +123,31 @@
PreferenceKey="Picker.FaceExecutableFolder.LastPath"
PickerTitle="Seleziona la cartella Face Recognition Windows"
PickerMode="Folder" />
<TextBlock Text="SSH upload" FontWeight="Bold" Margin="0,8,0,0" />
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto" RowSpacing="6" ColumnSpacing="8">
<TextBlock Grid.Row="0" Grid.Column="0" Text="Username:" VerticalAlignment="Center" />
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding FaceSshUsername, Mode=TwoWay}" />
<TextBlock Grid.Row="1" Grid.Column="0" Text="Password:" VerticalAlignment="Center" />
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding FaceSshPassword, Mode=TwoWay}" PasswordChar="*" />
<TextBlock Grid.Row="2" Grid.Column="0" Text="Server:" VerticalAlignment="Center" />
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding FaceSshAddress, Mode=TwoWay}" Watermark="example.org" />
<TextBlock Grid.Row="3" Grid.Column="0" Text="Porta:" VerticalAlignment="Center" />
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding FaceSshPort, Mode=TwoWay}" Watermark="22" />
<TextBlock Grid.Row="4" Grid.Column="0" Text="Path A:" VerticalAlignment="Center" />
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding FaceSshPathA, Mode=TwoWay}" Watermark="/mnt/da1/foto/" />
<TextBlock Grid.Row="5" Grid.Column="0" Text="Path B:" VerticalAlignment="Center" />
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding FaceSshPathB, Mode=TwoWay}" Watermark="/mnt/nas12/foto/" />
<CheckBox Grid.Row="6" Grid.ColumnSpan="2"
Content="Dry run upload Face AI"
IsChecked="{Binding FaceUploadDryRun, Mode=TwoWay}" />
</Grid>
</StackPanel>
</ScrollViewer>
</TabItem>