feat(ui): Listeneinstellungen mit Kategorie-Sidebar
Body wie im Settings-Modal: Sidebar-Liste steuert einen retemplateten TabControl (Allgemein/Agent/Verifikation) statt einer langen Scroll-Spalte.
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
x:Class="ClaudeDo.Ui.Views.Modals.ListSettingsModalView"
|
||||
x:DataType="vm:ListSettingsModalViewModel"
|
||||
Title="{loc:Tr modals.listSettings.title}"
|
||||
Width="520" Height="720"
|
||||
Width="640" Height="720"
|
||||
CanResize="True"
|
||||
MinWidth="460" MinHeight="520"
|
||||
MinWidth="560" MinHeight="520"
|
||||
WindowDecorations="BorderOnly"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaTitleBarHeightHint="-1"
|
||||
@@ -32,15 +32,42 @@
|
||||
</Grid>
|
||||
</ctl:ModalShell.Footer>
|
||||
|
||||
<!-- Body -->
|
||||
<ScrollViewer Padding="20,16">
|
||||
<StackPanel Spacing="12">
|
||||
<!-- Body: category sidebar + tab-content host, mirroring the Settings modal. -->
|
||||
<Grid ColumnDefinitions="150,1,*">
|
||||
|
||||
<ListBox Grid.Column="0" Name="Nav" SelectedIndex="0"
|
||||
Background="Transparent" Margin="12,16,8,8"
|
||||
VerticalAlignment="Top">
|
||||
<ListBoxItem Content="{loc:Tr modals.listSettings.sectionGeneral}"/>
|
||||
<ListBoxItem Content="{loc:Tr modals.listSettings.sectionAgent}"/>
|
||||
<ListBoxItem Content="{loc:Tr modals.listSettings.sectionVerify}"/>
|
||||
</ListBox>
|
||||
|
||||
<Border Grid.Column="1" Background="{DynamicResource LineBrush}" Width="1" Margin="0,8"/>
|
||||
|
||||
<!-- The TabControl is the content host (index driven by the sidebar); its header strip is
|
||||
re-templated away. PART_ItemsPresenter must stay (collapsed): SelectedContent is
|
||||
resolved via ContainerFromIndex, and without a presenter no container is realized
|
||||
-> SelectedContent is null and the body renders empty. -->
|
||||
<TabControl Grid.Column="2" Padding="20,16" SelectedIndex="{Binding #Nav.SelectedIndex, Mode=OneWay}">
|
||||
<TabControl.Template>
|
||||
<ControlTemplate TargetType="TabControl">
|
||||
<Panel>
|
||||
<ItemsPresenter Name="PART_ItemsPresenter"
|
||||
ItemsPanel="{TemplateBinding ItemsPanel}"
|
||||
IsVisible="False"/>
|
||||
<ContentPresenter Name="PART_SelectedContentHost"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Content="{TemplateBinding SelectedContent}"
|
||||
ContentTemplate="{TemplateBinding SelectedContentTemplate}"/>
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</TabControl.Template>
|
||||
|
||||
<!-- GENERAL -->
|
||||
<StackPanel Spacing="0">
|
||||
<TextBlock Classes="section-label" Text="{loc:Tr modals.listSettings.sectionGeneral}"/>
|
||||
<Border Classes="section">
|
||||
<StackPanel Spacing="12">
|
||||
<TabItem Header="{loc:Tr modals.listSettings.sectionGeneral}">
|
||||
<ScrollViewer>
|
||||
<StackPanel Spacing="12" Margin="0,8,0,0">
|
||||
<StackPanel Spacing="4">
|
||||
<TextBlock Classes="field-label" Text="{loc:Tr modals.listSettings.name}"/>
|
||||
<TextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
@@ -75,13 +102,6 @@
|
||||
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Spacing="4">
|
||||
<CheckBox IsChecked="{Binding SerializeOnFileOverlap, Mode=TwoWay}"
|
||||
Content="{loc:Tr modals.listSettings.serializeOnFileOverlap}"/>
|
||||
<TextBlock Text="{loc:Tr modals.listSettings.serializeOnFileOverlapHint}"
|
||||
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Spacing="4" IsVisible="{Binding TicketsAvailable}">
|
||||
<TextBlock Classes="field-label" Text="{loc:Tr modals.listSettings.ticketProject}"/>
|
||||
<ComboBox ItemsSource="{Binding TicketProjects}"
|
||||
@@ -90,37 +110,36 @@
|
||||
HorizontalAlignment="Left" MinWidth="240"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
|
||||
<!-- AGENT -->
|
||||
<StackPanel Spacing="0">
|
||||
<Grid ColumnDefinitions="*,Auto" Margin="4,0,0,6">
|
||||
<TextBlock Classes="section-label" Text="{loc:Tr modals.listSettings.sectionAgent}" Margin="0"/>
|
||||
<Button Classes="btn" Grid.Column="1" Content="{loc:Tr modals.listSettings.resetAgentSettings}"
|
||||
Command="{Binding Agent.ResetAllCommand}" />
|
||||
</Grid>
|
||||
<Border Classes="section">
|
||||
<ctl:AgentConfigEditor DataContext="{Binding Agent}" ShowAgentBrowse="True"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<TabItem Header="{loc:Tr modals.listSettings.sectionAgent}">
|
||||
<ScrollViewer>
|
||||
<StackPanel Spacing="12" Margin="0,8,0,0">
|
||||
<Button Classes="btn" HorizontalAlignment="Right"
|
||||
Content="{loc:Tr modals.listSettings.resetAgentSettings}"
|
||||
Command="{Binding Agent.ResetAllCommand}" />
|
||||
<ctl:AgentConfigEditor DataContext="{Binding Agent}" ShowAgentBrowse="True"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
|
||||
<!-- VERIFICATION -->
|
||||
<StackPanel Spacing="0">
|
||||
<TextBlock Classes="section-label" Text="{loc:Tr modals.listSettings.sectionVerify}"/>
|
||||
<Border Classes="section">
|
||||
<StackPanel Spacing="4">
|
||||
<TabItem Header="{loc:Tr modals.listSettings.sectionVerify}">
|
||||
<ScrollViewer>
|
||||
<StackPanel Spacing="4" Margin="0,8,0,0">
|
||||
<TextBlock Classes="field-label" Text="{loc:Tr modals.listSettings.verifyCommand}"/>
|
||||
<TextBox Text="{Binding VerifyCommand, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
PlaceholderText="{loc:Tr modals.listSettings.verifyCommandPlaceholder}"/>
|
||||
<TextBlock Text="{loc:Tr modals.listSettings.verifyCommandHint}"
|
||||
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
|
||||
</ctl:ModalShell>
|
||||
</Window>
|
||||
|
||||
Reference in New Issue
Block a user