Add Windows SSH monitoring MVP #1
2 changed files with 69 additions and 4 deletions
|
|
@ -101,6 +101,7 @@
|
|||
Severity="Informational" />
|
||||
|
||||
<Border
|
||||
x:Name="OverviewSummary"
|
||||
Grid.Row="2"
|
||||
Margin="0,24,0,0"
|
||||
Padding="20,18"
|
||||
|
|
@ -145,7 +146,7 @@
|
|||
</Grid>
|
||||
</Border>
|
||||
|
||||
<ScrollViewer Grid.Row="3" Margin="0,28,0,0">
|
||||
<ScrollViewer x:Name="WorkspaceScroll" Grid.Row="3" Margin="0,28,0,0">
|
||||
<Grid x:Name="WorkspaceGrid" ColumnSpacing="24" RowSpacing="24">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
|
|
@ -341,6 +342,23 @@
|
|||
</VisualStateManager.VisualStateGroups>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
<StackPanel
|
||||
x:Name="NavigationPlaceholder"
|
||||
Grid.Row="3"
|
||||
Margin="0,36,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
MaxWidth="560"
|
||||
Spacing="12"
|
||||
Visibility="Collapsed">
|
||||
<TextBlock x:Name="PlaceholderTitle" HorizontalAlignment="Center" Style="{StaticResource TitleTextBlockStyle}" />
|
||||
<TextBlock
|
||||
x:Name="PlaceholderDescription"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
TextAlignment="Center"
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</NavigationView>
|
||||
</Page>
|
||||
|
|
|
|||
|
|
@ -539,10 +539,57 @@ public sealed partial class MainPage : Page
|
|||
{
|
||||
if (args.IsSettingsSelected)
|
||||
{
|
||||
ShowInfo(
|
||||
ShowPlaceholder(
|
||||
"Настройки",
|
||||
"Профили серверов хранятся локально; приватный SSH-ключ не покидает этот ПК.",
|
||||
InfoBarSeverity.Informational);
|
||||
"Профили серверов хранятся локально. Настройки ключей, интервалов обновления и подтверждений будут добавляться здесь.");
|
||||
return;
|
||||
}
|
||||
|
||||
var tag = (args.SelectedItem as NavigationViewItem)?.Tag?.ToString() ?? "overview";
|
||||
NavigationPlaceholder.Visibility = Visibility.Collapsed;
|
||||
OverviewSummary.Visibility = Visibility.Visible;
|
||||
WorkspaceScroll.Visibility = Visibility.Visible;
|
||||
ServerWorkspace.Visibility = tag is "overview" or "servers" ? Visibility.Visible : Visibility.Collapsed;
|
||||
LinkInspector.Visibility = tag is "overview" or "links" ? Visibility.Visible : Visibility.Collapsed;
|
||||
InspectorColumn.Width = tag == "overview" && ActualWidth >= 1080
|
||||
? new GridLength(360)
|
||||
: new GridLength(0);
|
||||
|
||||
if (tag == "links")
|
||||
{
|
||||
Grid.SetRow(LinkInspector, 0);
|
||||
Grid.SetColumn(LinkInspector, 0);
|
||||
Grid.SetColumnSpan(LinkInspector, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
Grid.SetColumnSpan(LinkInspector, 1);
|
||||
if (ActualWidth >= 1080)
|
||||
{
|
||||
Grid.SetRow(LinkInspector, 0);
|
||||
Grid.SetColumn(LinkInspector, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Grid.SetRow(LinkInspector, 1);
|
||||
Grid.SetColumn(LinkInspector, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (tag == "sessions")
|
||||
{
|
||||
ShowPlaceholder(
|
||||
"SSH-сессии",
|
||||
"Интерактивные терминалы будут использовать отдельную identity и не получат ключ мониторинга или права Mesh Hub.");
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowPlaceholder(string title, string description)
|
||||
{
|
||||
OverviewSummary.Visibility = Visibility.Collapsed;
|
||||
WorkspaceScroll.Visibility = Visibility.Collapsed;
|
||||
PlaceholderTitle.Text = title;
|
||||
PlaceholderDescription.Text = description;
|
||||
NavigationPlaceholder.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue