feat(ui): show worker log line in footer

This commit is contained in:
mika kuns
2026-04-23 14:59:28 +02:00
parent ec4ec44603
commit b28d8f2f4a

View File

@@ -2,6 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:ClaudeDo.Ui.ViewModels" xmlns:vm="using:ClaudeDo.Ui.ViewModels"
xmlns:islands="using:ClaudeDo.Ui.Views.Islands" xmlns:islands="using:ClaudeDo.Ui.Views.Islands"
xmlns:converters="using:ClaudeDo.Ui.Converters"
x:Class="ClaudeDo.Ui.Views.MainWindow" x:Class="ClaudeDo.Ui.Views.MainWindow"
x:DataType="vm:IslandsShellViewModel" x:DataType="vm:IslandsShellViewModel"
Title="ClaudeDo" Title="ClaudeDo"
@@ -12,6 +13,9 @@
SystemDecorations="BorderOnly" SystemDecorations="BorderOnly"
ExtendClientAreaToDecorationsHint="True" ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaTitleBarHeightHint="-1"> ExtendClientAreaTitleBarHeightHint="-1">
<Window.Resources>
<converters:WorkerLogLevelToBrushConverter x:Key="WorkerLogLevelToBrush"/>
</Window.Resources>
<Window.KeyBindings> <Window.KeyBindings>
<KeyBinding Gesture="OemQuestion" Command="{Binding FocusSearchCommand}"/> <KeyBinding Gesture="OemQuestion" Command="{Binding FocusSearchCommand}"/>
<KeyBinding Gesture="Shift+OemQuestion" Command="{Binding FocusSearchCommand}"/> <KeyBinding Gesture="Shift+OemQuestion" Command="{Binding FocusSearchCommand}"/>
@@ -106,32 +110,38 @@
Background="{DynamicResource DeepBrush}" Background="{DynamicResource DeepBrush}"
BorderBrush="{DynamicResource LineBrush}" BorderBrush="{DynamicResource LineBrush}"
BorderThickness="0,1,0,0"> BorderThickness="0,1,0,0">
<StackPanel Orientation="Horizontal" Spacing="7" <DockPanel LastChildFill="True" Margin="14,0">
VerticalAlignment="Center" Margin="14,0"> <!-- Left: connection pill -->
<Ellipse Width="7" Height="7" Fill="#4CAF50" <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Spacing="7"
IsVisible="{Binding Worker.IsConnected}"/> VerticalAlignment="Center">
<Ellipse Width="7" Height="7" Fill="#FFA726" <Ellipse Width="7" Height="7" Fill="#4CAF50"
IsVisible="{Binding Worker.IsReconnecting}"/> IsVisible="{Binding Worker.IsConnected}"/>
<Ellipse Width="7" Height="7" Fill="#EF5350" <Ellipse Width="7" Height="7" Fill="#FFA726"
IsVisible="{Binding IsOffline}"/> IsVisible="{Binding Worker.IsReconnecting}"/>
<TextBlock Text="{Binding ConnectionText, Converter={StaticResource UpperCase}}" <Ellipse Width="7" Height="7" Fill="#EF5350"
IsVisible="{Binding IsOffline}"/>
<TextBlock Text="{Binding ConnectionText, Converter={StaticResource UpperCase}}"
FontFamily="{DynamicResource MonoFont}"
FontSize="10"
LetterSpacing="1.4"
Foreground="{DynamicResource TextDimBrush}"
VerticalAlignment="Center"/>
</StackPanel>
<!-- Right: worker log line -->
<TextBlock DockPanel.Dock="Right"
Text="{Binding WorkerLogText}"
IsVisible="{Binding IsWorkerLogVisible}"
Foreground="{Binding WorkerLogLevel, Converter={StaticResource WorkerLogLevelToBrush}}"
FontFamily="{DynamicResource MonoFont}" FontFamily="{DynamicResource MonoFont}"
FontSize="10" FontSize="10"
LetterSpacing="1.4" LetterSpacing="1.4"
Foreground="{DynamicResource TextDimBrush}" TextTrimming="CharacterEllipsis"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
<TextBlock Text="·"
FontFamily="{DynamicResource MonoFont}" <!-- Spacer between pill and log -->
FontSize="10" <Panel/>
Foreground="{DynamicResource TextFaintBrush}" </DockPanel>
VerticalAlignment="Center"/>
<TextBlock Text="WORKER"
FontFamily="{DynamicResource MonoFont}"
FontSize="10"
LetterSpacing="1.4"
Foreground="{DynamicResource TextFaintBrush}"
VerticalAlignment="Center"/>
</StackPanel>
</Border> </Border>
</Grid> </Grid>
</Window> </Window>