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

31 lines
1.5 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" Classes="touchTarget"
Command="{Binding SyncNowCommand}"
IsVisible="{Binding CanAttemptSync}"
Background="Transparent" Padding="8"
ToolTip.Tip="Jetzt synchronisieren" AutomationProperties.Name="Jetzt synchronisieren">
<Grid>
<PathIcon Data="{StaticResource IconRefresh}" Width="18" Height="18"
IsVisible="{Binding !IsSyncing}"/>
<ProgressBar Width="22" Height="4" IsIndeterminate="True"
IsVisible="{Binding IsSyncing}"/>
</Grid>
</Button>
</Grid>
</UserControl>