feat(ui): complete Avalonia UI port with 7 main pages, tool settings & top MenuBar

This commit is contained in:
Richard
2026-08-10 10:48:34 +02:00
parent a0e18d2a57
commit b5bf97ae74
187 changed files with 20054 additions and 882 deletions
@@ -0,0 +1,42 @@
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Platform.Storage;
using ClawdDotNet.Desktop.ViewModels;
namespace ClawdDotNet.Desktop.Views;
public partial class RestoreBackupWindow : Window
{
public RestoreBackupWindow()
{
InitializeComponent();
}
protected override void OnDataContextChanged(EventArgs e)
{
base.OnDataContextChanged(e);
if (DataContext is RestoreBackupViewModel vm)
{
vm.CloseRequested += () => Close();
}
}
private async void OnBrowseFolder(object? sender, RoutedEventArgs e)
{
if (DataContext is not RestoreBackupViewModel vm) return;
var storage = StorageProvider;
if (storage is null) return;
var folders = await storage.OpenFolderPickerAsync(new FolderPickerOpenOptions
{
Title = "Zielordner für Wiederherstellung wählen",
AllowMultiple = false
});
if (folders.Count > 0 && folders[0].TryGetLocalPath() is { } path)
{
vm.TargetDirectory = path;
}
}
}