Skip to content

Commit

Permalink
给综合动态添加“在浏览器中打开”的选项 (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
Richasy authored Sep 1, 2024
1 parent 2a52ee7 commit 16bba84
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,15 @@
</StackPanel>
</Grid>
</Grid>
<local:CardControl.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem Command="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.OpenInBroswerCommand}" Text="{ext:Locale Name=OpenInBrowser}">
<MenuFlyoutItem.Icon>
<ic:SymbolIcon Symbol="Globe" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
</MenuFlyout>
</local:CardControl.ContextFlyout>
</local:CardControl>
</ControlTemplate>
</Setter.Value>
Expand Down Expand Up @@ -494,6 +503,15 @@
</StackPanel>
</Grid>
</Grid>
<local:CardControl.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem Command="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.OpenInBroswerCommand}" Text="{ext:Locale Name=OpenInBrowser}">
<MenuFlyoutItem.Icon>
<ic:SymbolIcon Symbol="Globe" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
</MenuFlyout>
</local:CardControl.ContextFlyout>
</local:CardControl>
</ControlTemplate>
</Setter.Value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public object ItemsSource

private void OnImageTapped(object sender, Microsoft.UI.Xaml.Input.TappedRoutedEventArgs e)
{
e.Handled = true;
var image = (sender as Image).Tag as BiliImage;
var itemsSource = ItemsSource as IReadOnlyCollection<BiliImage>;
new GalleryWindow(image, itemsSource.ToList()).Activate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private void Activate()
{
this.Get<NavigationViewModel>().NavigateToOver(typeof(LivePlayerPage).FullName, linfo);
}
else
else if (FindInnerContent<IEnumerable<BiliImage>>() is not IEnumerable<BiliImage>)
{
OpenInBroswerCommand.Execute(default);
}
Expand Down

0 comments on commit 16bba84

Please sign in to comment.