返回提交历史
Modified
HaloPixelToolBox/HaloPixelToolBox/Profiles/CrossVersionProfiles/SystemProfile.cs
+6
-1
Modified
HaloPixelToolBox/HaloPixelToolBox/Utilities/SpotifyLyricsReader.cs
+623
-77
Modified
HaloPixelToolBox/HaloPixelToolBox/ViewModels/SettingPageViewModel.cs
+5
-1
Modified
HaloPixelToolBox/HaloPixelToolBox/Views/AppShellPage.xaml.cs
+8
-1
Modified
HaloPixelToolBox/HaloPixelToolBox/Views/SettingPage.xaml
+9
-0
XFEstudio/HaloPixelToolBox
spotify update
- fixed track detection delay - add lyric cache locally - add spotify to be load by default in settings
3a79ef1
代码差异
5 个文件
+651
-80
@@ -1,4 +1,4 @@
1
using XFEExtension.NetCore.AutoConfig;
1
using XFEExtension.NetCore.AutoConfig;
2
2
using XFEExtension.NetCore.WinUIHelper.Utilities.Helper;
3
3
4
4
namespace HaloPixelToolBox.Profiles.CrossVersionProfiles;
@@ -37,6 +37,11 @@ public partial class SystemProfile : XFEProfile
37
37
/// </summary>
38
38
[ProfileProperty]
39
39
private string ignoreVersion = string.Empty;
40
/// <summary>
41
/// 默认启动页面
42
/// </summary>
43
[ProfileProperty]
44
private string defaultPage = "CloudMusicLyricsToolPage";
40
45
41
46
static partial void SetThemeProperty(ref ElementTheme value) => AppThemeHelper.ChangeTheme(value);
42
47
}
@@ -1,4 +1,4 @@
1
using CommunityToolkit.Mvvm.ComponentModel;
1
using CommunityToolkit.Mvvm.ComponentModel;
2
2
using CommunityToolkit.Mvvm.Input;
3
3
using HaloPixelToolBox.Core.Utilities.Helpers;
4
4
using HaloPixelToolBox.Interface.Services;
@@ -19,6 +19,8 @@ public partial class SettingPageViewModel : ViewModelBase
19
19
[ObservableProperty]
20
20
private int closeButtonActionIndex = SystemProfile.MinimizeWhenClose ? 0 : 1;
21
21
[ObservableProperty]
22
private int defaultTabPageIndex = SystemProfile.DefaultPage == "SpotifyLyricsToolPage" ? 1 : 0;
23
[ObservableProperty]
22
24
bool isAutoStartEnable = SystemProfile.AutoStart;
23
25
[ObservableProperty]
24
26
private bool minimizeWhenOpen = SystemProfile.MinimizeWhenOpen;
@@ -43,6 +45,8 @@ public partial class SettingPageViewModel : ViewModelBase
43
45
44
46
partial void OnCloseButtonActionIndexChanged(int value) => SystemProfile.MinimizeWhenClose = value == 0;
45
47
48
partial void OnDefaultTabPageIndexChanged(int value) => SystemProfile.DefaultPage = value == 1 ? "SpotifyLyricsToolPage" : "CloudMusicLyricsToolPage";
49
46
50
partial void OnIsAutoStartEnableChanged(bool value)
47
51
{
48
52
SystemProfile.AutoStart = value;
@@ -21,7 +21,14 @@ namespace HaloPixelToolBox.Views
21
21
ViewModel.DialogService.RegisterDialog(closeDialog);
22
22
ViewModel.PageService.Initialize(this);
23
23
ViewModel.LoadingService.Initialize(loadingGrid, globalLoadingGrid, globalLoadingTextBlock, DispatcherQueue, ViewModel.NavigationViewService.NavigationService);
24
ViewModel.NavigationViewService.NavigateTo<CloudMusicLyricsToolPage>();
24
if (SystemProfile.DefaultPage == "SpotifyLyricsToolPage")
25
{
26
ViewModel.NavigationViewService.NavigateTo<SpotifyLyricsToolPage>();
27
}
28
else
29
{
30
ViewModel.NavigationViewService.NavigateTo<CloudMusicLyricsToolPage>();
31
}
25
32
}
26
33
27
34
private void NavigationView_DisplayModeChanged(NavigationView sender, NavigationViewDisplayModeChangedEventArgs args)
@@ -35,6 +35,15 @@
35
35
<ComboBoxItem Content="跟随系统" Tag="Default"/>
36
36
</ComboBox>
37
37
</controls:SettingsCard>
38
<controls:SettingsCard Header="默认启动页面" Description="软件启动时默认显示的歌词源页面">
39
<controls:SettingsCard.HeaderIcon>
40
<FontIcon Glyph=""/>
41
</controls:SettingsCard.HeaderIcon>
42
<ComboBox SelectedIndex="{x:Bind ViewModel.DefaultTabPageIndex, Mode=TwoWay}">
43
<ComboBoxItem Content="网易云歌词"/>
44
<ComboBoxItem Content="Spotify歌词"/>
45
</ComboBox>
46
</controls:SettingsCard>
38
47
<TextBlock Text="通用" Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"/>
39
48
<controls:SettingsCard Header="自启动" Description="开机之后自动启动应用">
40
49
<controls:SettingsCard.HeaderIcon>