Skip to content

Commit

Permalink
Merge pull request #561 from ywmoyue/dev
Browse files Browse the repository at this point in the history
4.6.29
  • Loading branch information
ywmoyue authored Apr 9, 2024
2 parents 9231e1e + a7746d8 commit 148ea82
Show file tree
Hide file tree
Showing 63 changed files with 3,081 additions and 636 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ jobs:
run: cp C:\Package\安装教程.pdf ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_x64_Test\安装教程.pdf
if: github.event.inputs.enableX64 == 'true'

- name: Remove x64 useless files
run: |
cd ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_x64_Test
rm -r -fo *.appxsym
cd Dependencies
rm -r -fo arm,arm64,x86
if: github.event.inputs.enableX64 == 'true'

- name: Create x64 archive
run: Compress-Archive -Path ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_x64_Test -DestinationPath C:\Package\${{env.AppName}}_${{github.event.inputs.version}}_x64.zip
if: github.event.inputs.enableX64 == 'true'
Expand Down Expand Up @@ -143,6 +151,14 @@ jobs:
run: cp C:\Package\安装教程.pdf ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_x86_Test\安装教程.pdf
if: github.event.inputs.enableX86 == 'true'

- name: Remove x86 useless files
run: |
cd ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_x86_Test
rm -r -fo *.appxsym
cd Dependencies
rm -r -fo arm,arm64,x64
if: github.event.inputs.enableX86 == 'true'

- name: Create x86 archive
run: Compress-Archive -Path ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_x86_Test -DestinationPath C:\Package\${{env.AppName}}_${{github.event.inputs.version}}_x86.zip
if: github.event.inputs.enableX86 == 'true'
Expand Down Expand Up @@ -170,6 +186,14 @@ jobs:
run: cp C:\Package\安装教程.pdf ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_ARM64_Test\安装教程.pdf
if: github.event.inputs.enableArm64 == 'true'

- name: Remove arm64 useless files
run: |
cd ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_ARM64_Test
rm -r -fo *.appxsym
cd Dependencies
rm -r -fo arm,x64,x86
if: github.event.inputs.enableArm64 == 'true'

- name: Create ARM64 archive
run: Compress-Archive -Path ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_ARM64_Test -DestinationPath C:\Package\${{env.AppName}}_${{github.event.inputs.version}}_ARM64.zip
if: github.event.inputs.enableArm64 == 'true'
Expand Down Expand Up @@ -197,6 +221,14 @@ jobs:
run: cp C:\Package\安装教程.pdf ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_ARM_Test\安装教程.pdf
if: github.event.inputs.enableArm32 == 'true'

- name: Remove arm32 useless files
run: |
cd ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_ARM_Test
rm -r -fo *.appxsym
cd Dependencies
rm -r -fo arm64,x64,x86
if: github.event.inputs.enableArm32 == 'true'

- name: Create ARM32 archive
run: Compress-Archive -Path ${{env.UWP_Project_Directory}}\AppPackages\${{env.AppName}}_${{github.event.inputs.version}}_ARM_Test -DestinationPath C:\Package\${{env.AppName}}_${{github.event.inputs.version}}_ARM.zip
if: github.event.inputs.enableArm32 == 'true'
Expand Down
2 changes: 1 addition & 1 deletion src/BiliLite.Packages/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<uap:ShowOn Tile="wide310x150Logo"/>
</uap:ShowNameOnTiles>
</uap:DefaultTile >
<uap:SplashScreen Image="Images\SplashScreen.png" BackgroundColor="#E6E6E6" uap5:Optional="true"/>
<uap:SplashScreen Image="Images\SplashScreen.png" BackgroundColor="transparent" uap5:Optional="true"/>
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.protocol" EntryPoint="BiliLite.App">
Expand Down
24 changes: 20 additions & 4 deletions src/BiliLite.UWP/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,16 @@ private void SynchronizationContext_UnhandledException(object sender, AysncUnhan
e.Handled = true;
try
{
logger.Log("程序运行出现错误", LogType.Error, e.Exception);
Notify.ShowMessageToast("程序出现一个错误,已记录");
if (e.Exception is NotImplementedException)
{
logger.Log("功能未实现", LogType.Error, e.Exception);
Notify.ShowMessageToast("功能未实现");
}
else
{
logger.Log("程序运行出现错误", LogType.Error, e.Exception);
Notify.ShowMessageToast("程序出现一个错误,已记录");
}
}
catch (Exception)
{
Expand All @@ -73,8 +81,16 @@ private void App_UnhandledException(object sender, Windows.UI.Xaml.UnhandledExce
e.Handled = true;
try
{
logger.Log("程序运行出现错误", LogType.Error, e.Exception);
Notify.ShowMessageToast("程序出现一个错误,已记录");
if (e.Exception is NotImplementedException)
{
logger.Log("功能未实现", LogType.Error, e.Exception);
Notify.ShowMessageToast("功能未实现");
}
else
{
logger.Log("程序运行出现错误", LogType.Error, e.Exception);
Notify.ShowMessageToast("程序出现一个错误,已记录");
}
}
catch (Exception)
{
Expand Down
47 changes: 43 additions & 4 deletions src/BiliLite.UWP/BiliLite.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,29 @@
<Compile Include="Controls\AttentionButton.xaml.cs">
<DependentUpon>AttentionButton.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\DataTemplateSelectors\UserDynamicItemV2DataTemplateSelector.cs" />
<Compile Include="Controls\Dynamic\DynamicItemV2Control.xaml.cs">
<DependentUpon>DynamicItemV2Control.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\UserFollowingTagsFlyout.xaml.cs">
<DependentUpon>UserFollowingTagsFlyout.xaml</DependentUpon>
</Compile>
<Compile Include="Dialogs\SendDynamicV2Dialog.xaml.cs">
<DependentUpon>SendDynamicV2Dialog.xaml</DependentUpon>
</Compile>
<Compile Include="Extensions\ControlsExtensions.cs" />
<Compile Include="Extensions\QrCodeExtensions.cs" />
<Compile Include="Models\Common\Anime\ISeasonItem.cs" />
<Compile Include="Models\Common\Comment\HotReply.cs" />
<Compile Include="Models\Common\Danmaku\BiliDanmakuItem.cs" />
<Compile Include="Models\Common\Dynamic\DynamicUgcSeasonCardModel.cs" />
<Compile Include="Models\Common\UserDynamic\DynLiveInfo.cs" />
<Compile Include="Models\Common\User\SendDynamic\AtDisplayModel.cs" />
<Compile Include="Models\Common\User\SendDynamic\AtModel.cs" />
<Compile Include="Models\Common\User\SendDynamic\SendImagesModel.cs" />
<Compile Include="Models\Common\User\SendDynamic\UploadImagesModel.cs" />
<Compile Include="Models\Common\User\SendDynamic\RcmdTopicModel.cs" />
<Compile Include="ViewModels\UserDynamic\DynamicV2ItemViewModel.cs" />
<Compile Include="Models\Common\Home\DefaultHomeNavItems.cs" />
<Compile Include="Models\Common\Live\DefaultPlayUrlSourceOptions.cs" />
<Compile Include="Models\Common\Live\InteractWordModel.cs" />
Expand Down Expand Up @@ -194,6 +210,12 @@
<Compile Include="Models\Common\Live\RoomChangeMsgModel.cs" />
<Compile Include="Models\Common\User\SearchHistoryData.cs" />
<Compile Include="Models\Common\User\SubmitCollectionItemModel.cs" />
<Compile Include="Pages\User\DynamicSpacePage.xaml.cs">
<DependentUpon>DynamicSpacePage.xaml</DependentUpon>
</Compile>
<Compile Include="ViewModels\UserDynamic\UserDynamicSpaceViewModel.cs" />
<Compile Include="Models\Common\User\SendDynamic\AtUserModel.cs" />
<Compile Include="ViewModels\User\SendDynamic\SendDynamicV2ViewModel.cs" />
<Compile Include="ViewModels\User\UserAttentionButtonViewModel.cs" />
<Compile Include="ViewModels\User\UserFollowingTagsFlyoutViewModel.cs" />
<Compile Include="ViewModels\User\UserRelationFollowingTagViewModel.cs" />
Expand Down Expand Up @@ -602,7 +624,7 @@
<Compile Include="Models\ReturnModel.cs" />
<Compile Include="Models\UserModels.cs" />
<Compile Include="Modules\Detail\FavoriteDetailVM.cs" />
<Compile Include="Modules\EmoteVM.cs" />
<Compile Include="ViewModels\EmoteViewModel.cs" />
<Compile Include="Modules\Home\RegionVM.cs" />
<Compile Include="Modules\Live\LiveAreaDetailVM.cs" />
<Compile Include="Modules\Live\LiveAreaVM.cs" />
Expand Down Expand Up @@ -634,7 +656,7 @@
<Compile Include="ViewModels\UserDynamic\UserDynamicRepostViewModel.cs" />
<Compile Include="ViewModels\UserDynamic\UserDynamicViewModel.cs" />
<Compile Include="Modules\User\LoginVM.cs" />
<Compile Include="Modules\User\SendDynamic\AtVM.cs" />
<Compile Include="ViewModels\User\SendDynamic\AtViewModel.cs" />
<Compile Include="ViewModels\User\HistoryViewModel.cs" />
<Compile Include="Modules\User\MyFollowSeasonVM.cs" />
<Compile Include="Modules\Player\PlayerVM.cs" />
Expand All @@ -646,8 +668,8 @@
<Compile Include="Modules\SettingVM.cs" />
<Compile Include="ViewModels\Video\VideoDetailPageViewModel.cs" />
<Compile Include="Modules\User\MyFollowVideoVM.cs" />
<Compile Include="Modules\User\SendDynamic\SendDynamicVM.cs" />
<Compile Include="Modules\User\SendDynamic\TopicVM.cs" />
<Compile Include="ViewModels\User\SendDynamic\SendDynamicViewModel.cs" />
<Compile Include="ViewModels\User\SendDynamic\TopicViewModel.cs" />
<Compile Include="ViewModels\User\UserDetailViewModel.cs" />
<Compile Include="Modules\User\UserDetail\UserFavlistVM.cs" />
<Compile Include="Modules\User\UserDetail\UserFollowVM.cs" />
Expand Down Expand Up @@ -928,10 +950,26 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\Dynamic\DynamicItemV2Control.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\Dynamic\DynamicV2Template.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\UserFollowingTagsFlyout.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Dialogs\SendDynamicV2Dialog.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Pages\User\DynamicSpacePage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\AppBarButtonNoChevronStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -1311,6 +1349,7 @@
<ItemGroup>
<Folder Include="Assets\Tools\" />
<Folder Include="Models\Requests\Api\Grpc\" />
<Folder Include="Modules\User\SendDynamic\" />
</ItemGroup>
<ItemGroup>
<SDKReference Include="WindowsDesktop, Version=10.0.17763.0">
Expand Down
48 changes: 43 additions & 5 deletions src/BiliLite.UWP/Controls/CommentControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
xmlns:convert="using:BiliLite.Converters" xmlns:modules="using:BiliLite.Modules"
xmlns:comment="using:BiliLite.ViewModels.Comment"
xmlns:common="using:BiliLite.Models.Common"
xmlns:viewModels="using:BiliLite.ViewModels"
d:DesignHeight="300"
d:DesignWidth="400"
x:Name="CommentControlContent"
Expand All @@ -30,13 +31,20 @@
<Setter Property="BorderBrush" Value="#33808080"></Setter>
<Setter Property="Padding" Value="0"></Setter>
</Style>

<Style TargetType="ListViewItem" x:Key="hotReplyStyle">
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
<Setter Property="BorderThickness" Value="0 1 0 1"></Setter>
<Setter Property="BorderBrush" Value="#33808080"></Setter>
<Setter Property="Padding" Value="0"></Setter>
</Style>
<convert:ColorSelecteConvert x:Key="colorSelct" ></convert:ColorSelecteConvert>
<convert:ColorConvert x:Key="colorConvert" ></convert:ColorConvert>
<Flyout x:Key="FaceFlyout" x:Name="FaceFlyout">
<Grid Width="320">
<Pivot x:Name="PivotFace" ItemsSource="{x:Bind Path=emoteVM.Packages,Mode=OneWay}">
<Pivot.HeaderTemplate>
<DataTemplate x:DataType="modules:EmotePackageModel">
<DataTemplate x:DataType="viewModels:EmotePackageModel">
<TextBlock FontSize="18" Text="{x:Bind text}"></TextBlock>
</DataTemplate>
</Pivot.HeaderTemplate>
Expand Down Expand Up @@ -185,11 +193,18 @@
<Run Text="{x:Bind Path=ReplyControl.Location}"></Run>
</TextBlock>

<StackPanel Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="2" Visibility="{Binding ElementName=CommentControlContent,Path=DataContext.IsNarrowMode,Mode=OneWay,Converter={StaticResource BoolToVisibilityConverter}}">
<StackPanel Grid.Column="0"
Grid.ColumnSpan="3"
Grid.Row="2"
Margin="8 0 0 0"
Visibility="{Binding ElementName=CommentControlContent,Path=DataContext.IsNarrowMode,Mode=OneWay,Converter={StaticResource BoolToVisibilityConverter}}">
<ContentPresenter Content="{x:Bind Mode=OneWay}" ContentTemplate="{StaticResource CommentContentTemplate}"></ContentPresenter>
</StackPanel>

<StackPanel Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2" Visibility="{Binding ElementName=CommentControlContent,Path=DataContext.IsWideMode,Mode=OneWay,Converter={StaticResource BoolToVisibilityConverter}}">
<StackPanel Grid.Column="1"
Grid.ColumnSpan="2"
Grid.Row="2"
Visibility="{Binding ElementName=CommentControlContent,Path=DataContext.IsWideMode,Mode=OneWay,Converter={StaticResource BoolToVisibilityConverter}}">
<ContentPresenter Content="{x:Bind Mode=OneWay}" ContentTemplate="{StaticResource CommentContentTemplate}"></ContentPresenter>
</StackPanel>
</Grid>
Expand All @@ -204,6 +219,7 @@
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>

<ContentControl Grid.Row="0" Margin="4 0" Content="{Binding Path=CommentText,Mode=OneWay}" Visibility="Visible">
Expand Down Expand Up @@ -268,8 +284,6 @@
<TextBlock FontSize="10" Margin="8 8" Foreground="Gray">UP主觉得很赞</TextBlock>
</Border>
</StackPanel>


</Grid>

<StackPanel Grid.Row="4" Margin="0 4" Background="#19AAAAAA" Padding="8" Visibility="{x:Bind Path=ShowReplies,Mode=OneWay}">
Expand Down Expand Up @@ -388,6 +402,30 @@
</StackPanel>

</StackPanel>

<ListView
Grid.Row="6"
Visibility="{x:Bind ShowHotReplies,Mode=OneWay}"
ItemsSource="{x:Bind HotReplies,Mode=OneWay}"
ItemContainerStyle="{StaticResource hotReplyStyle}"
Background="{ThemeResource CardColor}"
Margin="0 0 8 0"
SelectionMode="None"
IsItemClickEnabled="False"
ScrollViewer.VerticalScrollMode="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Hidden">
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<ContentControl
Margin="4 0"
FontSize="12" Content="{Binding Path=Content,Mode=OneWay}" Visibility="Visible">
</ContentControl>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>

</Grid>
</DataTemplate>
</UserControl.Resources>
Expand Down
6 changes: 4 additions & 2 deletions src/BiliLite.UWP/Controls/CommentControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using BiliLite.Models.Exceptions;
using BiliLite.Models.Requests.Api;
using BiliLite.Services;
using BiliLite.ViewModels;
using BiliLite.ViewModels.Comment;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Toolkit.Uwp.UI.Controls;
Expand All @@ -30,7 +31,7 @@ public sealed partial class CommentControl : UserControl
#region Fields

private readonly CommentApi m_commentApi;
EmoteVM emoteVM;
EmoteViewModel emoteVM;
private bool m_disableShowPicture = false;
private static readonly ILogger _logger = GlobalLogger.FromCurrentType();
private CommentCursor m_nextCursor;
Expand All @@ -50,10 +51,10 @@ public CommentControl()
{
m_mapper = App.ServiceProvider.GetService<IMapper>();
m_viewModel = App.ServiceProvider.GetService<CommentControlViewModel>();
emoteVM = App.ServiceProvider.GetService<EmoteViewModel>();
DataContext = m_viewModel;
this.InitializeComponent();
m_commentApi = new CommentApi();
emoteVM = new EmoteVM();
Unloaded += CommentControl_Unloaded;
}

Expand Down Expand Up @@ -104,6 +105,7 @@ private async Task GetComment()
result = await m_commentApi.CommentV2(m_loadCommentInfo.Oid, m_loadCommentInfo.CommentSort, m_page,
m_loadCommentInfo.CommentMode, offsetStr: m_nextCursor?.PaginationReply?.NextOffset).Request();
}

if (!result.status)
{
throw new CustomizedErrorException("加载评论失败");
Expand Down
Loading

0 comments on commit 148ea82

Please sign in to comment.