50 lines
2.8 KiB
XML
50 lines
2.8 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:vm="using:MeWeb.App.ViewModels"
|
||
|
|
xmlns:s="using:MeWeb.App.Services"
|
||
|
|
x:Class="MeWeb.App.Views.MainView"
|
||
|
|
x:DataType="vm:MainViewModel"
|
||
|
|
FlowDirection="{Binding Flow}"
|
||
|
|
Background="{StaticResource GroundBrush}">
|
||
|
|
<DockPanel Margin="24,18">
|
||
|
|
<Grid DockPanel.Dock="Top" ColumnDefinitions="*,Auto">
|
||
|
|
<TextBlock Grid.Column="0" Classes="title" Text="me-web?" VerticalAlignment="Center" />
|
||
|
|
<ComboBox Grid.Column="1" MinWidth="180" VerticalAlignment="Center"
|
||
|
|
AutomationProperties.AutomationId="main-language"
|
||
|
|
AutomationProperties.Name="{s:Tr Language}"
|
||
|
|
ItemsSource="{Binding Languages}"
|
||
|
|
SelectedItem="{Binding SelectedLanguage}">
|
||
|
|
<ComboBox.ItemTemplate>
|
||
|
|
<DataTemplate x:DataType="s:Language">
|
||
|
|
<TextBlock Text="{Binding Name}" />
|
||
|
|
</DataTemplate>
|
||
|
|
</ComboBox.ItemTemplate>
|
||
|
|
</ComboBox>
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<StackPanel DockPanel.Dock="Bottom" Spacing="6" HorizontalAlignment="Center">
|
||
|
|
<StackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Center" IsVisible="{Binding ShowDraftNotice}">
|
||
|
|
<TextBlock Classes="small" Text="{s:Tr DraftNotice}" VerticalAlignment="Center" />
|
||
|
|
<Button Classes="link" Content="{s:Tr SuggestCorrection}"
|
||
|
|
AutomationProperties.AutomationId="main-suggest-correction"
|
||
|
|
Command="{Binding OpenCorrectionsCommand}" />
|
||
|
|
</StackPanel>
|
||
|
|
<TextBlock Classes="small" Text="{Binding VersionFormatted}" HorizontalAlignment="Center" />
|
||
|
|
</StackPanel>
|
||
|
|
|
||
|
|
<StackPanel Spacing="22" VerticalAlignment="Center" HorizontalAlignment="Center" MaxWidth="560">
|
||
|
|
<Grid Width="140" Height="140" HorizontalAlignment="Center">
|
||
|
|
<Ellipse Classes="pulse" Width="140" Height="140" Fill="{StaticResource BrandRedBrush}" IsVisible="{Binding ShowChecking}" />
|
||
|
|
<Ellipse Width="112" Height="112" Fill="{StaticResource SurfaceRaisedBrush}" Stroke="{StaticResource LineBrush}" StrokeThickness="2" />
|
||
|
|
<Ellipse Width="64" Height="64" Fill="{StaticResource GoodBrush}" IsVisible="{Binding ShowOnline}" />
|
||
|
|
<Ellipse Width="64" Height="64" Fill="{StaticResource BadBrush}" IsVisible="{Binding ShowOffline}" />
|
||
|
|
<Ellipse Width="64" Height="64" Fill="{StaticResource TextSoftBrush}" Opacity="0.4" IsVisible="{Binding ShowChecking}" />
|
||
|
|
</Grid>
|
||
|
|
<TextBlock Classes="status" Text="{Binding StatusFormatted}" />
|
||
|
|
<TextBlock Classes="lead" Text="{s:Tr AppTagline}" />
|
||
|
|
<Button Classes="primary" Content="{s:Tr Check}"
|
||
|
|
AutomationProperties.AutomationId="main-check"
|
||
|
|
Command="{Binding RefreshCommand}" />
|
||
|
|
</StackPanel>
|
||
|
|
</DockPanel>
|
||
|
|
</UserControl>
|