This commit is contained in:
DismissedLight
2022-08-29 18:21:55 +08:00
parent f84793b5c0
commit be510986d6
6 changed files with 42 additions and 15 deletions

View File

@@ -3,7 +3,12 @@
![Snap.Hutao](https://repobeats.axiom.co/api/embed/f029553fbe0c60689b1710476ec8512452163fc9.svg)
## Special Thanks
## 安装
* 前往 [下载页面](https://go.hut.ao/archive) 下载最新版本的 `胡桃` 安装包
* 使用 powershell 运行完全解压后的 `install.ps1` 文件
## 特别感谢
* [biuuu/genshin-wish-export](https://github.com/biuuu/genshin-wish-export)
* [CommunityToolkit/dotnet](https://github.com/CommunityToolkit/dotnet)
@@ -12,8 +17,10 @@
* [dotnet/runtime](https://github.com/dotnet/runtime)
* [HolographicHat/YaeAchievement](https://github.com/HolographicHat/YaeAchievement)
* [DotNetAnalyzers/StyleCopAnalyzers](https://github.com/DotNetAnalyzers/StyleCopAnalyzers)
* [microsoft/CsWin32](https://github.com/microsoft/CsWin32)
* [microsoft/vs-threading](https://github.com/microsoft/vs-threading)
* [microsoft/vs-validation](https://github.com/microsoft/vs-validation)
* [microsoft/WindowsAppSDK](https://github.com/microsoft/WindowsAppSDK)
* [microsoft/microsoft-ui-xaml](https://github.com/microsoft/microsoft-ui-xaml)
* [xunkong/xunkong](https://github.com/xunkong/xunkong)
* [YuehaiTeam/cocogoat](https://github.com/YuehaiTeam/cocogoat)

View File

@@ -13,6 +13,7 @@
</Style>
<Style x:Key="HyperlinkButtonStyle" TargetType="HyperlinkButton" >
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
</Style>
<Style x:Key="TextButtonStyle" TargetType="ButtonBase">

View File

@@ -9,7 +9,7 @@
<Identity
Name="7f0db578-026f-4e0b-a75b-d5d06bb0a74d"
Publisher="CN=DGP Studio"
Version="1.0.30.0" />
Version="1.0.31.0" />
<Properties>
<DisplayName>胡桃</DisplayName>

View File

@@ -85,10 +85,9 @@ internal class MetadataService : IMetadataService, IMetadataInitializer, ISuppor
ValueStopwatch stopwatch = ValueStopwatch.StartNew();
logger.LogInformation(EventIds.MetadataInitialization, "Metadata initializaion begin");
IsInitialized = await TryUpdateMetadataAsync(token)
.ConfigureAwait(false);
IsInitialized = await TryUpdateMetadataAsync(token).ConfigureAwait(false);
initializeCompletionSource.SetResult();
logger.LogInformation(EventIds.MetadataInitialization, "Metadata initializaion completed in {time}ms", stopwatch.GetElapsedTime().TotalMilliseconds);
}
@@ -136,14 +135,23 @@ internal class MetadataService : IMetadataService, IMetadataInitializer, ISuppor
private async Task<bool> TryUpdateMetadataAsync(CancellationToken token = default)
{
// download meta check file
IDictionary<string, string>? metaMd5Map = await httpClient
.GetFromJsonAsync<IDictionary<string, string>>($"{MetaAPIHost}/{MetaFileName}", options, token)
.ConfigureAwait(false);
if (metaMd5Map is null)
IDictionary<string, string>? metaMd5Map = null;
try
{
infoBarService.Error("元数据校验文件解析失败");
// download meta check file
metaMd5Map = await httpClient
.GetFromJsonAsync<IDictionary<string, string>>($"{MetaAPIHost}/{MetaFileName}", options, token)
.ConfigureAwait(false);
if (metaMd5Map is null)
{
infoBarService.Error("元数据校验文件解析失败");
return false;
}
}
catch (HttpRequestException ex)
{
infoBarService.Error(ex, "元数据校验文件下载失败");
return false;
}

View File

@@ -78,7 +78,7 @@
Label="从剪贴板导入"
Command="{Binding ImportUIAFFromClipboardCommand}">
<AppBarButton.Icon>
<FontIcon Glyph="&#xE710;"/>
<FontIcon Glyph="&#xE8B5;"/>
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton

View File

@@ -13,13 +13,24 @@
<Style TargetType="Button" BasedOn="{StaticResource SettingButtonStyle}">
<Setter Property="MinWidth" Value="160"/>
</Style>
<Style TargetType="HyperlinkButton" BasedOn="{StaticResource HyperlinkButtonStyle}">
<Setter Property="MinWidth" Value="160"/>
</Style>
</Page.Resources>
<ScrollViewer>
<StackPanel Margin="32,0,24,0">
<sc:SettingsGroup Header="关于 胡桃">
<sc:Setting Header="胡桃" Description="{Binding AppVersion}"/>
<sc:Setting
Icon="&#xECAA;"
Header="胡桃"
Description="{Binding AppVersion}"/>
<sc:Setting
Icon="&#xED15;"
Header="反馈"
Description="只处理在 Github 上反馈的问题">
<HyperlinkButton Content="前往反馈" NavigateUri="http://go.hut.ao/issue"/>
</sc:Setting>
<sc:SettingExpander>
<sc:SettingExpander.Header>
<sc:Setting