diff --git a/.github/workflows/release-builder.yml b/.github/workflows/release-builder.yml index 10ae69327..cb55af088 100644 --- a/.github/workflows/release-builder.yml +++ b/.github/workflows/release-builder.yml @@ -45,12 +45,6 @@ jobs: $manifest.Package.Identity.Version = "${{github.event.inputs.version}}" $manifest.save(".\$env:UWP_Project_Directory\Package.appxmanifest") - - name: Build x86 - run: msbuild $env:Solution_Path /p:Platform=x86 /p:AppxBundlePlatforms="x86" /p:AppxPackageDir=C:\Package\x86 /p:PackageCertificateKeyFile=$env:SigningCertificate /restore - env: - BuildMode: SideloadOnly - Configuration: Release - - name: Build x64 run: msbuild $env:Solution_Path /p:Platform=x64 /p:AppxBundlePlatforms="x64" /p:AppxPackageDir=C:\Package\x64 /p:PackageCertificateKeyFile=$env:SigningCertificate /restore env: @@ -62,26 +56,12 @@ jobs: env: BuildMode: SideloadOnly Configuration: Release - - - name: Create x86 archive - run: Compress-Archive -Path C:\Package\x86\App_${{github.event.inputs.version}}_Test -DestinationPath C:\Package\Bili.Uwp_${{github.event.inputs.version}}_x86.zip - name: Create x64 archive run: Compress-Archive -Path C:\Package\x64\App_${{github.event.inputs.version}}_Test -DestinationPath C:\Package\Bili.Uwp_${{github.event.inputs.version}}_x64.zip - name: Create ARM64 archive run: Compress-Archive -Path C:\Package\ARM64\App_${{github.event.inputs.version}}_Test -DestinationPath C:\Package\Bili.Uwp_${{github.event.inputs.version}}_ARM64.zip - - - name: Update x86 release asset - id: upload-release-asset-x86 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.release-drafter.outputs.upload_url }} - asset_path: C:\Package\Bili.Uwp_${{github.event.inputs.version}}_x86.zip - asset_name: Bili.Uwp_${{github.event.inputs.version}}_x86.zip - asset_content_type: application/zip - name: Update x64 release asset id: upload-release-asset-x64 diff --git a/src/App/App.csproj b/src/App/App.csproj index 06c16b768..7d5f73006 100644 --- a/src/App/App.csproj +++ b/src/App/App.csproj @@ -1154,6 +1154,9 @@ 0.9.4 + + 2.14.1 + 6.2.13 diff --git a/src/App/Controls/Common/ReplyItem.xaml.cs b/src/App/Controls/Common/ReplyItem.xaml.cs index 0d3220989..381356d63 100644 --- a/src/App/Controls/Common/ReplyItem.xaml.cs +++ b/src/App/Controls/Common/ReplyItem.xaml.cs @@ -2,6 +2,7 @@ using System; using Bilibili.Main.Community.Reply.V1; +using Humanizer; using Richasy.Bili.Locator.Uwp; using Richasy.Bili.Toolkit.Interfaces; using Richasy.Bili.ViewModels.Uwp; @@ -88,7 +89,7 @@ private static void OnDataChanged(DependencyObject d, DependencyPropertyChangedE instance.UserAvatar.Avatar = data.Member.Face; instance.LevelImage.Source = new BitmapImage(new Uri($"ms-appx:///Assets/Level/level_{data.Member.Level}.png")); var time = DateTimeOffset.FromUnixTimeSeconds(data.Ctime).ToLocalTime(); - instance.PublishTimeBlock.Text = time.ToString("HH:mm"); + instance.PublishTimeBlock.Text = time.Humanize(); ToolTipService.SetToolTip(instance.PublishTimeBlock, time.ToString("yyyy/MM/dd HH:mm:ss")); instance.LikeButton.IsChecked = data.ReplyControl.Action == 1; instance.LikeCountBlock.Text = ServiceLocator.Instance.GetService().GetCountText(data.Like); diff --git a/src/App/Controls/Common/VideoCard/VideoCard.xaml b/src/App/Controls/Common/VideoCard/VideoCard.xaml index 9b99b3102..8f827a74c 100644 --- a/src/App/Controls/Common/VideoCard/VideoCard.xaml +++ b/src/App/Controls/Common/VideoCard/VideoCard.xaml @@ -236,11 +236,18 @@ ToolTipService.ToolTip="{loc:LocaleLocator Name=ReplyCount}" Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsShowReplayCount, Converter={StaticResource BoolToVisibilityConverter}}" /> + diff --git a/src/App/Controls/Message/AtMessageItem.xaml.cs b/src/App/Controls/Message/AtMessageItem.xaml.cs index 30aaee8bc..7e314169e 100644 --- a/src/App/Controls/Message/AtMessageItem.xaml.cs +++ b/src/App/Controls/Message/AtMessageItem.xaml.cs @@ -1,6 +1,7 @@ // Copyright (c) Richasy. All rights reserved. using System; +using Humanizer; using Richasy.Bili.Locator.Uwp; using Richasy.Bili.Toolkit.Interfaces; using Windows.Foundation; @@ -57,7 +58,7 @@ private static void OnDataChanged(DependencyObject d, DependencyPropertyChangedE instance.DetailBlock.Text = data.Item.SourceContent; instance.TypeBlock.Text = string.Format(resourceToolkit.GetLocaleString(Models.Enums.LanguageNames.AtMessageTypeDescription), data.Item.Business); var dateTime = DateTimeOffset.FromUnixTimeSeconds(data.AtTime).ToLocalTime(); - instance.TimeBlock.Text = dateTime.ToString("HH:mm"); + instance.TimeBlock.Text = dateTime.Humanize(); ToolTipService.SetToolTip(instance.TimeBlock, dateTime.ToString("yyyy/MM/dd HH:mm")); instance.TitleBlock.Text = string.IsNullOrEmpty(data.Item.Title) ? resourceToolkit.GetLocaleString(Models.Enums.LanguageNames.NoSpecificData) : data.Item.Title; } diff --git a/src/App/Controls/Message/LikeMessageItem.xaml.cs b/src/App/Controls/Message/LikeMessageItem.xaml.cs index b1e33235a..2f802d821 100644 --- a/src/App/Controls/Message/LikeMessageItem.xaml.cs +++ b/src/App/Controls/Message/LikeMessageItem.xaml.cs @@ -2,6 +2,7 @@ using System; using System.Linq; +using Humanizer; using Richasy.Bili.Locator.Uwp; using Richasy.Bili.Toolkit.Interfaces; using Windows.Foundation; @@ -83,7 +84,7 @@ private static void OnDataChanged(DependencyObject d, DependencyPropertyChangedE instance.DetailBlock.Text = detail; var dateTime = DateTimeOffset.FromUnixTimeSeconds(data.LikeTime).ToLocalTime(); - instance.TimeBlock.Text = dateTime.ToString("HH:mm"); + instance.TimeBlock.Text = dateTime.Humanize(); ToolTipService.SetToolTip(instance.TimeBlock, dateTime.ToString("yyyy/MM/dd HH:mm")); instance.TitleBlock.Text = string.IsNullOrEmpty(data.Item.Title) ? data.Item.Description : data.Item.Title; } diff --git a/src/App/Controls/Message/ReplyMessageItem.xaml.cs b/src/App/Controls/Message/ReplyMessageItem.xaml.cs index 82dce148d..87d3cc418 100644 --- a/src/App/Controls/Message/ReplyMessageItem.xaml.cs +++ b/src/App/Controls/Message/ReplyMessageItem.xaml.cs @@ -1,6 +1,7 @@ // Copyright (c) Richasy. All rights reserved. using System; +using Humanizer; using Richasy.Bili.Locator.Uwp; using Richasy.Bili.Models.Enums.Bili; using Richasy.Bili.Toolkit.Interfaces; @@ -62,7 +63,7 @@ private static void OnDataChanged(DependencyObject d, DependencyPropertyChangedE data.Item.Business, data.Counts); var dateTime = DateTimeOffset.FromUnixTimeSeconds(data.ReplyTime).ToLocalTime(); - instance.TimeBlock.Text = dateTime.ToString("HH:mm"); + instance.TimeBlock.Text = dateTime.Humanize(); ToolTipService.SetToolTip(instance.TimeBlock, dateTime.ToString("yyyy/MM/dd HH:mm")); instance.TitleBlock.Text = string.IsNullOrEmpty(data.Item.Title) ? data.Item.Description : data.Item.Title; } diff --git a/src/App/Controls/User/UserView.xaml b/src/App/Controls/User/UserView.xaml index 2bbad544a..26f488b87 100644 --- a/src/App/Controls/User/UserView.xaml +++ b/src/App/Controls/User/UserView.xaml @@ -24,6 +24,7 @@ IsShowDanmakuCount="True" IsShowDuration="True" IsShowPlayCount="True" + IsShowPublishDateTime="True" ItemClick="OnVideoCardClick" Orientation="Horizontal" ViewModel="{x:Bind}" /> diff --git a/src/App/Resources/Strings/zh-CN/Resources.resw b/src/App/Resources/Strings/zh-CN/Resources.resw index 5c32cca82..3db35ee82 100644 --- a/src/App/Resources/Strings/zh-CN/Resources.resw +++ b/src/App/Resources/Strings/zh-CN/Resources.resw @@ -1067,6 +1067,9 @@ BV号以 BV 开头,是一串英文数字混合的编号, 如 BV1JL4y1875w 公共服务器 + + 发布时间 + 开发者的其它应用 diff --git a/src/Models/Models.Enums/App/LanguageNames.cs b/src/Models/Models.Enums/App/LanguageNames.cs index 99d5df94a..cafbf3667 100644 --- a/src/Models/Models.Enums/App/LanguageNames.cs +++ b/src/Models/Models.Enums/App/LanguageNames.cs @@ -504,6 +504,7 @@ public enum LanguageNames FixContent, UnfixContent, StartQuickPlay, + PublishDate, #pragma warning restore SA1602 // Enumeration items should be documented } } diff --git a/src/ViewModels/ViewModels.Uwp/Common/VideoViewModel/VideoViewModel.Properties.cs b/src/ViewModels/ViewModels.Uwp/Common/VideoViewModel/VideoViewModel.Properties.cs index ae271aaec..6f9354194 100644 --- a/src/ViewModels/ViewModels.Uwp/Common/VideoViewModel/VideoViewModel.Properties.cs +++ b/src/ViewModels/ViewModels.Uwp/Common/VideoViewModel/VideoViewModel.Properties.cs @@ -67,6 +67,12 @@ public partial class VideoViewModel [Reactive] public string ViewerCount { get; set; } + /// + /// 发布时间. + /// + [Reactive] + public string PublishDate { get; set; } + /// /// 发布者. /// diff --git a/src/ViewModels/ViewModels.Uwp/Common/VideoViewModel/VideoViewModel.cs b/src/ViewModels/ViewModels.Uwp/Common/VideoViewModel/VideoViewModel.cs index eec97cc87..50c211298 100644 --- a/src/ViewModels/ViewModels.Uwp/Common/VideoViewModel/VideoViewModel.cs +++ b/src/ViewModels/ViewModels.Uwp/Common/VideoViewModel/VideoViewModel.cs @@ -8,6 +8,7 @@ using Bilibili.App.Interfaces.V1; using Bilibili.App.Show.V1; using Bilibili.App.View.V1; +using Humanizer; using Richasy.Bili.Locator.Uwp; using Richasy.Bili.Models.App.Constants; using Richasy.Bili.Models.BiliBili; @@ -278,6 +279,7 @@ public VideoViewModel(UserSpaceVideoItem item) DanmakuCount = _numberToolkit.GetCountText(item.DanmakuCount); Publisher = new UserViewModel(item.PublisherName); Duration = _numberToolkit.GetDurationText(TimeSpan.FromSeconds(item.Duration)); + PublishDate = DateTimeOffset.FromUnixTimeSeconds(item.CreateTime).ToLocalTime().Humanize(); LimitCover(item.Cover); Source = item; } diff --git a/src/ViewModels/ViewModels.Uwp/ViewModels.Uwp.csproj b/src/ViewModels/ViewModels.Uwp/ViewModels.Uwp.csproj index 8d5280266..d05f5e3dd 100644 --- a/src/ViewModels/ViewModels.Uwp/ViewModels.Uwp.csproj +++ b/src/ViewModels/ViewModels.Uwp/ViewModels.Uwp.csproj @@ -147,6 +147,9 @@ 0.9.4 + + 2.14.1 + 6.0.0