feat(ui): add MissionControl window + grid
This commit is contained in:
@@ -235,7 +235,10 @@
|
||||
},
|
||||
"missionControl": {
|
||||
"openInApp": "In App öffnen",
|
||||
"cancel": "Abbrechen"
|
||||
"cancel": "Abbrechen",
|
||||
"windowTitle": "Mission Control",
|
||||
"clearFinished": "Erledigte entfernen",
|
||||
"empty": "Keine laufenden Aufgaben"
|
||||
},
|
||||
"modals": {
|
||||
"logVisualizer": {
|
||||
|
||||
@@ -235,7 +235,10 @@
|
||||
},
|
||||
"missionControl": {
|
||||
"openInApp": "Open in app",
|
||||
"cancel": "Cancel"
|
||||
"cancel": "Cancel",
|
||||
"windowTitle": "Mission Control",
|
||||
"clearFinished": "Clear finished",
|
||||
"empty": "No running tasks"
|
||||
},
|
||||
"modals": {
|
||||
"logVisualizer": {
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels"
|
||||
xmlns:vmi="using:ClaudeDo.Ui.ViewModels.Islands"
|
||||
xmlns:mc="using:ClaudeDo.Ui.Views.MissionControl"
|
||||
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
||||
x:DataType="vm:MissionControlViewModel"
|
||||
x:Class="ClaudeDo.Ui.Views.MissionControl.MissionControlView">
|
||||
<DockPanel LastChildFill="True" Background="{DynamicResource VoidBrush}">
|
||||
|
||||
<!-- Header -->
|
||||
<Border DockPanel.Dock="Top"
|
||||
Background="{DynamicResource DeepBrush}"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="0,0,0,1" Padding="14,8">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBlock Grid.Column="0" Classes="eyebrow"
|
||||
Text="{loc:Tr missionControl.windowTitle}"
|
||||
Foreground="{DynamicResource TextBrush}"
|
||||
LetterSpacing="1.4" VerticalAlignment="Center" />
|
||||
<Button Grid.Column="1" Classes="btn"
|
||||
Content="{loc:Tr missionControl.clearFinished}"
|
||||
Command="{Binding ClearFinishedCommand}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Grid / empty state -->
|
||||
<Panel Margin="6">
|
||||
<ItemsControl ItemsSource="{Binding Monitors}" IsVisible="{Binding HasMonitors}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid x:CompileBindings="False" Columns="{Binding ColumnCount}" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="vmi:TaskMonitorViewModel">
|
||||
<mc:MonitorPaneView Margin="6" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<TextBlock IsVisible="{Binding !HasMonitors}"
|
||||
Text="{loc:Tr missionControl.empty}"
|
||||
Foreground="{DynamicResource TextMuteBrush}"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Panel>
|
||||
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace ClaudeDo.Ui.Views.MissionControl;
|
||||
|
||||
public partial class MissionControlView : UserControl
|
||||
{
|
||||
public MissionControlView() => InitializeComponent();
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels"
|
||||
xmlns:mc="using:ClaudeDo.Ui.Views.MissionControl"
|
||||
xmlns:loc="using:ClaudeDo.Ui.Localization"
|
||||
x:Class="ClaudeDo.Ui.Views.MissionControl.MissionControlWindow"
|
||||
x:DataType="vm:MissionControlViewModel"
|
||||
Title="{loc:Tr missionControl.windowTitle}"
|
||||
Width="1100" Height="760" MinWidth="640" MinHeight="420"
|
||||
Background="{DynamicResource VoidBrush}"
|
||||
Icon="avares://ClaudeDo.Ui/Assets/ClaudeTask.ico">
|
||||
<mc:MissionControlView />
|
||||
</Window>
|
||||
@@ -0,0 +1,17 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace ClaudeDo.Ui.Views.MissionControl;
|
||||
|
||||
public partial class MissionControlWindow : Window
|
||||
{
|
||||
public MissionControlWindow() => InitializeComponent();
|
||||
|
||||
protected override void OnClosing(WindowClosingEventArgs e)
|
||||
{
|
||||
// Hide instead of destroying — Mission Control keeps tracking tasks in the
|
||||
// background and re-shows on next open.
|
||||
e.Cancel = true;
|
||||
Hide();
|
||||
base.OnClosing(e);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user