Standalone WPF app (ClaudeDo.Installer) that handles full installation and ongoing configuration of ClaudeDo. Two modes: wizard for first run, tabbed settings panel for subsequent launches. Page-based extensibility via IInstallerPage interface — adding new config sections requires only one new class. Install pipeline: dotnet publish, deploy binaries, write configs, init DB (via SchemaInitializer from ClaudeDo.Data), register Windows Service, create shortcuts. Dark theme matching the Avalonia app (forest teal accent). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
using System.Windows.Media;
|
|
|
|
namespace ClaudeDo.Installer.Core;
|
|
|
|
/// <summary>
|
|
/// Multi-value converter: compares the page's index with the current page index
|
|
/// to determine step indicator styling.
|
|
/// </summary>
|
|
public sealed class StepActiveConverter : IMultiValueConverter
|
|
{
|
|
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (values.Length < 2 ||
|
|
values[0] is not IInstallerPage page ||
|
|
values[1] is not IInstallerPage currentPage)
|
|
return DependencyProperty.UnsetValue;
|
|
|
|
var isActive = ReferenceEquals(page, currentPage);
|
|
|
|
var key = parameter?.ToString() switch
|
|
{
|
|
"Background" => isActive ? "AccentBrush" : "WindowBgBrush",
|
|
"Foreground" => isActive ? "TextPrimaryBrush" : "TextMutedBrush",
|
|
"BorderBrush" => isActive ? "AccentBrush" : "BorderSubtleBrush",
|
|
_ => null
|
|
};
|
|
|
|
if (key is null) return DependencyProperty.UnsetValue;
|
|
return Application.Current.Resources[key] as SolidColorBrush ?? DependencyProperty.UnsetValue;
|
|
}
|
|
|
|
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
|
=> throw new NotSupportedException();
|
|
}
|