Umbau durch Gemini Flash, Durchsicht und Nacharbeit durch Claude. Umfang: - Desktop: LocalizationManager (JSON-Pakete, Rueckfall auf Englisch, Umschalten zur Laufzeit), Localize-Markup-Erweiterung, Sprachwahl in den Einstellungen (AppSettings.Language, Vorgabe "en"); 317 Schluessel je Sprache - WebUI: alle Ansichten auf t()/data-i18n, 656 Schluessel je Sprache - Agenten-Werkzeuge: Beschreibungen, Schemata und Meldungen auf Englisch - Tests an die englischen Meldungen angepasst, keine Pruefung abgeschwaecht Nacharbeit bei der Durchsicht: - ~25 Kommentarbloecke mit Begruendungen waren ersatzlos entfallen, darunter sicherheitsrelevante (NTFS-Datenstrom beim shared:-Praefix, Bremse gegen Agentenschleifen, doppelter POST beim Anlegen einer Instanz). Wieder eingesetzt: auf Englisch, wo die Datei umgestellt ist, sonst im Wortlaut. - Drei WebUI-Schluessel fehlten (logs.paused, instances.instanceOfflineError, instances.noInstanceActiveError). Weil t() bei fehlendem Schluessel den Schluessel selbst liefert, griff der "|| err.message"-Rueckfall nie — die Oberflaeche haette den Schluesselnamen angezeigt. Geprueft: Schluesselgleichheit en/de, Platzhalter je Schluessel, jeder im Code benutzte Schluessel vorhanden, node --check fuer alle Module, 1.220 Tests gruen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
156 lines
7.1 KiB
XML
156 lines
7.1 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:vm="using:ClawdDotNet.Desktop.ViewModels"
|
|
xmlns:ctrl="using:ClawdDotNet.Desktop.Controls"
|
|
mc:Ignorable="d" d:DesignWidth="1100" d:DesignHeight="740"
|
|
x:Class="ClawdDotNet.Desktop.Views.SettingsPageView"
|
|
x:DataType="vm:SettingsPageViewModel">
|
|
|
|
<DockPanel>
|
|
|
|
<!-- Aktionen unten: Der Entwurf setzt flache Felder ohne Karten, damit bleibt am
|
|
unteren Rand nur die Zeile mit Verwerfen und Speichern. -->
|
|
<Border DockPanel.Dock="Bottom" BorderBrush="{DynamicResource DividerBrush}"
|
|
BorderThickness="0,1,0,0" Padding="0,12,0,0" Margin="0,16,0,0">
|
|
<StackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Right">
|
|
<Button Content="{Binding L[desktop.settings.discard]}" Command="{Binding LoadFromHostCommand}" />
|
|
<Button Classes="primary" Command="{Binding SaveSettingsCommand}">
|
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
|
<ctrl:StrokeIcon Data="{StaticResource IconSave}" Width="14" Height="14" />
|
|
<TextBlock Text="{Binding L[desktop.settings.save]}" />
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<StackPanel Spacing="26" MaxWidth="680" HorizontalAlignment="Left">
|
|
|
|
<!-- ══════════════════ Instanz ══════════════════ -->
|
|
<StackPanel Spacing="14">
|
|
<TextBlock Classes="kicker" Text="{Binding L[desktop.settings.instance]}" />
|
|
|
|
<StackPanel>
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.instanceName]}" />
|
|
<TextBox Text="{Binding InstanceName}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel>
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.apiKey]}" />
|
|
<TextBox Text="{Binding OpenRouterApiKey}" PasswordChar="•" />
|
|
</StackPanel>
|
|
|
|
<StackPanel>
|
|
<CheckBox IsChecked="{Binding AutostartByManager}"
|
|
Content="{Binding L[desktop.settings.autostart]}" />
|
|
<TextBlock Classes="caption" TextWrapping="Wrap" Margin="0,4,0,0"
|
|
Text="{Binding L[desktop.settings.autostartHint]}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel>
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.logDir]}" />
|
|
<TextBox Text="{Binding LogDirectory}" />
|
|
<TextBlock Classes="caption" TextWrapping="Wrap" Margin="0,4,0,0"
|
|
Text="{Binding L[desktop.settings.logDirHint]}" />
|
|
</StackPanel>
|
|
|
|
<Grid ColumnDefinitions="*,16,*">
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.dailyCost]}" />
|
|
<TextBox Text="{Binding InstanceDailyCostUsd}" />
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="2">
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.dailyTokens]}" />
|
|
<TextBox Text="{Binding InstanceDailyTokens}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
|
|
<Border Classes="hr" />
|
|
|
|
<!-- ══════════════════ Allgemein ══════════════════ -->
|
|
<StackPanel Spacing="14">
|
|
<TextBlock Classes="kicker" Text="{Binding L[desktop.settings.general]}" />
|
|
|
|
<StackPanel>
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.language]}" />
|
|
<ComboBox ItemsSource="{Binding AvailableLanguages}" SelectedItem="{Binding SelectedLanguageOption}"
|
|
HorizontalAlignment="Stretch">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Name}" />
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
|
|
<StackPanel>
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.instancesDir]}" />
|
|
<TextBox Text="{Binding InstancesDirectory}" />
|
|
</StackPanel>
|
|
|
|
<Grid ColumnDefinitions="*,16,*">
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.minLogLevel]}" />
|
|
<ComboBox ItemsSource="{Binding LogLevels}" SelectedItem="{Binding MinimumLogLevel}"
|
|
HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="2">
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.openRouterUrl]}" />
|
|
<TextBox Text="{Binding OpenRouterBaseUrl}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
|
|
<Border Classes="hr" />
|
|
|
|
<!-- ══════════════════ Deploymentcenter ══════════════════ -->
|
|
<StackPanel Spacing="14">
|
|
<TextBlock Classes="kicker" Text="{Binding L[desktop.settings.dcAndLicense]}" />
|
|
|
|
<StackPanel>
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.dcUrl]}" />
|
|
<TextBox Text="{Binding DeploymentcenterUrl}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel>
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.dcToken]}" />
|
|
<TextBox Text="{Binding DeploymentcenterToken}" PasswordChar="•" />
|
|
</StackPanel>
|
|
|
|
<Grid ColumnDefinitions="*,16,*">
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.updateChannel]}" />
|
|
<ComboBox ItemsSource="{Binding UpdateChannels}" SelectedItem="{Binding UpdateChannel}"
|
|
HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="2">
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.dcEnv]}" />
|
|
<ComboBox ItemsSource="{Binding Environments}"
|
|
SelectedItem="{Binding DeploymentcenterEnvironment}"
|
|
HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<StackPanel>
|
|
<TextBlock Classes="label" Text="{Binding L[desktop.settings.licenseKey]}" />
|
|
<TextBox Text="{Binding LicenseKey}" PasswordChar="•" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Spacing="10" Margin="0,4,0,0">
|
|
<CheckBox Content="{Binding L[desktop.settings.errorReporting]}"
|
|
IsChecked="{Binding ErrorReportingEnabled}" />
|
|
<CheckBox Content="{Binding L[desktop.settings.updateCheck]}"
|
|
IsChecked="{Binding UpdateCheckEnabled}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
</DockPanel>
|
|
|
|
</UserControl>
|