97 lines
4.0 KiB
XML
97 lines
4.0 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:islands="using:ClaudeDo.Ui.Views.Islands"
|
|
xmlns:detail="using:ClaudeDo.Ui.Views.Islands.Detail"
|
|
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
|
x:Class="ClaudeDo.Ui.Views.Islands.DetailsIslandView"
|
|
x:DataType="vm:DetailsIslandViewModel">
|
|
<DockPanel>
|
|
|
|
<!-- ── Metadata footer (sticky bottom) — created-at + close — task detail only ── -->
|
|
<Border DockPanel.Dock="Bottom"
|
|
IsVisible="{Binding IsTaskDetailVisible}"
|
|
BorderBrush="{DynamicResource LineBrush}"
|
|
BorderThickness="0,1,0,0"
|
|
Padding="14,8">
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<TextBlock Grid.Column="0"
|
|
Classes="meta"
|
|
Text="{Binding Task.CreatedAtFormatted}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
<Button Grid.Column="1" Classes="icon-btn"
|
|
Command="{Binding CloseDetailsCommand}"
|
|
ToolTip.Tip="{loc:Tr details.closeTip}"
|
|
VerticalAlignment="Center">
|
|
<PathIcon Data="{StaticResource Icon.X}" Width="14" Height="14"/>
|
|
</Button>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- ── Header (sticky top): id · title · trash/skull · gear — task detail only ── -->
|
|
<Border DockPanel.Dock="Top" Classes="island-header"
|
|
IsVisible="{Binding IsTaskDetailVisible}">
|
|
<detail:TaskHeaderBar/>
|
|
</Border>
|
|
|
|
<!-- ── Body: task details (normal), notes editor (notes mode), or prep log (prep mode) ── -->
|
|
<Grid>
|
|
|
|
<!-- Task detail: description/steps card (upper) + pinned work console (lower) -->
|
|
<Grid x:Name="DetailBodyGrid"
|
|
IsVisible="{Binding IsTaskDetailVisible}"
|
|
Margin="14,12,14,12">
|
|
<Grid.RowDefinitions>
|
|
<!-- MinHeight keeps the description visible: the console can never
|
|
overlap it, whether maximized (code-behind) or dragged. -->
|
|
<RowDefinition Height="2*" MinHeight="90"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<ScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Auto">
|
|
<detail:DescriptionStepsCard VerticalAlignment="Top"/>
|
|
</ScrollViewer>
|
|
<detail:WorkConsole Grid.Row="1" Margin="0,10,0,0"/>
|
|
<!-- Resize by dragging the console's top edge — a transparent splitter
|
|
over the gap above the console; no standalone separator bar.
|
|
Stays draggable while maximized. -->
|
|
<GridSplitter Grid.Row="1"
|
|
VerticalAlignment="Top"
|
|
Height="10"
|
|
HorizontalAlignment="Stretch"
|
|
ResizeDirection="Rows"
|
|
Background="Transparent"/>
|
|
</Grid>
|
|
|
|
<!-- Notes mode -->
|
|
<Panel IsVisible="{Binding IsNotesMode}">
|
|
<islands:NotesEditorView DataContext="{Binding Notes}"/>
|
|
</Panel>
|
|
|
|
<!-- Daily-prep mode -->
|
|
<Panel IsVisible="{Binding IsPrepMode}">
|
|
<DockPanel>
|
|
<Border DockPanel.Dock="Top" Padding="12,8">
|
|
<Button Classes="btn primary"
|
|
Command="{Binding PlanDayCommand}"
|
|
IsEnabled="{Binding !IsPrepRunning}"
|
|
Content="{loc:Tr details.planDay}"/>
|
|
</Border>
|
|
<Panel>
|
|
<islands:SessionTerminalView
|
|
Margin="18,8,18,0"
|
|
Entries="{Binding PrepLog}" Label="daily-prep"
|
|
IsRunning="{Binding IsPrepRunning}"/>
|
|
<TextBlock IsVisible="{Binding ShowPrepEmptyState}"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
Foreground="{DynamicResource TextMuteBrush}"
|
|
Text="{loc:Tr details.prepEmpty}"/>
|
|
</Panel>
|
|
</DockPanel>
|
|
</Panel>
|
|
|
|
</Grid>
|
|
|
|
</DockPanel>
|
|
</UserControl>
|