Add settings, cloud places, and optional archive-content indexing.

Keep official clients in charge of sync while Explorer can group locations, persist UI prefs, and list zip/rar/7z members without extracting them.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-23 12:16:09 +02:00
parent e9aba73552
commit 09a8cfafa3
57 changed files with 3130 additions and 119 deletions

View File

@@ -0,0 +1,51 @@
using System.Windows;
using Explorer.Application;
using Explorer.Presentation.ViewModels;
namespace Explorer.App;
public partial class SettingsWindow : Window
{
private readonly MainViewModel _vm;
private readonly string _originalTheme;
public SettingsWindow(MainViewModel vm)
{
InitializeComponent();
_vm = vm;
var prefs = vm.CurrentPreferences();
_originalTheme = prefs.Theme;
ThemeDark.IsChecked = prefs.Theme != "Light";
ThemeLight.IsChecked = prefs.Theme == "Light";
GroupNetwork.IsChecked = prefs.GroupNetworkPlaces;
GroupCloud.IsChecked = prefs.GroupCloudPlaces;
IndexArchives.IsChecked = prefs.IndexArchiveContents;
}
private void OnThemeChanged(object sender, RoutedEventArgs e)
{
if (!IsLoaded)
{
return;
}
_vm.Theme = ThemeLight.IsChecked == true ? "Light" : "Dark";
}
private async void OnOk(object sender, RoutedEventArgs e)
{
var prefs = new UiPreferences(
ThemeLight.IsChecked == true ? "Light" : "Dark",
GroupNetwork.IsChecked == true,
GroupCloud.IsChecked == true,
IndexArchives.IsChecked == true);
await _vm.ApplyPreferencesAsync(prefs).ConfigureAwait(true);
DialogResult = true;
Close();
}
private void OnCancel(object sender, RoutedEventArgs e)
{
_vm.Theme = _originalTheme;
}
}