Listen bekommen eine Icon-Spalte (Migration AddListIcon) und einen Icon-Picker in den Listeneinstellungen; 34 kuratierte Geometrien aus der Icon-Bibliothek, Fallback auf "Folder" bei unbekanntem Key. Der Metadata-Footer im Task-Detail entfällt; created-at wandert in die Header-Zeile neben das ID-Badge, der Close-Button (und CloseDetailsCommand) fällt weg.
86 lines
3.8 KiB
XML
86 lines
3.8 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands"
|
|
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
|
|
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
|
x:Class="ClaudeDo.Ui.Views.Islands.Detail.TaskHeaderBar"
|
|
x:DataType="vm:DetailsIslandViewModel">
|
|
|
|
<Grid ColumnDefinitions="*,Auto,Auto">
|
|
|
|
<!-- Column 0: id badge + editable title -->
|
|
<StackPanel Grid.Column="0" Spacing="0">
|
|
<StackPanel Orientation="Horizontal" Spacing="8" Margin="0,0,0,4">
|
|
<TextBlock Classes="meta"
|
|
Text="{Binding TaskIdBadge}"
|
|
Cursor="Hand"
|
|
ToolTip.Tip="{loc:Tr details.copyTaskIdTip}"
|
|
Tapped="OnTaskIdTapped"/>
|
|
<!-- created-at moved up from the removed metadata footer -->
|
|
<TextBlock Classes="meta" Text="{Binding Task.CreatedAtFormatted}"/>
|
|
</StackPanel>
|
|
<TextBox Text="{Binding EditableTitle, Mode=TwoWay}"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
FontSize="{StaticResource FontSizeTaskTitle}"
|
|
FontWeight="Medium"
|
|
Foreground="{DynamicResource TextBrush}"
|
|
TextWrapping="Wrap"
|
|
AcceptsReturn="False"
|
|
Padding="0"/>
|
|
|
|
<!-- Branch meta line: moved here from the task row's chip (A5) — the row no longer
|
|
shows the branch anywhere else. FallbackValue: with no task bound the path can't
|
|
resolve and IsVisible would fall back to its default (true). -->
|
|
<StackPanel Orientation="Horizontal" Spacing="4" Margin="0,4,0,0"
|
|
IsVisible="{Binding Task.HasBranch, FallbackValue=False}">
|
|
<!-- Icon.GitBranch is line-art: stroke-rendered, PathIcon would fill the lines away -->
|
|
<Viewbox Width="10" Height="10">
|
|
<Path Classes="icon-stroke" Data="{StaticResource Icon.GitBranch}"
|
|
StrokeThickness="2.4"/>
|
|
</Viewbox>
|
|
<TextBlock Classes="meta" Text="{Binding Task.Branch}"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<!-- Column 1: trash button (not running) -->
|
|
<Button Grid.Column="1" Classes="icon-btn"
|
|
Command="{Binding DeleteTaskCommand}"
|
|
ToolTip.Tip="{loc:Tr details.deleteTaskTip}"
|
|
ToolTip.ShowOnDisabled="True"
|
|
IsVisible="{Binding !IsRunning}"
|
|
VerticalAlignment="Top"
|
|
Margin="6,0,0,0">
|
|
<PathIcon Classes="danger" Data="{StaticResource Icon.Trash}" Width="14" Height="14"/>
|
|
</Button>
|
|
|
|
<!-- Column 1: skull button (running) -->
|
|
<Button Grid.Column="1" Classes="icon-btn"
|
|
Command="{Binding StopCommand}"
|
|
ToolTip.Tip="{loc:Tr details.killSessionTip}"
|
|
IsVisible="{Binding IsRunning}"
|
|
VerticalAlignment="Top"
|
|
Margin="6,0,0,0">
|
|
<PathIcon Classes="danger" Data="{StaticResource Icon.Skull}" Width="14" Height="14"/>
|
|
</Button>
|
|
|
|
<!-- Column 2: gear button with agent settings flyout -->
|
|
<Button Grid.Column="2" Classes="icon-btn"
|
|
ToolTip.Tip="{loc:Tr details.agentSettingsTip}"
|
|
IsEnabled="{Binding AgentSettings.IsEnabled}"
|
|
VerticalAlignment="Top"
|
|
Margin="6,0,0,0">
|
|
<PathIcon Data="{StaticResource Icon.Settings}" Width="15" Height="15"/>
|
|
<Button.Flyout>
|
|
<Flyout Placement="BottomEdgeAlignedRight" ShowMode="Standard">
|
|
<StackPanel Width="340" Spacing="10" Margin="4">
|
|
<TextBlock Text="{loc:Tr details.agentSettingsHeading}" FontWeight="SemiBold"/>
|
|
<ctl:AgentConfigEditor DataContext="{Binding AgentSettings}"/>
|
|
</StackPanel>
|
|
</Flyout>
|
|
</Button.Flyout>
|
|
</Button>
|
|
|
|
</Grid>
|
|
</UserControl>
|