From 020f258c5604975d56a1323f7d715ca88967a0cb Mon Sep 17 00:00:00 2001 From: xjg Date: Sun, 5 Feb 2023 04:20:06 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E8=AF=8D=E6=8E=A5=E5=8F=A3=E5=92=8C=E8=B0=83=E7=94=A8=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BiliLite.UWP/Api/PlayerAPI.cs | 8 ++++---- src/BiliLite.UWP/Modules/SettingVM.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/BiliLite.UWP/Api/PlayerAPI.cs b/src/BiliLite.UWP/Api/PlayerAPI.cs index d0ff1256..cce38c26 100644 --- a/src/BiliLite.UWP/Api/PlayerAPI.cs +++ b/src/BiliLite.UWP/Api/PlayerAPI.cs @@ -203,9 +203,9 @@ public ApiModel GetDanmuFilterWords() { method = RestSharp.Method.Get, baseUrl = $"{ApiHelper.API_BASE_URL}/x/dm/filter/user", - parameter = ApiHelper.MustParameter(ApiHelper.AndroidVideoKey, true) + parameter = ApiHelper.MustParameter(ApiHelper.AndroidKey, true) }; - api.parameter += ApiHelper.GetSign(api.parameter, ApiHelper.AndroidVideoKey); + api.parameter += ApiHelper.GetSign(api.parameter, ApiHelper.AndroidKey); return api; } @@ -221,9 +221,9 @@ public ApiModel AddDanmuFilterWord(string word,int type) { method = RestSharp.Method.Post, baseUrl = $"{ApiHelper.API_BASE_URL}/x/dm/filter/user/add", - body = ApiHelper.MustParameter(ApiHelper.AndroidVideoKey, true)+ $"&filter={Uri.EscapeDataString(word)}&type={type}" + body = ApiHelper.MustParameter(ApiHelper.AndroidKey, true)+ $"&filter={Uri.EscapeDataString(word)}&type={type}" }; - api.body += ApiHelper.GetSign(api.parameter, ApiHelper.AndroidVideoKey); + api.body += ApiHelper.GetSign(api.body, ApiHelper.AndroidKey); return api; } diff --git a/src/BiliLite.UWP/Modules/SettingVM.cs b/src/BiliLite.UWP/Modules/SettingVM.cs index 3e5d7cbc..5eb16b45 100644 --- a/src/BiliLite.UWP/Modules/SettingVM.cs +++ b/src/BiliLite.UWP/Modules/SettingVM.cs @@ -159,7 +159,7 @@ public async Task AddDanmuFilterItem(string word, int type) { try { - var result = await playerAPI.GetDanmuFilterWords().Request(); + var result = await playerAPI.AddDanmuFilterWord(word:word,type:type).Request(); if (!result.status) { return false; From 3cdd9404958fa33041417bbdc8ae5f432545b7f0 Mon Sep 17 00:00:00 2001 From: "ywmoyue@163.com" Date: Sun, 5 Feb 2023 11:48:38 +0800 Subject: [PATCH 2/7] =?UTF-8?q?add:=20=E6=94=AF=E6=8C=81=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=8F=B3=E4=BE=A7=E5=AE=BD=E5=BA=A6=E5=8F=AF?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BiliLite.UWP/Helpers/SettingHelper.cs | 5 +++ src/BiliLite.UWP/Pages/SettingPage.xaml | 10 ++++-- src/BiliLite.UWP/Pages/SettingPage.xaml.cs | 12 ++++++- src/BiliLite.UWP/Pages/VideoDetailPage.xaml | 31 +++++++++++++++---- .../Pages/VideoDetailPage.xaml.cs | 2 +- 5 files changed, 50 insertions(+), 10 deletions(-) diff --git a/src/BiliLite.UWP/Helpers/SettingHelper.cs b/src/BiliLite.UWP/Helpers/SettingHelper.cs index 7e49f99c..65c915a2 100644 --- a/src/BiliLite.UWP/Helpers/SettingHelper.cs +++ b/src/BiliLite.UWP/Helpers/SettingHelper.cs @@ -75,6 +75,11 @@ public static bool LoadOriginalImage /// public const string RIGHT_DETAIL_WIDTH = "PlayerRightDetailWidth"; + /// + /// 右侧详情宽度可调整 + /// + public const string RIGHT_WIDTH_CHANGEABLE = "PlayerRightDetailWidthChangeable"; + /// /// 图片圆角半径 /// diff --git a/src/BiliLite.UWP/Pages/SettingPage.xaml b/src/BiliLite.UWP/Pages/SettingPage.xaml index f3e7feb2..cbd8f477 100644 --- a/src/BiliLite.UWP/Pages/SettingPage.xaml +++ b/src/BiliLite.UWP/Pages/SettingPage.xaml @@ -143,8 +143,14 @@ - 右侧视频详情宽度(下次打开视频生效) - + + + 右侧视频详情 + 右侧视频详情宽度(下次打开视频生效) + + + + 图片圆角半径(重启生效) diff --git a/src/BiliLite.UWP/Pages/SettingPage.xaml.cs b/src/BiliLite.UWP/Pages/SettingPage.xaml.cs index b5cd5bd0..e5ef7400 100644 --- a/src/BiliLite.UWP/Pages/SettingPage.xaml.cs +++ b/src/BiliLite.UWP/Pages/SettingPage.xaml.cs @@ -141,12 +141,22 @@ private void LoadUI() numRightWidth.Value = SettingHelper.GetValue(SettingHelper.UI.RIGHT_DETAIL_WIDTH, 320); numRightWidth.Loaded += new RoutedEventHandler((sender, e) => { - numRightWidth.ValueChanged += new TypedEventHandler((obj, args) => { SettingHelper.SetValue(SettingHelper.UI.RIGHT_DETAIL_WIDTH, args.NewValue); }); }); + + //右侧详情宽度可调整 + swRightWidthChangeable.IsOn = SettingHelper.GetValue(SettingHelper.UI.RIGHT_WIDTH_CHANGEABLE, false); + swRightWidthChangeable.Loaded += new RoutedEventHandler((sender, e) => + { + swRightWidthChangeable.Toggled += new RoutedEventHandler((obj, args) => + { + SettingHelper.SetValue(SettingHelper.UI.RIGHT_WIDTH_CHANGEABLE, swRightWidthChangeable.IsOn); + }); + }); + //图片圆角半径 numImageCornerRadius.Value = SettingHelper.GetValue(SettingHelper.UI.IMAGE_CORNER_RADIUS, 0); ImageCornerRadiusExample.CornerRadius = new CornerRadius(numImageCornerRadius.Value); diff --git a/src/BiliLite.UWP/Pages/VideoDetailPage.xaml b/src/BiliLite.UWP/Pages/VideoDetailPage.xaml index 4fab8400..90a731e1 100644 --- a/src/BiliLite.UWP/Pages/VideoDetailPage.xaml +++ b/src/BiliLite.UWP/Pages/VideoDetailPage.xaml @@ -11,6 +11,7 @@ xmlns:convert="using:BiliLite.Converters" xmlns:modules="using:BiliLite.Modules" xmlns:control="using:BiliLite.Controls" + xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> @@ -219,7 +220,7 @@ - +