feat(ui): add update banner and Help menu to MainWindow
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
<KeyBinding Gesture="Shift+OemQuestion" Command="{Binding FocusSearchCommand}"/>
|
<KeyBinding Gesture="Shift+OemQuestion" Command="{Binding FocusSearchCommand}"/>
|
||||||
<KeyBinding Gesture="Ctrl+N" Command="{Binding FocusAddTaskCommand}"/>
|
<KeyBinding Gesture="Ctrl+N" Command="{Binding FocusAddTaskCommand}"/>
|
||||||
</Window.KeyBindings>
|
</Window.KeyBindings>
|
||||||
<Grid RowDefinitions="36,*,22">
|
<Grid RowDefinitions="36,Auto,*,22">
|
||||||
<!-- Custom title bar -->
|
<!-- Custom title bar -->
|
||||||
<Border Grid.Row="0"
|
<Border Grid.Row="0"
|
||||||
Background="{DynamicResource DeepBrush}"
|
Background="{DynamicResource DeepBrush}"
|
||||||
@@ -54,6 +54,17 @@
|
|||||||
Foreground="{DynamicResource TextDimBrush}"
|
Foreground="{DynamicResource TextDimBrush}"
|
||||||
LetterSpacing="1.4"
|
LetterSpacing="1.4"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"/>
|
||||||
|
<!-- Help menu -->
|
||||||
|
<Menu Margin="12,0,0,0"
|
||||||
|
Background="Transparent"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
<MenuItem Header="Help"
|
||||||
|
FontSize="11"
|
||||||
|
Foreground="{DynamicResource TextDimBrush}">
|
||||||
|
<MenuItem Header="Check for updates"
|
||||||
|
Command="{Binding CheckForUpdatesCommand}"/>
|
||||||
|
</MenuItem>
|
||||||
|
</Menu>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Middle: draggable strip -->
|
<!-- Middle: draggable strip -->
|
||||||
@@ -77,8 +88,47 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
<!-- Update banner -->
|
||||||
|
<Border Grid.Row="1"
|
||||||
|
Background="{DynamicResource DeepBrush}"
|
||||||
|
BorderBrush="{DynamicResource LineBrush}"
|
||||||
|
BorderThickness="0,0,0,1"
|
||||||
|
Padding="14,6"
|
||||||
|
IsVisible="{Binding IsUpdateBannerVisible}">
|
||||||
|
<Grid ColumnDefinitions="*,Auto,Auto">
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Foreground="{DynamicResource TextDimBrush}"
|
||||||
|
FontSize="12">
|
||||||
|
<Run Text="Update available: v"/>
|
||||||
|
<Run Text="{Binding UpdateCheck.CurrentVersion}"/>
|
||||||
|
<Run Text=" → v"/>
|
||||||
|
<Run Text="{Binding UpdateBannerLatestVersion}"/>
|
||||||
|
</TextBlock>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Margin="0,0,8,0"
|
||||||
|
Padding="10,3"
|
||||||
|
Content="Update now"
|
||||||
|
Command="{Binding UpdateNowCommand}"/>
|
||||||
|
<Button Grid.Column="2"
|
||||||
|
Padding="10,3"
|
||||||
|
Content="Dismiss"
|
||||||
|
Command="{Binding DismissBannerCommand}"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Inline update status (appears at right of banner row when no banner) -->
|
||||||
|
<TextBlock Grid.Row="1"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="0,0,14,0"
|
||||||
|
FontSize="11"
|
||||||
|
Foreground="{DynamicResource TextFaintBrush}"
|
||||||
|
Text="{Binding InlineUpdateStatus}"
|
||||||
|
IsVisible="{Binding InlineUpdateStatus, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||||||
|
|
||||||
<!-- Background gradient layer -->
|
<!-- Background gradient layer -->
|
||||||
<Border Grid.Row="1">
|
<Border Grid.Row="2">
|
||||||
<Border.Background>
|
<Border.Background>
|
||||||
<RadialGradientBrush Center="50%,50%" GradientOrigin="50%,50%" RadiusX="70%" RadiusY="70%">
|
<RadialGradientBrush Center="50%,50%" GradientOrigin="50%,50%" RadiusX="70%" RadiusY="70%">
|
||||||
<GradientStop Offset="0" Color="{StaticResource DeepColor}" />
|
<GradientStop Offset="0" Color="{StaticResource DeepColor}" />
|
||||||
@@ -88,7 +138,7 @@
|
|||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Three islands -->
|
<!-- Three islands -->
|
||||||
<Grid Grid.Row="1" Margin="7" ColumnDefinitions="260,*,320">
|
<Grid Grid.Row="2" Margin="7" ColumnDefinitions="260,*,320">
|
||||||
<Border Grid.Column="0" Classes="island" Margin="7">
|
<Border Grid.Column="0" Classes="island" Margin="7">
|
||||||
<islands:ListsIslandView DataContext="{Binding Lists}"/>
|
<islands:ListsIslandView DataContext="{Binding Lists}"/>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -102,7 +152,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Footer: connection status -->
|
<!-- Footer: connection status -->
|
||||||
<Border Grid.Row="2"
|
<Border Grid.Row="3"
|
||||||
Background="{DynamicResource DeepBrush}"
|
Background="{DynamicResource DeepBrush}"
|
||||||
BorderBrush="{DynamicResource LineBrush}"
|
BorderBrush="{DynamicResource LineBrush}"
|
||||||
BorderThickness="0,1,0,0">
|
BorderThickness="0,1,0,0">
|
||||||
|
|||||||
Reference in New Issue
Block a user