mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 14:15:00 +00:00
enhance: add a button to clear all notifications (#950)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
37e5926388
commit
011a415949
6 changed files with 27 additions and 2 deletions
|
@ -53,7 +53,7 @@
|
|||
PointerPressed="OnMaskClicked"
|
||||
IsVisible="{Binding Popup, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||||
|
||||
<Grid RowDefinitions="Auto,*" Width="512" HorizontalAlignment="Center">
|
||||
<Grid RowDefinitions="Auto,Auto,*" Width="512" HorizontalAlignment="Center">
|
||||
<!-- Popup -->
|
||||
<Border Grid.Row="0"
|
||||
Margin="6,0"
|
||||
|
@ -104,8 +104,24 @@
|
|||
</ContentControl>
|
||||
</Border>
|
||||
|
||||
<!-- Notifications Clear Button -->
|
||||
<Button Grid.Row="1"
|
||||
Classes="flat primary"
|
||||
Margin="0,8,0,0"
|
||||
Padding="16,0"
|
||||
Height="24"
|
||||
CornerRadius="12"
|
||||
HorizontalAlignment="Center"
|
||||
Command="{Binding ClearNotifications}"
|
||||
IsVisible="{Binding Notifications.Count, Converter={x:Static c:IntConverters.IsGreaterThanZero}}">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<Path Width="14" Height="14" Data="{StaticResource Icons.ClearNotifications}" Fill="White"/>
|
||||
<TextBlock Margin="4,0,0,0" Text="{DynamicResource Text.Repository.Notifications.Clear}" Foreground="White"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<!-- Notifications -->
|
||||
<ScrollViewer Grid.Row="1" Margin="0,6,0,0" VerticalAlignment="Top" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
<ScrollViewer Grid.Row="2" VerticalAlignment="Top" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl ItemsSource="{Binding Notifications}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="m:Notification">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue