feat(ui): wire worker connection modal and make status pill clickable
This commit is contained in:
@@ -186,9 +186,12 @@
|
|||||||
BorderBrush="{DynamicResource LineBrush}"
|
BorderBrush="{DynamicResource LineBrush}"
|
||||||
BorderThickness="0,1,0,0">
|
BorderThickness="0,1,0,0">
|
||||||
<DockPanel LastChildFill="True" Margin="14,0">
|
<DockPanel LastChildFill="True" Margin="14,0">
|
||||||
<!-- Left: connection pill -->
|
<!-- Left: connection pill (click to open worker help) -->
|
||||||
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Spacing="7"
|
<Button DockPanel.Dock="Left"
|
||||||
VerticalAlignment="Center">
|
Command="{Binding OpenWorkerConnectionHelpCommand}"
|
||||||
|
Background="Transparent" BorderThickness="0" Padding="0"
|
||||||
|
Cursor="Hand" VerticalAlignment="Center">
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="7" VerticalAlignment="Center">
|
||||||
<Ellipse Width="7" Height="7" Fill="{DynamicResource StatusRunningBrush}"
|
<Ellipse Width="7" Height="7" Fill="{DynamicResource StatusRunningBrush}"
|
||||||
IsVisible="{Binding Worker.IsConnected}"/>
|
IsVisible="{Binding Worker.IsConnected}"/>
|
||||||
<Ellipse Width="7" Height="7" Fill="{DynamicResource StatusReviewBrush}"
|
<Ellipse Width="7" Height="7" Fill="{DynamicResource StatusReviewBrush}"
|
||||||
@@ -200,6 +203,7 @@
|
|||||||
LetterSpacing="1.4"
|
LetterSpacing="1.4"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
|
|
||||||
<!-- Right: worker log line -->
|
<!-- Right: worker log line -->
|
||||||
<TextBlock DockPanel.Dock="Right"
|
<TextBlock DockPanel.Dock="Right"
|
||||||
|
|||||||
@@ -68,6 +68,12 @@ public partial class MainWindow : Window
|
|||||||
modal.CloseAction = () => dlg.Close();
|
modal.CloseAction = () => dlg.Close();
|
||||||
await dlg.ShowDialog(this);
|
await dlg.ShowDialog(this);
|
||||||
};
|
};
|
||||||
|
vm.ShowWorkerConnectionModal = async (connVm) =>
|
||||||
|
{
|
||||||
|
var dlg = new WorkerConnectionModalView { DataContext = connVm };
|
||||||
|
connVm.CloseAction = () => dlg.Close();
|
||||||
|
await dlg.ShowDialog(this);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user