Skip to content

Commit

Permalink
调整视频详情页收藏菜单样式、支持鼠标中键侧键快捷关闭保存收藏选项
Browse files Browse the repository at this point in the history
  • Loading branch information
ywmoyue committed Jun 24, 2024
1 parent d373000 commit c86b7c7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
21 changes: 17 additions & 4 deletions src/BiliLite.UWP/Pages/VideoDetailPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,28 @@
</StackPanel>
<Button.Flyout>
<Flyout>
<Grid Width="240">
<Grid Width="240" PointerPressed="FavList_OnPointerPressed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition></RowDefinition>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Padding="4 0">
<TextBlock FontWeight="Bold" VerticalAlignment="Center">选择收藏夹</TextBlock>
<HyperlinkButton x:Name="btnCreateFavBox" Click="btnCreateFavBox_Click" HorizontalAlignment="Right">
<TextBlock>创建</TextBlock>
<HyperlinkButton x:Name="btnCreateFavBox"
Click="btnCreateFavBox_Click"
Margin="0 0 -5 0"
HorizontalAlignment="Right">
<TextBlock>
<Span>
<Bold>创建</Bold>
</Span>
</TextBlock>
</HyperlinkButton>
</Grid>
<ScrollViewer Grid.Row="1"
Margin="0 8 0 0"
Padding="0 0 8 0"
MaxHeight="480"
>
<ListView
Expand Down Expand Up @@ -164,7 +172,12 @@
</ListView.ItemTemplate>
</ListView>
</ScrollViewer>
<Button Grid.Row="2" HorizontalAlignment="Right" x:Name="SaveFavList" Click="SaveFavList_OnClick">保存</Button>
<Button Grid.Row="2"
HorizontalAlignment="Right"
x:Name="SaveFavList"
Click="SaveFavList_OnClick">
<TextBlock><Span><Bold>保存</Bold></Span></TextBlock>
</Button>
</Grid>
</Flyout>
</Button.Flyout>
Expand Down
8 changes: 8 additions & 0 deletions src/BiliLite.UWP/Pages/VideoDetailPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -736,5 +736,13 @@ public async Task Save()
BtnFav.Flyout.Hide();
}
}

private async void FavList_OnPointerPressed(object sender, PointerRoutedEventArgs e)
{
if (e.IsUseMiddleButton(sender))
{
await Save();
}
}
}
}

0 comments on commit c86b7c7

Please sign in to comment.