Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Feature] 1.81.x Features #544

Merged
merged 44 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8101e3c
Initial Game Clean-up implementation
neon-nyan Jul 20, 2024
c25f807
FIx missing loading localization
neon-nyan Jul 20, 2024
8002786
Make sure pkg_version availability before running scan
neon-nyan Jul 20, 2024
184f51a
Do more pkg_version check on cleanup init
neon-nyan Jul 20, 2024
3768443
Fix update conflict on metadata and app updates
neon-nyan Jul 21, 2024
0599176
Add `Move to Recycle Bin` function for game cleanup
bagusnl Jul 22, 2024
ec876b5
Add finer control for Sophon download mode
bagusnl Jul 22, 2024
f94ab01
Merge branch 'main' into 1.81-features
bagusnl Jul 23, 2024
2a6a641
[Feat] Add advanced option to ignore certain files from cleanup
bagusnl Jul 26, 2024
e9fa4b6
[skip ci] Sync translation Translate en_US.json in zh_CN
transifex-integration[bot] Jul 23, 2024
26d0af8
[skip ci] Sync translation Translate en_US.json in id_ID
transifex-integration[bot] Jul 23, 2024
5e76171
Raise MainPage's Subscriber Events at Top
neon-nyan Jul 26, 2024
575e12d
FE & BE Adjustments for Sophon
neon-nyan Jul 27, 2024
6b2d4ce
Fix aliased shadow under install progress ring
neon-nyan Jul 27, 2024
bb53687
Fix invisible border while button is disabled
neon-nyan Jul 27, 2024
1cb4884
Fix wrong values clamp
neon-nyan Jul 27, 2024
3d73d35
[Feat] Add "hide playtime" feature
bagusnl Jul 27, 2024
bbceba8
Adjust UI Layouts
neon-nyan Jul 28, 2024
600e89f
[skip ci] Sync translation Translate en_US.json in id_ID [Manual Sync]
transifex-integration[bot] Jul 28, 2024
296b271
Update Hi3Helper.Sophon
neon-nyan Jul 28, 2024
71697d0
Fix Margin for Sophon Toggle Info Header
neon-nyan Jul 28, 2024
4c2e11c
Add sophon help button on Install progress
neon-nyan Jul 28, 2024
b7b0b25
Replace GameId and LauncherId in PresetConfig's URLs if possible
neon-nyan Jul 28, 2024
f81b037
Add gameId, launcherId, packageId and password field re-association f…
neon-nyan Jul 28, 2024
45e5fa0
Fix IsEnableSophon toggle not working
neon-nyan Jul 28, 2024
86d5629
Bump version
neon-nyan Jul 28, 2024
779cb82
Fix crash if clean-up routine is performed after installation
neon-nyan Jul 28, 2024
65c3257
Fix Http's Chunks not being detected on clean-up
neon-nyan Jul 28, 2024
6a0815a
Fix thread getting stuck on deletion to recycle bin
neon-nyan Jul 28, 2024
f1efff3
Check for file existance if _isSophonPreloadCompleted being set
neon-nyan Jul 28, 2024
7deedbb
Fix intermiten failure while parsing on HexStringToBytesConverter
neon-nyan Jul 28, 2024
3bc986a
Allow deletion of Sophon chunk files on Files Clean-up
neon-nyan Jul 28, 2024
d219485
Disable clean-up feature on update
neon-nyan Jul 28, 2024
d7e0c2a
Fix disposal issue on corrupted old reference file
neon-nyan Jul 28, 2024
309b40e
Enable Http Override for Cache Update
neon-nyan Jul 28, 2024
ee27eba
Minor UI Improvements
neon-nyan Jul 28, 2024
20bf0f1
Merge branch 'main' into 1.81-features
bagusnl Jul 28, 2024
03119e9
Merge branch 'main' into 1.81-features
bagusnl Jul 28, 2024
bf00ad6
Fix QA?
neon-nyan Jul 29, 2024
17414f7
Use merge from main instead of cherry pick
bagusnl Jul 29, 2024
6e12f68
Merge branch 'main' into 1.81-features
bagusnl Jul 30, 2024
5142e60
Add predownload zips into ignored list on game file cleaner
bagusnl Jul 30, 2024
ff546e4
Adjust cursed LINQ
bagusnl Jul 30, 2024
739c78e
[skip ci] Rearrange GetUnusedFileInfoList builder
bagusnl Jul 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 74 additions & 14 deletions CollapseLauncher/App.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Application x:Class="CollapseLauncher.App"
<Application x:Class="CollapseLauncher.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
Expand All @@ -19,6 +19,8 @@
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<!-- For dark theme -->
<x:String x:Key="AppLogo">ms-appx:///Assets/CollapseLauncherLogo.png</x:String>
<x:String x:Key="AppLogoOutline">ms-appx:///Assets/CollapseLauncherLogoOutlineLight.png</x:String>
<!-- Base accent color -->
<ui:Color x:Key="TemplateAccentColor">#ffd52a</ui:Color>
<ui:Color x:Key="SystemAccentColor">#ffd52a</ui:Color>
Expand All @@ -27,6 +29,9 @@
<ui:Color x:Key="SystemAccentColorLight3">#ffd52a</ui:Color>
<SolidColorBrush x:Key="SolidColorBrushForegroundTransparent" Color="#00FFFFFF"/>
<SolidColorBrush x:Key="SolidColorBrushBackgroundTransparent" Color="#00222222"/>
<SolidColorBrush x:Key="SolidColorBrushBackgroundHover" Color="#55222222"/>
<SolidColorBrush x:Key="SolidColorBrushBackgroundPressed" Color="#77222222"/>
<SolidColorBrush x:Key="SolidColorBrushBackgroundDisabled" Color="#11222222"/>
<AcrylicBrush x:Key="AccentColorBrush"
TintColor="{ThemeResource SystemAccentColor}"/>
<SolidColorBrush x:Key="AccentColor"
Expand Down Expand Up @@ -153,6 +158,8 @@
FallbackColor="{ThemeResource SystemAccentColorLight1}"
TintColor="{ThemeResource SystemAccentColorLight1}"
TintOpacity="1"/>

<!-- For Navigation View -->
<AcrylicBrush x:Key="NavigationViewContentBackground"
FallbackColor="Transparent"
TintColor="Transparent"
Expand All @@ -173,10 +180,34 @@
StartPoint="0,0"
EndPoint="0.15,0">
<GradientStop Offset="0"
Color="#2D000000"/>
Color="#40000000"/>
<GradientStop Offset="1"
Color="#00000000"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="NavigationViewButtonBackground"
Color="#00000000"/>
<SolidColorBrush x:Key="NavigationViewButtonBackgroundPointerOver"
Color="#22000000"/>
<SolidColorBrush x:Key="NavigationViewButtonBackgroundPressed"
Color="#11000000"/>
<SolidColorBrush x:Key="NavigationViewButtonBackgroundDisabled"
Color="#0A000000"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundPointerOver"
Color="#22000000"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundPressed"
Color="#11000000"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundDisabled"
Color="#0A000000"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundSelected"
Color="#44000000"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundSelectedPointerOver"
Color="#55000000"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundSelectedPressed"
Color="#33000000"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundSelectedDisabled"
Color="#22000000"/>


<LinearGradientBrush x:Key="LoadingGradientBG"
StartPoint="0.5,0"
EndPoint="0.5,1">
Expand Down Expand Up @@ -338,6 +369,8 @@
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<!-- For light theme -->
<x:String x:Key="AppLogo">ms-appx:///Assets/CollapseLauncherLogo.png</x:String>
<x:String x:Key="AppLogoOutline">ms-appx:///Assets/CollapseLauncherLogoOutlineDark.png</x:String>
<!-- Base accent color -->
<ui:Color x:Key="TemplateAccentColor">#693758</ui:Color>
<ui:Color x:Key="SystemAccentColor">#693758</ui:Color>
Expand All @@ -346,6 +379,9 @@
<ui:Color x:Key="SystemAccentColorDark3">#693758</ui:Color>
<SolidColorBrush x:Key="SolidColorBrushForegroundTransparent" Color="#00000000"/>
<SolidColorBrush x:Key="SolidColorBrushBackgroundTransparent" Color="#00FFFFFF"/>
<SolidColorBrush x:Key="SolidColorBrushBackgroundHover" Color="#55FFFFFF"/>
<SolidColorBrush x:Key="SolidColorBrushBackgroundPressed" Color="#77FFFFFF"/>
<SolidColorBrush x:Key="SolidColorBrushBackgroundDisabled" Color="#11FFFFFF"/>
<AcrylicBrush x:Key="AccentColorBrush"
TintColor="{ThemeResource SystemAccentColor}"/>
<SolidColorBrush x:Key="AccentColor"
Expand Down Expand Up @@ -470,6 +506,7 @@
FallbackColor="{ThemeResource SystemAccentColorDark1}"
TintColor="{ThemeResource SystemAccentColorDark1}"
TintOpacity="1"/>
<!-- Navigation View Styles -->
<AcrylicBrush x:Key="NavigationViewContentBackground"
FallbackColor="Transparent"
TintColor="Transparent"
Expand All @@ -479,12 +516,12 @@
<AcrylicBrush x:Key="NavigationViewDefaultPaneBackground"
FallbackColor="#FFEEEEEE"
TintColor="#EEEEEE"
TintLuminosityOpacity="1"
TintLuminosityOpacity="0.6"
TintOpacity="0.0"/>
<AcrylicBrush x:Key="NavigationViewUnfoldedPaneBackground"
FallbackColor="#D0EEEEEE"
TintColor="#EEEEEE"
TintLuminosityOpacity="1"
TintLuminosityOpacity="0.6"
TintOpacity="0.0"/>
<LinearGradientBrush x:Key="NavigationViewExpandedPaneBackground"
StartPoint="0,0"
Expand All @@ -494,6 +531,29 @@
<GradientStop Offset="1"
Color="#00FFFFFF"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="NavigationViewButtonBackground"
Color="#00FFFFFF"/>
<SolidColorBrush x:Key="NavigationViewButtonBackgroundPointerOver"
Color="#66FFFFFF"/>
<SolidColorBrush x:Key="NavigationViewButtonBackgroundPressed"
Color="#44FFFFFF"/>
<SolidColorBrush x:Key="NavigationViewButtonBackgroundDisabled"
Color="#22FFFFFF"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundPointerOver"
Color="#66FFFFFF"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundPressed"
Color="#44FFFFFF"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundDisabled"
Color="#22FFFFFF"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundSelected"
Color="#88FFFFFF"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundSelectedPointerOver"
Color="#55FFFFFF"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundSelectedPressed"
Color="#44FFFFFF"/>
<SolidColorBrush x:Key="NavigationViewItemBackgroundSelectedDisabled"
Color="#22FFFFFF"/>

<LinearGradientBrush x:Key="LoadingGradientBG"
StartPoint="0.5,0"
EndPoint="0.5,1">
Expand Down Expand Up @@ -613,24 +673,24 @@
<SolidColorBrush x:Key="NewAccentButtonForeground"
Color="#FFFFFF"/>
<AcrylicBrush x:Key="AcrylicButtonBackground"
FallbackColor="#D0FFFFFF"
TintColor="#FFFFFF"
FallbackColor="#D0EEEEEE"
TintColor="#EEEEEE"
TintLuminosityOpacity="0.8"
TintOpacity="0.0"/>
<AcrylicBrush x:Key="AcrylicSemiButtonBackground"
FallbackColor="#D0FFFFFF"
TintColor="#FFFFFF"
FallbackColor="#D0EEEEEE"
TintColor="#EEEEEE"
TintLuminosityOpacity="0.8"
TintOpacity="0.0"/>
<AcrylicBrush x:Key="AcrylicButtonBackgroundFocused"
FallbackColor="#FFFFFFFF"
FallbackColor="#EEEEEE"
TintColor="#FFFFFF"
TintLuminosityOpacity="0.70"
TintOpacity="0.0"/>
<AcrylicBrush x:Key="AcrylicButtonBackgroundPointerOver"
FallbackColor="#FFFFFFFF"
FallbackColor="#FFEEEEEE"
TintColor="#FFFFFF"
TintLuminosityOpacity="0.8"
TintLuminosityOpacity="0.9"
TintOpacity="0.0"/>
<AcrylicBrush x:Key="AcrylicButtonBackgroundPressed"
FallbackColor="#FFFFFFFF"
Expand Down Expand Up @@ -1521,7 +1581,7 @@
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource ButtonBackgroundPointerOver}"/>
Value="{ThemeResource SolidColorBrushBackgroundHover}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="BorderBrush">
Expand All @@ -1544,7 +1604,7 @@
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource ButtonBackgroundPressed}"/>
Value="{ThemeResource SolidColorBrushBackgroundPressed}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="BorderBrush">
Expand All @@ -1567,7 +1627,7 @@
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource ButtonDisabledBrush}"/>
Value="{ThemeResource SolidColorBrushBackgroundDisabled}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
Storyboard.TargetProperty="BorderBrush">
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion CollapseLauncher/Classes/CachesManagement/Honkai/Update.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ private async Task<bool> Update(List<CacheAsset> updateAssetIndex, List<CacheAss
// Subscribe the event listener
httpClient.DownloadProgress += _httpClient_UpdateAssetProgress;
// Iterate the asset index and do update operation
foreach (CacheAsset asset in updateAssetIndex!)
foreach (CacheAsset asset in
#if ENABLEHTTPREPAIR
EnforceHTTPSchemeToAssetIndex(updateAssetIndex!)
#else
updateAssetIndex!
#endif
)
{
await UpdateCacheAsset(asset, httpClient, token);
}
Expand Down
9 changes: 8 additions & 1 deletion CollapseLauncher/Classes/CachesManagement/StarRail/Update.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,15 @@ private async Task<bool> Update(List<SRAsset> updateAssetIndex, List<SRAsset> as

// Subscribe the event listener
httpClient.DownloadProgress += _httpClient_UpdateAssetProgress;

// Iterate the asset index and do update operation
foreach (SRAsset asset in updateAssetIndex)
foreach (SRAsset asset in
#if ENABLEHTTPREPAIR
EnforceHTTPSchemeToAssetIndex(updateAssetIndex!)
#else
updateAssetIndex!
#endif
)
{
await UpdateCacheAsset(asset, httpClient, token);
}
Expand Down
2 changes: 2 additions & 0 deletions CollapseLauncher/Classes/ClassesContext.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using CollapseLauncher.Helper.LauncherApiLoader.HoYoPlay;
using CollapseLauncher.Helper.LauncherApiLoader.Sophon;
using CollapseLauncher.Helper.Metadata;
using CollapseLauncher.InstallManager.Base;
using CollapseLauncher.Interfaces;
using Hi3Helper.EncTool.Parser.AssetMetadata;
using Hi3Helper.Shared.ClassStruct;
Expand Down Expand Up @@ -28,6 +29,7 @@ namespace CollapseLauncher
[JsonSerializable(typeof(GeneralDataProp))]
[JsonSerializable(typeof(MasterKeyConfig))]
[JsonSerializable(typeof(AudioPCKType[]))]
[JsonSerializable(typeof(LocalFileInfo))]
[JsonSerializable(typeof(PresetConfig))]
[JsonSerializable(typeof(List<Stamp>))]
[JsonSerializable(typeof(CacheAsset))]
Expand Down
Loading