Adds the IWorkerClient/WorkerClient usage surface (GetUsageSnapshot, GetModelUsage, GetTaskUsage, UsageUpdated event) and a shared UsagePillViewModel hosted once in IslandsShellViewModel (footer) and once in MissionControlViewModel (header), showing "5h X% · 7d Y%" with warn/blocked/stale states via existing design tokens. The OpenMonitorCommand is wired but currently a no-op, pending the usage monitor modal.
26 lines
1.3 KiB
XML
26 lines
1.3 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:ClaudeDo.Ui.ViewModels"
|
|
x:Class="ClaudeDo.Ui.Views.Controls.UsagePill"
|
|
x:DataType="vm:UsagePillViewModel">
|
|
<Button Command="{Binding OpenMonitorCommand}"
|
|
Background="Transparent" BorderThickness="0" Padding="0"
|
|
Cursor="Hand" VerticalAlignment="Center"
|
|
ToolTip.Tip="{Binding Tooltip}">
|
|
<StackPanel Orientation="Horizontal" Spacing="7" VerticalAlignment="Center">
|
|
<Ellipse Width="7" Height="7" Fill="{DynamicResource TextDimBrush}"
|
|
IsVisible="{Binding ShowNormalDot}"/>
|
|
<Ellipse Width="7" Height="7" Fill="{DynamicResource StatusReviewBrush}"
|
|
IsVisible="{Binding ShowWarnDot}"/>
|
|
<Ellipse Width="7" Height="7" Fill="{DynamicResource StatusErrorBrush}"
|
|
IsVisible="{Binding IsBlocked}"/>
|
|
<Ellipse Width="7" Height="7" Fill="{DynamicResource TextMuteBrush}"
|
|
IsVisible="{Binding ShowStaleDot}"/>
|
|
<TextBlock Classes="eyebrow"
|
|
Text="{Binding Text, Converter={StaticResource UpperCase}}"
|
|
LetterSpacing="1.4"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Button>
|
|
</UserControl>
|