Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/ywmoyue/biliuwp-lite into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ywmoyue committed Oct 20, 2024
2 parents 88bf922 + b2debf8 commit 813fcac
Show file tree
Hide file tree
Showing 37 changed files with 431 additions and 334 deletions.
2 changes: 1 addition & 1 deletion src/BiliLite.UWP/Controls/Dynamic/DynamicTemplate.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
<DataTemplate x:Key="Repost">
<local:DynamicItemControl ViewModel="{Binding}">
<local:DynamicItemControl.CardContent>
<Border BorderThickness="1" BorderBrush="#C8E5E9EF" CornerRadius="4" Background="{ThemeResource TopPaneBackground}">
<Border BorderThickness="1" BorderBrush="#C8E5E9EF" CornerRadius="4" Background="Transparent">
<ListView
SelectionMode="None"
IsItemClickEnabled="false"
Expand Down
2 changes: 1 addition & 1 deletion src/BiliLite.UWP/Controls/Dynamic/DynamicV2Template.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<Grid>
<Border BorderThickness="1"
BorderBrush="#C8E5E9EF"
CornerRadius="4" Background="{ThemeResource TopPaneBackground}"
CornerRadius="4" Background="Transparent"
Visibility="{Binding ForwardMissed,Converter={StaticResource display} }">
<ListView
SelectionMode="None"
Expand Down
19 changes: 9 additions & 10 deletions src/BiliLite.UWP/Controls/ImageViewerControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@
<SymbolIcon Margin="0 -4 0 4" Symbol="Pictures"></SymbolIcon>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton ToolTipService.ToolTip="放大" x:Name="btnZoomIn" Click="btnZoomIn_Click" Width="40" Height="40" Foreground="White">
<AppBarButton.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="None" Key="Up" />
</AppBarButton.KeyboardAccelerators>
<AppBarButton.Icon>
<SymbolIcon Margin="0 -4 0 4" Symbol="ZoomIn"></SymbolIcon>
</AppBarButton.Icon>
</AppBarButton>
<TextBlock VerticalAlignment="Center" FontSize="16" Margin="8 0" Foreground="White" Text="{Binding ElementName=scrollViewer,Path=ZoomFactor,Mode=OneWay,Converter={StaticResource numberToStringConvert},ConverterParameter='p00'}"></TextBlock>
<AppBarButton ToolTipService.ToolTip="缩小" x:Name="btnZoomOut" Click="btnZoomOut_Click" Width="40" Height="40" Foreground="White">
<AppBarButton.Icon>
<SymbolIcon Margin="0 -4 0 4" Symbol="ZoomOut"></SymbolIcon>
Expand All @@ -54,7 +45,15 @@
<KeyboardAccelerator Modifiers="None" Key="Down" />
</AppBarButton.KeyboardAccelerators>
</AppBarButton>

<TextBlock VerticalAlignment="Center" FontSize="16" Margin="8 0" Foreground="White" Text="{Binding ElementName=scrollViewer,Path=ZoomFactor,Mode=OneWay,Converter={StaticResource numberToStringConvert},ConverterParameter='p00'}"></TextBlock>
<AppBarButton ToolTipService.ToolTip="放大" x:Name="btnZoomIn" Click="btnZoomIn_Click" Width="40" Height="40" Foreground="White">
<AppBarButton.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="None" Key="Up" />
</AppBarButton.KeyboardAccelerators>
<AppBarButton.Icon>
<SymbolIcon Margin="0 -4 0 4" Symbol="ZoomIn"></SymbolIcon>
</AppBarButton.Icon>
</AppBarButton>
</StackPanel>
</Border>
<Border Margin="12 0 0 0" CornerRadius="8" Background="#7F000000" >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<TextBox x:Name="LiveDanmuSettingTxtWord" PlaceholderText="请输入关键词" Width="200"></TextBox>
<Button x:Name="LiveDanmuSettingAddWord" Click="LiveDanmuSettingAddWord_Click" Margin="4 0">添加</Button>
</StackPanel>
<ListView x:Name="LiveDanmuSettingListWords" ItemContainerStyle="{StaticResource DanmuFilterStyle}" Margin="0 8 0 0" SelectionMode="None" IsItemClickEnabled="False" Width="320" Height="160" HorizontalAlignment="Left" Background="{ThemeResource TopPaneBackground}">
<ListView x:Name="LiveDanmuSettingListWords" ItemContainerStyle="{StaticResource DanmuFilterStyle}" Margin="0 8 0 0" SelectionMode="None" IsItemClickEnabled="False" Width="320" Height="160" HorizontalAlignment="Left" Background="Transparent">

<ListView.ItemTemplate>
<DataTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<TextBox x:Name="DanmuSettingTxtWord" PlaceholderText="请输入关键词" Width="200"></TextBox>
<Button x:Name="DanmuSettingAddWord" Click="DanmuSettingAddWord_Click" Margin="4 0">添加</Button>
</StackPanel>
<ListView x:Name="DanmuSettingListWords" ItemContainerStyle="{StaticResource DanmuFilterStyle}" Margin="0 8 0 0" SelectionMode="None" IsItemClickEnabled="False" Width="320" Height="160" HorizontalAlignment="Left" Background="{ThemeResource TopPaneBackground}">
<ListView x:Name="DanmuSettingListWords" ItemContainerStyle="{StaticResource DanmuFilterStyle}" Margin="0 8 0 0" SelectionMode="None" IsItemClickEnabled="False" Width="320" Height="160" HorizontalAlignment="Left" Background="Transparent">

<ListView.ItemTemplate>
<DataTemplate>
Expand All @@ -111,7 +111,7 @@
<TextBox x:Name="DanmuSettingTxtRegex" PlaceholderText="请输入正则表达式" Width="200"></TextBox>
<Button x:Name="DanmuSettingAddRegex" Click="DanmuSettingAddRegex_Click" Margin="4 0">添加</Button>
</StackPanel>
<ListView x:Name="DanmuSettingListRegulars" ItemContainerStyle="{StaticResource DanmuFilterStyle}" Margin="0 8 0 0" SelectionMode="None" IsItemClickEnabled="False" Width="320" Height="160" HorizontalAlignment="Left" Background="{ThemeResource TopPaneBackground}">
<ListView x:Name="DanmuSettingListRegulars" ItemContainerStyle="{StaticResource DanmuFilterStyle}" Margin="0 8 0 0" SelectionMode="None" IsItemClickEnabled="False" Width="320" Height="160" HorizontalAlignment="Left" Background="Transparent">
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
Expand All @@ -137,7 +137,7 @@
<TextBox x:Name="DanmuSettingTxtUser" PlaceholderText="请输入用户ID" Width="200"></TextBox>
<Button x:Name="DanmuSettingAddUser" Click="DanmuSettingAddUser_Click" Margin="4 0">添加</Button>
</StackPanel>
<ListView x:Name="DanmuSettingListUsers" ItemContainerStyle="{StaticResource DanmuFilterStyle}" Margin="0 8" SelectionMode="None" IsItemClickEnabled="False" Width="320" Height="160" HorizontalAlignment="Left" Background="{ThemeResource TopPaneBackground}">
<ListView x:Name="DanmuSettingListUsers" ItemContainerStyle="{StaticResource DanmuFilterStyle}" Margin="0 8" SelectionMode="None" IsItemClickEnabled="False" Width="320" Height="160" HorizontalAlignment="Left" Background="Transparent">
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
Expand Down
73 changes: 47 additions & 26 deletions src/BiliLite.UWP/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,74 @@
x:Class="BiliLite.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:BiliLite"
xmlns:controls="using:BiliLite.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:fa="using:FontAwesome5"
xmlns:local="using:BiliLite"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:muxm="using:Microsoft.UI.Xaml.Media"
xmlns:pages="using:BiliLite.Pages"
xmlns:winui="using:Microsoft.UI.Xaml.Controls"
winui:BackdropMaterial.ApplyToRootOrPageBackground="True"
xmlns:fa="using:FontAwesome5"
xmlns:pages="using:BiliLite.Pages"
xmlns:muxm="using:Microsoft.UI.Xaml.Media"
xmlns:controls="using:BiliLite.Controls"
Background="Transparent">
mc:Ignorable="d">
<Page.Resources>
<SolidColorBrush x:Key="NavigationViewContentBackground" Color="Transparent" />
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundSelected" Color="Transparent" />
</Page.Resources>

<Grid>
<Grid x:Name="CustomDragRegion" Width="{Binding ElementName=AvailableDragRegion, Path=Width}"/>
<winui:TabView
TabWidthMode="SizeToContent" Style="{ThemeResource DefaultTabViewStyle}"
x:Name="tabView"
TabItemsChanged="tabView_TabItemsChanged"
VerticalAlignment="Stretch"
VerticalContentAlignment="Stretch"
Loaded="tabView_Loaded"
IsAddTabButtonVisible="True"
<Grid x:Name="CustomDragRegion" Width="{Binding ElementName=AvailableDragRegion, Path=Width}" />
<winui:TabView
x:Name="tabView"
VerticalAlignment="Stretch"
VerticalContentAlignment="Stretch"
AddTabButtonClick="TabView_AddTabButtonClick"
IsAddTabButtonVisible="True"
Loaded="tabView_Loaded"
PreviewKeyDown="TabView_OnPreviewKeyDown"
TabCloseRequested="TabView_TabCloseRequested"
AddTabButtonClick="TabView_AddTabButtonClick">
TabCloseRequested="TabView_TabCloseRequested"
TabItemsChanged="tabView_TabItemsChanged"
TabWidthMode="SizeToContent">
<winui:TabView.KeyboardAccelerators>
<KeyboardAccelerator Key="T" Modifiers="Control" Invoked="NewTabKeyboardAccelerator_Invoked" />
<KeyboardAccelerator Key="W" Modifiers="Control" Invoked="CloseSelectedTabKeyboardAccelerator_Invoked" />
<KeyboardAccelerator
Key="T"
Invoked="NewTabKeyboardAccelerator_Invoked"
Modifiers="Control" />
<KeyboardAccelerator
Key="W"
Invoked="CloseSelectedTabKeyboardAccelerator_Invoked"
Modifiers="Control" />
</winui:TabView.KeyboardAccelerators>
<winui:TabView.TabItems>
<winui:TabViewItem IsClosable="False" Header="首页">
<winui:TabViewItem
Header="首页"
IsClosable="False">
<winui:TabViewItem.IconSource>
<winui:SymbolIconSource Symbol="Home" />
</winui:TabViewItem.IconSource>
</winui:TabViewItem>
</winui:TabView.TabItems>

<winui:TabView.TabStripHeader>
<Grid x:Name="ShellTitlebarInset" Background="Transparent" />
<Grid x:Name="ShellTitlebarInset" />
</winui:TabView.TabStripHeader>
<winui:TabView.TabStripFooter>
<Grid x:Name="AvailableDragRegion" Background="Transparent" ></Grid>
<Grid x:Name="AvailableDragRegion" Background="Transparent" />
</winui:TabView.TabStripFooter>
</winui:TabView>
<Border x:Name="MiniWindowsTitleBar" Visibility="Collapsed" Background="#00FFFFFF" Height="36" VerticalAlignment="Top"></Border>
<Grid x:Name="gridViewer" Opacity="0" Visibility="Collapsed" Background="{ThemeResource SystemControlChromeHighAcrylicElementMediumBrush}" >
<controls:ImageViewerControl x:Name="imgViewer" CloseEvent="imgViewer_CloseEvent"></controls:ImageViewerControl>
<Border
x:Name="MiniWindowsTitleBar"
Height="36"
VerticalAlignment="Top"
Background="#00FFFFFF"
Visibility="Collapsed" />
<Grid
x:Name="gridViewer"
Margin="0,48,0,0"
Background="{ThemeResource SystemControlChromeHighAcrylicElementMediumBrush}"
Opacity="0"
Visibility="Collapsed">
<controls:ImageViewerControl x:Name="imgViewer" CloseEvent="imgViewer_CloseEvent" />
</Grid>
</Grid>
</Page>
72 changes: 51 additions & 21 deletions src/BiliLite.UWP/NoTabMainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,67 @@
x:Class="BiliLite.NoTabMainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:BiliLite"
xmlns:controls="using:BiliLite.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:controls="using:BiliLite.Controls"
mc:Ignorable="d"
xmlns:local="using:BiliLite"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:winui="using:Microsoft.UI.Xaml.Controls"
winui:BackdropMaterial.ApplyToRootOrPageBackground="True"
Background="Transparent"
Loaded="NoTabMainPage_OnLoaded">
Loaded="NoTabMainPage_OnLoaded"
mc:Ignorable="d">

<Grid Background="{ThemeResource ApplicationBackground}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid Height="32">

<local:NewInstanceFrame x:Name="frame" Grid.Row="1" />

<Grid
x:Name="gridViewer"
Grid.RowSpan="2"
Background="{ThemeResource SystemControlChromeHighAcrylicElementMediumBrush}"
Visibility="Collapsed">
<controls:ImageViewerControl x:Name="imgViewer" CloseEvent="imgViewer_CloseEvent" />
</Grid>
<Border
x:Name="MiniWindowsTitleBar"
Grid.RowSpan="2"
Height="40"
VerticalAlignment="Top"
Background="#00FFFFFF"
Visibility="Collapsed" />
<Grid Height="32" Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button x:Name="btnBack" Click="btnBack_Click" Visibility="Visible" Height="40" Background="Transparent" Width="48" Margin="0 -4" >
<FontIcon FontFamily="Segoe MDL2 Assets" FontSize="14" Glyph="&#xE0A6;" />
<Button
x:Name="btnBack"
Width="48"
Height="40"
Margin="0,-4"
Click="btnBack_Click"
Visibility="Visible">
<FontIcon
FontFamily="Segoe MDL2 Assets"
FontSize="14"
Glyph="&#xE0A6;" />
</Button>
<Border Grid.Column="1" x:Name="TitleBar" Background="#00000000">
<TextBlock x:Name="txtTitle" Margin="12 0" VerticalAlignment="Center">哔哩哔哩 UWP</TextBlock>
<Border
x:Name="TitleBar"
Grid.Column="1"
Background="Transparent">
<TextBlock
x:Name="txtTitle"
Margin="12,0"
VerticalAlignment="Center">
哔哩哔哩 UWP
</TextBlock>
</Border>
</Grid>

<local:NewInstanceFrame x:Name="frame" Grid.Row="1"/>


<Border x:Name="MiniWindowsTitleBar" Grid.RowSpan="2" Visibility="Collapsed" Background="#00FFFFFF" Height="40" VerticalAlignment="Top"></Border>
<Grid x:Name="gridViewer" Grid.RowSpan="2" Visibility="Collapsed" Background="{ThemeResource SystemControlChromeHighAcrylicElementMediumBrush}" >
<controls:ImageViewerControl x:Name="imgViewer" CloseEvent="imgViewer_CloseEvent"></controls:ImageViewerControl>
</Grid>
</Grid>
</Page>
10 changes: 8 additions & 2 deletions src/BiliLite.UWP/NoTabMainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private void Frame_Navigated(object sender, NavigationEventArgs e)
{
txtTitle.Text = "哔哩哔哩 UWP";
}
if (e.Content is Pages.BasePage && e.NavigationMode!=NavigationMode.Back)
if (e.Content is Pages.BasePage && e.NavigationMode != NavigationMode.Back)
{
var title = (e.Content as BasePage).Title;
PushTitle(title);
Expand Down Expand Up @@ -168,6 +168,12 @@ private void NavigationHelper_NavigateToPageEvent(object sender, NavigationInfo

private void btnBack_Click(object sender, RoutedEventArgs e)
{
//如果打开了图片浏览,则关闭图片浏览
if (gridViewer.Visibility == Visibility.Visible)
{
imgViewer_CloseEvent(this, null);
return;
}
if (frame.CanGoBack)
{
frame.GoBack();
Expand Down Expand Up @@ -289,7 +295,7 @@ public bool Navigate(Type sourcePageType, object parameter = null)

//跳转页面
(this.Children.Last() as Frame).Navigate(sourcePageType, parameter);

return true;
}
public bool CanGoBack
Expand Down
2 changes: 1 addition & 1 deletion src/BiliLite.UWP/Pages/Bangumi/AnimeIndexPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<Grid Background="{ThemeResource TopPaneBackground}">
<Grid>
<ItemsControl ItemsSource="{x:Bind Path=seasonIndexVM.Conditions,Mode=OneWay}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
Expand Down
2 changes: 1 addition & 1 deletion src/BiliLite.UWP/Pages/Bangumi/SeasonRankPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
xmlns:modules="using:BiliLite.Modules.Season"
Background="Transparent">
<Page.Resources>
<SolidColorBrush x:Key="PivotHeaderBackground" Color="{ThemeResource TopPaneBackground}"></SolidColorBrush>
<SolidColorBrush x:Key="PivotHeaderBackground" Color="Transparent"></SolidColorBrush>
<SolidColorBrush x:Key="SystemControlHighlightAltAccentBrush" Color="White"></SolidColorBrush>
<convert:RankColorConvert x:Key="RankConvert"/>
</Page.Resources>
Expand Down
2 changes: 1 addition & 1 deletion src/BiliLite.UWP/Pages/Bangumi/TimelinePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
xmlns:fa="using:FontAwesome5"
Background="Transparent">
<Page.Resources>
<SolidColorBrush x:Key="PivotHeaderBackground" Color="{ThemeResource TopPaneBackground}"></SolidColorBrush>
<SolidColorBrush x:Key="PivotHeaderBackground" Color="Transparent"></SolidColorBrush>
<SolidColorBrush x:Key="SystemControlHighlightAltAccentBrush" Color="White"></SolidColorBrush>
</Page.Resources>
<Grid>
Expand Down
2 changes: 1 addition & 1 deletion src/BiliLite.UWP/Pages/DownloadPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
xmlns:viewModel="using:BiliLite.ViewModels.Download"
Background="Transparent">
<Page.Resources>
<SolidColorBrush x:Key="PivotHeaderBackground" Color="{ThemeResource TopPaneBackground}"></SolidColorBrush>
<SolidColorBrush x:Key="PivotHeaderBackground" Color="Transparent"></SolidColorBrush>
<SolidColorBrush x:Key="SystemControlHighlightAltAccentBrush" Color="White"></SolidColorBrush>
<convert:ByteSizeConvert x:Key="byteSizeConvert"/>
<convert:DownloadStatusConvert x:Key="downloadStatusConvert"/>
Expand Down
Loading

0 comments on commit 813fcac

Please sign in to comment.