Files
LehrerApp/LehrerApp.Desktop/Views/SyncStatusBar.axaml

24 lines
1.2 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels"
x:Class="LehrerApp.Desktop.Views.SyncStatusBar"
x:DataType="vm:SyncStatusViewModel">
<Grid ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0" IsVisible="{Binding !IsIncompatibleVersion}">
<TextBlock Text="{Binding StatusText}" FontSize="12" Opacity="0.7"
TextTrimming="CharacterEllipsis"/>
<TextBlock Text="{Binding LastSyncText}" FontSize="10" Opacity="0.4"/>
</StackPanel>
<StackPanel Grid.Column="0" IsVisible="{Binding IsIncompatibleVersion}">
<TextBlock Text="⚠ Update erforderlich" FontSize="12" FontWeight="SemiBold"
Foreground="#D32F2F"/>
<TextBlock Text="Sync angehalten" FontSize="10" Foreground="#D32F2F" Opacity="0.8"/>
</StackPanel>
<Button Grid.Column="1" Content="↻" FontSize="14"
Command="{Binding SyncNowCommand}"
IsVisible="{Binding CanAttemptSync}"
Background="Transparent" Padding="6,4"
ToolTip.Tip="Jetzt synchronisieren"/>
</Grid>
</UserControl>