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

@ -22,6 +22,13 @@ public static class PickerPreferenceKeys
public const string FaceMatcherEncodings = "Picker.FaceMatcherEncodings.LastPath";
public const string FaceMatcherOutput = "Picker.FaceMatcherOutput.LastPath";
public const string FaceMatcherLog = "Picker.FaceMatcherLog.LastPath";
public const string FaceSshUsername = "FaceAI.Ssh.Username";
public const string FaceSshPassword = "FaceAI.Ssh.Password";
public const string FaceSshAddress = "FaceAI.Ssh.Address";
public const string FaceSshPort = "FaceAI.Ssh.Port";
public const string FaceSshPathA = "FaceAI.Ssh.PathA";
public const string FaceSshPathB = "FaceAI.Ssh.PathB";
public const string FaceUploadDryRun = "FaceAI.Upload.DryRun";
}
public sealed class PickerPreferenceService
@ -71,6 +78,13 @@ public sealed class PickerPreferenceService
: value.Trim().Trim('"');
}
public string? GetRememberedRawValue(string preferenceKey)
{
return _userPreferences.ParametroExists(preferenceKey)
? _userPreferences.LeggiParametroString(preferenceKey)
: null;
}
public void RememberValue(string preferenceKey, string? value)
{
if (string.IsNullOrWhiteSpace(value))
@ -82,6 +96,12 @@ public sealed class PickerPreferenceService
_userPreferences.SalvaParametriSetup();
}
public void RememberRawValue(string preferenceKey, string? value)
{
_userPreferences.AggiornaParametro(preferenceKey, value ?? string.Empty);
_userPreferences.SalvaParametriSetup();
}
public void ForgetValue(string preferenceKey)
{
if (_userPreferences.RimuoviParametro(preferenceKey))