mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
915b1aae32 | ||
|
|
71a1bdc173 |
@@ -28,7 +28,7 @@ variables:
|
||||
project: $(Build.SourcesDirectory)/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj'
|
||||
buildPlatform: 'x64'
|
||||
buildConfiguration: 'Release'
|
||||
build_date: $[ format('{0:yyyy}.{0:MM}.{0:dd}', pipeline.startTime) ]
|
||||
build_date: $[ format('{0:yyyy}.{0:M}.{0:d}', pipeline.startTime) ]
|
||||
|
||||
|
||||
steps:
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
<shmmc:AvatarSideIconConverter x:Key="AvatarSideIconConverter"/>
|
||||
<shmmc:DescParamDescriptor x:Key="DescParamDescriptor"/>
|
||||
<shmmc:ElementNameIconConverter x:Key="ElementNameIconConverter"/>
|
||||
<shmmc:EmotionIconConverter x:Key="EmotionIconConverter"/>
|
||||
<shmmc:EquipIconConverter x:Key="EquipIconConverter"/>
|
||||
<shmmc:GachaAvatarImgConverter x:Key="GachaAvatarImgConverter"/>
|
||||
<shmmc:GachaAvatarIconConverter x:Key="GachaAvatarIconConverter"/>
|
||||
@@ -61,8 +62,14 @@
|
||||
<shmmc:QualityColorConverter x:Key="QualityColorConverter"/>
|
||||
<shmmc:WeaponTypeIconConverter x:Key="WeaponTypeIconConverter"/>
|
||||
<shvc:BoolToVisibilityRevertConverter x:Key="BoolToVisibilityRevertConverter"/>
|
||||
<shvc:EmptyCollectionToBoolConverter x:Key="EmptyCollectionToBoolConverter"/>
|
||||
<shvc:EmptyCollectionToBoolRevertConverter x:Key="EmptyCollectionToBoolRevertConverter"/>
|
||||
<shvc:EmptyCollectionToVisibilityConverter x:Key="EmptyCollectionToVisibilityConverter"/>
|
||||
<shvc:EmptyCollectionToVisibilityRevertConverter x:Key="EmptyCollectionToVisibilityRevertConverter"/>
|
||||
<shvc:EmptyObjectToBoolConverter x:Key="EmptyObjectToBoolConverter"/>
|
||||
<shvc:EmptyObjectToBoolRevertConverter x:Key="EmptyObjectToBoolRevertConverter"/>
|
||||
<shvc:EmptyObjectToVisibilityConverter x:Key="EmptyObjectToVisibilityConverter"/>
|
||||
|
||||
<shvc:EmptyObjectToVisibilityRevertConverter x:Key="EmptyObjectToVisibilityRevertConverter"/>
|
||||
<!-- Styles -->
|
||||
<Style
|
||||
x:Key="LargeGridViewItemStyle"
|
||||
@@ -70,7 +77,6 @@
|
||||
TargetType="GridViewItem">
|
||||
<Setter Property="Margin" Value="0,0,12,12"/>
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
x:Key="SettingButtonStyle"
|
||||
BasedOn="{StaticResource DefaultButtonStyle}"
|
||||
@@ -81,7 +87,6 @@
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="BorderCardStyle" TargetType="Border">
|
||||
<Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}"/>
|
||||
@@ -92,7 +97,6 @@
|
||||
<ItemsPanelTemplate x:Key="ItemsStackPanelTemplate">
|
||||
<ItemsStackPanel/>
|
||||
</ItemsPanelTemplate>
|
||||
|
||||
<ItemsPanelTemplate x:Key="HorizontalStackPanelTemplate">
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.UI.Xaml.Markup;
|
||||
using Snap.Hutao.Extension;
|
||||
using Snap.Hutao.Localization;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Snap.Hutao.Control.Markup;
|
||||
|
||||
/// <summary>
|
||||
/// 国际化拓展
|
||||
/// </summary>
|
||||
[MarkupExtensionReturnType(ReturnType = typeof(string))]
|
||||
internal class I18NExtension : MarkupExtension
|
||||
{
|
||||
private static readonly ITranslation Translation;
|
||||
|
||||
private static readonly Dictionary<string, Type> TranslationMap = new()
|
||||
{
|
||||
["zh-CN"] = typeof(LanguagezhCN),
|
||||
};
|
||||
|
||||
static I18NExtension()
|
||||
{
|
||||
string currentName = CultureInfo.CurrentUICulture.Name;
|
||||
Type? languageType = TranslationMap.GetValueOrDefault2(currentName, typeof(LanguagezhCN));
|
||||
Translation = (ITranslation)Activator.CreateInstance(languageType!)!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 构造默认的国际化拓展
|
||||
/// </summary>
|
||||
public I18NExtension()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 构造默认的国际化拓展
|
||||
/// </summary>
|
||||
/// <param name="key">键</param>
|
||||
public I18NExtension(string key)
|
||||
{
|
||||
Key = key;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 键名称
|
||||
/// </summary>
|
||||
public string Key { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取字符串
|
||||
/// </summary>
|
||||
/// <param name="key">键</param>
|
||||
/// <returns>翻译的字符串</returns>
|
||||
internal static string Get(string key)
|
||||
{
|
||||
return Translation[key];
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override object ProvideValue()
|
||||
{
|
||||
return Translation[Key];
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Snap.Hutao.Control.Markup;
|
||||
|
||||
/// <summary>
|
||||
/// 国际化帮助类
|
||||
/// WinUI 3 目前存在部分页面无法使用 MarkupExtension 的问题
|
||||
/// 使用 此帮助类 绕过限制
|
||||
/// </summary>
|
||||
internal class I18NHelper
|
||||
{
|
||||
private static readonly DependencyProperty TranslationProperty = Property<I18NHelper>.Attach("Translation", string.Empty, OnKeyChanged);
|
||||
|
||||
/// <summary>
|
||||
/// 获取键
|
||||
/// </summary>
|
||||
/// <param name="obj">对象</param>
|
||||
/// <returns>值</returns>
|
||||
public static string GetTranslation(DependencyObject obj)
|
||||
{
|
||||
return (string)obj.GetValue(TranslationProperty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置键
|
||||
/// </summary>
|
||||
/// <param name="obj">对象</param>
|
||||
/// <param name="value">值</param>
|
||||
public static void SetTranslation(DependencyObject obj, string value)
|
||||
{
|
||||
string tarnslation = I18NExtension.Get(value);
|
||||
obj.SetValue(TranslationProperty, tarnslation);
|
||||
}
|
||||
|
||||
private static void OnKeyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs arg)
|
||||
{
|
||||
string translation = I18NExtension.Get(arg.NewValue.ToString() ?? string.Empty);
|
||||
|
||||
if (obj is AppBarButton appBarButton)
|
||||
{
|
||||
appBarButton.Label = translation;
|
||||
}
|
||||
else if (obj is AppBarToggleButton appBarToggleButton)
|
||||
{
|
||||
appBarToggleButton.Label = translation;
|
||||
}
|
||||
else if (obj is AutoSuggestBox autoSuggestBox)
|
||||
{
|
||||
autoSuggestBox.PlaceholderText = translation;
|
||||
}
|
||||
else if (obj is ContentControl contentControl)
|
||||
{
|
||||
contentControl.Content = translation;
|
||||
}
|
||||
else if (obj is MenuFlyoutItem menuFlyoutItem)
|
||||
{
|
||||
menuFlyoutItem.Text = translation;
|
||||
}
|
||||
else if (obj is TextBlock textBlock)
|
||||
{
|
||||
textBlock.Text = translation;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ using Microsoft.Win32;
|
||||
using Snap.Hutao.Core.Convert;
|
||||
using Snap.Hutao.Core.Json;
|
||||
using Snap.Hutao.Extension;
|
||||
using Snap.Hutao.Web.Hoyolab.DynamicSecret;
|
||||
using System.Collections.Immutable;
|
||||
using System.Text.Json.Serialization.Metadata;
|
||||
using Windows.ApplicationModel;
|
||||
|
||||
@@ -28,7 +30,20 @@ internal static class CoreEnvironment
|
||||
/// <summary>
|
||||
/// 米游社 Rpc 版本
|
||||
/// </summary>
|
||||
public const string HoyolabXrpcVersion = "2.42.1";
|
||||
public const string HoyolabXrpcVersion = "2.43.1";
|
||||
|
||||
/// <summary>
|
||||
/// 盐
|
||||
/// </summary>
|
||||
// https://github.com/UIGF-org/Hoyolab.Salt
|
||||
public static readonly ImmutableDictionary<string, string> DynamicSecrets = new Dictionary<string, string>()
|
||||
{
|
||||
[nameof(SaltType.K2)] = "ODzG1Jrn6zebX19VRmaJwjFI2CDvBUGq",
|
||||
[nameof(SaltType.LK2)] = "V1PYbXKQY7ysdx3MNCcNbsE1LtY2QZpW",
|
||||
[nameof(SaltType.X4)] = "xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs",
|
||||
[nameof(SaltType.X6)] = "t0qEgfub6cvueAPgR5m9aQWWVciEer7v",
|
||||
[nameof(SaltType.PROD)] = "JwYDpKvLj6MrMqqYU6jTKF17KNO2PXoS",
|
||||
}.ToImmutableDictionary();
|
||||
|
||||
/// <summary>
|
||||
/// 标准UA
|
||||
|
||||
@@ -40,6 +40,11 @@ public class SettingEntry
|
||||
/// </summary>
|
||||
public const string DailyNoteReminderNotify = "DailyNote.ReminderNotify";
|
||||
|
||||
/// <summary>
|
||||
/// 实时便笺免打扰模式
|
||||
/// </summary>
|
||||
public const string DailyNoteSilentWhenPlayingGame = "DailyNote.SilentWhenPlayingGame";
|
||||
|
||||
/// <summary>
|
||||
/// 启动游戏 全屏
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Control;
|
||||
|
||||
namespace Snap.Hutao.Model.Metadata.Converter;
|
||||
|
||||
/// <summary>
|
||||
/// 表情图片转换器
|
||||
/// </summary>
|
||||
internal class EmotionIconConverter : ValueConverterBase<string, Uri>
|
||||
{
|
||||
private const string BaseUrl = "https://static.snapgenshin.com/EmotionIcon/{0}.png";
|
||||
|
||||
/// <summary>
|
||||
/// 名称转Uri
|
||||
/// </summary>
|
||||
/// <param name="name">名称</param>
|
||||
/// <returns>链接</returns>
|
||||
public static Uri IconNameToUri(string name)
|
||||
{
|
||||
return new Uri(string.Format(BaseUrl, name));
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override Uri Convert(string from)
|
||||
{
|
||||
return IconNameToUri(from);
|
||||
}
|
||||
}
|
||||
@@ -27,4 +27,4 @@ internal class EquipIconConverter : ValueConverterBase<string, Uri>
|
||||
{
|
||||
return IconNameToUri(from);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<Identity
|
||||
Name="7f0db578-026f-4e0b-a75b-d5d06bb0a74d"
|
||||
Publisher="CN=DGP Studio"
|
||||
Version="1.3.0.0" />
|
||||
Version="1.3.1.0" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>胡桃</DisplayName>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"profiles": {
|
||||
"Snap.Hutao (Package)": {
|
||||
"commandName": "MsixPackage",
|
||||
"nativeDebugging": true,
|
||||
"nativeDebugging": false,
|
||||
"doNotLaunchApp": false
|
||||
},
|
||||
"Snap.Hutao (Unpackaged)": {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
@@ -167,41 +167,38 @@ internal class DailyNoteNotifier
|
||||
builder.SetToastScenario(ToastScenario.Reminder);
|
||||
}
|
||||
|
||||
// Desktop and Mobile started supporting adaptive toasts in API contract 3 (Anniversary Update)
|
||||
if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3))
|
||||
if (notifyInfos.Count > 2)
|
||||
{
|
||||
AdaptiveGroup group = new();
|
||||
foreach (NotifyInfo info in notifyInfos)
|
||||
builder.AddText("多个提醒项达到设定值");
|
||||
|
||||
// Desktop and Mobile started supporting adaptive toasts in API contract 3 (Anniversary Update)
|
||||
if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3))
|
||||
{
|
||||
AdaptiveSubgroup subgroup = new()
|
||||
AdaptiveGroup group = new();
|
||||
foreach (NotifyInfo info in notifyInfos)
|
||||
{
|
||||
HintWeight = 1,
|
||||
Children =
|
||||
AdaptiveSubgroup subgroup = new()
|
||||
{
|
||||
HintWeight = 1,
|
||||
Children =
|
||||
{
|
||||
new AdaptiveImage() { Source = info.AdaptiveIcon, HintRemoveMargin = true, },
|
||||
new AdaptiveText() { Text = info.AdaptiveHint, HintAlign = AdaptiveTextAlign.Center, },
|
||||
new AdaptiveText() { Text = info.Title, HintAlign = AdaptiveTextAlign.Center, HintStyle = AdaptiveTextStyle.CaptionSubtle, },
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
group.Children.Add(subgroup);
|
||||
group.Children.Add(subgroup);
|
||||
}
|
||||
|
||||
builder.AddVisualChild(group);
|
||||
}
|
||||
|
||||
builder.AddVisualChild(group);
|
||||
builder.AddText("一个或多个提醒项达到设定值");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (notifyInfos.Count > 2)
|
||||
foreach (NotifyInfo info in notifyInfos)
|
||||
{
|
||||
builder.AddText("多个提醒项达到设定值");
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (NotifyInfo info in notifyInfos)
|
||||
{
|
||||
builder.AddText(info.Hint);
|
||||
}
|
||||
builder.AddText(info.Hint);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ using Snap.Hutao.Message;
|
||||
using Snap.Hutao.Model.Binding.User;
|
||||
using Snap.Hutao.Model.Entity;
|
||||
using Snap.Hutao.Model.Entity.Database;
|
||||
using Snap.Hutao.Service.Game;
|
||||
using Snap.Hutao.Service.User;
|
||||
using Snap.Hutao.Web.Hoyolab.Takumi.GameRecord;
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -96,6 +97,13 @@ internal class DailyNoteService : IDailyNoteService, IRecipient<UserRemovedMessa
|
||||
AppDbContext appDbContext = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||
GameRecordClient gameRecordClient = scope.ServiceProvider.GetRequiredService<GameRecordClient>();
|
||||
|
||||
if (appDbContext.Settings.SingleOrAdd(SettingEntry.DailyNoteSilentWhenPlayingGame, SettingEntryHelper.FalseString).GetBoolean()
|
||||
&& Ioc.Default.GetRequiredService<IGameService>().IsGameRunning())
|
||||
{
|
||||
// Prevent notify when we are in silent mode.
|
||||
notify = false;
|
||||
}
|
||||
|
||||
foreach (DailyNoteEntry entry in appDbContext.DailyNotes.Include(n => n.User))
|
||||
{
|
||||
WebDailyNote? dailyNote = await gameRecordClient.GetDailyNoteAsync(entry.User, entry.Uid).ConfigureAwait(false);
|
||||
|
||||
@@ -71,7 +71,7 @@ internal class GameService : IGameService, IDisposable
|
||||
|
||||
if (!result.IsOk)
|
||||
{
|
||||
// Try locate manually
|
||||
// Try locate by registry
|
||||
locator = gameLocators.Single(l => l.Name == nameof(RegistryLauncherLocator));
|
||||
result = await locator.LocateGamePathAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
|
||||
<PackageCertificateThumbprint>F8C2255969BEA4A681CED102771BF807856AEC02</PackageCertificateThumbprint>
|
||||
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
|
||||
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
|
||||
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
|
||||
<AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
|
||||
<GenerateTestArtifacts>True</GenerateTestArtifacts>
|
||||
<AppxBundle>Never</AppxBundle>
|
||||
@@ -40,6 +40,7 @@
|
||||
<None Remove="LaunchGameWindow.xaml" />
|
||||
<None Remove="NativeMethods.json" />
|
||||
<None Remove="NativeMethods.txt" />
|
||||
<None Remove="Resource\Icon\UI_AchievementIcon_3_3.png" />
|
||||
<None Remove="Resource\Icon\UI_BagTabIcon_Avatar.png" />
|
||||
<None Remove="Resource\Icon\UI_BagTabIcon_Weapon.png" />
|
||||
<None Remove="Resource\Icon\UI_BtnIcon_ActivityEntry.png" />
|
||||
@@ -119,6 +120,7 @@
|
||||
<Content Include="Assets\StoreLogo.png" />
|
||||
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
|
||||
<Content Include="Resource\Font\Segoe Fluent Icons.ttf" />
|
||||
<Content Include="Resource\Icon\UI_AchievementIcon_3_3.png" />
|
||||
<Content Include="Resource\Icon\UI_BagTabIcon_Avatar.png" />
|
||||
<Content Include="Resource\Icon\UI_BagTabIcon_Weapon.png" />
|
||||
<Content Include="Resource\Icon\UI_BtnIcon_ActivityEntry.png" />
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using CommunityToolkit.WinUI.UI.Converters;
|
||||
using Microsoft.UI.Xaml;
|
||||
|
||||
namespace Snap.Hutao.View.Converter;
|
||||
|
||||
/// <summary>
|
||||
/// This class converts a collection size into a boolean value.
|
||||
/// </summary>
|
||||
public class EmptyCollectionToBoolConverter : EmptyCollectionToObjectConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EmptyCollectionToVisibilityConverter"/> class.
|
||||
/// </summary>
|
||||
public EmptyCollectionToBoolConverter()
|
||||
{
|
||||
EmptyValue = false;
|
||||
NotEmptyValue = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using CommunityToolkit.WinUI.UI.Converters;
|
||||
using Microsoft.UI.Xaml;
|
||||
|
||||
namespace Snap.Hutao.View.Converter;
|
||||
|
||||
/// <summary>
|
||||
/// This class converts a collection size into a boolean value in reverse.
|
||||
/// </summary>
|
||||
public class EmptyCollectionToBoolRevertConverter : EmptyCollectionToObjectConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EmptyCollectionToVisibilityConverter"/> class.
|
||||
/// </summary>
|
||||
public EmptyCollectionToBoolRevertConverter()
|
||||
{
|
||||
EmptyValue = true;
|
||||
NotEmptyValue = false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using CommunityToolkit.WinUI.UI.Converters;
|
||||
using Microsoft.UI.Xaml;
|
||||
|
||||
namespace Snap.Hutao.View.Converter;
|
||||
|
||||
/// <summary>
|
||||
/// This class converts a collection size into a Visibility enumeration.
|
||||
/// </summary>
|
||||
public class EmptyCollectionToVisibilityConverter : EmptyCollectionToObjectConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EmptyCollectionToVisibilityConverter"/> class.
|
||||
/// </summary>
|
||||
public EmptyCollectionToVisibilityConverter()
|
||||
{
|
||||
EmptyValue = Visibility.Collapsed;
|
||||
NotEmptyValue = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using CommunityToolkit.WinUI.UI.Converters;
|
||||
using Microsoft.UI.Xaml;
|
||||
|
||||
namespace Snap.Hutao.View.Converter;
|
||||
|
||||
/// <summary>
|
||||
/// This class converts a collection size into a Visibility enumeration in reverse.
|
||||
/// </summary>
|
||||
public class EmptyCollectionToVisibilityRevertConverter : EmptyCollectionToObjectConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EmptyCollectionToVisibilityRevertConverter"/> class.
|
||||
/// </summary>
|
||||
public EmptyCollectionToVisibilityRevertConverter()
|
||||
{
|
||||
EmptyValue = Visibility.Visible;
|
||||
NotEmptyValue = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using CommunityToolkit.WinUI.UI.Converters;
|
||||
using Microsoft.UI.Xaml;
|
||||
|
||||
namespace Snap.Hutao.View.Converter;
|
||||
|
||||
/// <summary>
|
||||
/// This class converts a object? value into a boolean.
|
||||
/// </summary>
|
||||
public class EmptyObjectToBoolConverter : EmptyObjectToObjectConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EmptyObjectToVisibilityRevertConverter"/> class.
|
||||
/// </summary>
|
||||
public EmptyObjectToBoolConverter()
|
||||
{
|
||||
EmptyValue = false;
|
||||
NotEmptyValue = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using CommunityToolkit.WinUI.UI.Converters;
|
||||
using Microsoft.UI.Xaml;
|
||||
|
||||
namespace Snap.Hutao.View.Converter;
|
||||
|
||||
/// <summary>
|
||||
/// This class converts a object? value into a boolean in reverse.
|
||||
/// </summary>
|
||||
public class EmptyObjectToBoolRevertConverter : EmptyObjectToObjectConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EmptyObjectToVisibilityRevertConverter"/> class.
|
||||
/// </summary>
|
||||
public EmptyObjectToBoolRevertConverter()
|
||||
{
|
||||
EmptyValue = true;
|
||||
NotEmptyValue = false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using CommunityToolkit.WinUI.UI.Converters;
|
||||
using Microsoft.UI.Xaml;
|
||||
|
||||
namespace Snap.Hutao.View.Converter;
|
||||
|
||||
/// <summary>
|
||||
/// This class converts a object? value into a Visibility enumeration in reverse.
|
||||
/// </summary>
|
||||
public class EmptyObjectToVisibilityRevertConverter : EmptyObjectToObjectConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EmptyObjectToVisibilityRevertConverter"/> class.
|
||||
/// </summary>
|
||||
public EmptyObjectToVisibilityRevertConverter()
|
||||
{
|
||||
EmptyValue = Visibility.Visible;
|
||||
NotEmptyValue = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
@@ -24,208 +24,229 @@
|
||||
</mxi:Interaction.Behaviors>
|
||||
|
||||
<Grid Visibility="{Binding IsInitialized, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Background="{StaticResource CardBackgroundFillColorDefaultBrush}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="252"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Visibility="{Binding SelectedArchive, Converter={StaticResource EmptyObjectToVisibilityConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Background="{StaticResource CardBackgroundFillColorDefaultBrush}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="252"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Margin="16,0,0,2"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{Binding FinishDescription}"/>
|
||||
<TextBlock
|
||||
Margin="16,0,0,2"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{Binding FinishDescription}"/>
|
||||
|
||||
<CommandBar Grid.Column="1" DefaultLabelPosition="Right">
|
||||
<CommandBar Grid.Column="1" DefaultLabelPosition="Right">
|
||||
|
||||
<CommandBar.Content>
|
||||
<AutoSuggestBox
|
||||
Width="240"
|
||||
Height="36"
|
||||
Margin="12,6,6,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalContentAlignment="Center"
|
||||
PlaceholderText="搜索成就名称,描述或编号"
|
||||
QueryIcon="{shcm:FontIcon Glyph=}"
|
||||
Text="{Binding SearchText, Mode=TwoWay}">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<mxic:EventTriggerBehavior EventName="QuerySubmitted">
|
||||
<mxic:InvokeCommandAction Command="{Binding SearchAchievementCommand}" CommandParameter="{Binding SearchText}"/>
|
||||
</mxic:EventTriggerBehavior>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</AutoSuggestBox>
|
||||
</CommandBar.Content>
|
||||
<CommandBar.Content>
|
||||
<AutoSuggestBox
|
||||
Width="240"
|
||||
Height="36"
|
||||
Margin="12,6,6,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalContentAlignment="Center"
|
||||
PlaceholderText="搜索成就名称,描述或编号"
|
||||
QueryIcon="{shcm:FontIcon Glyph=}"
|
||||
Text="{Binding SearchText, Mode=TwoWay}">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<mxic:EventTriggerBehavior EventName="QuerySubmitted">
|
||||
<mxic:InvokeCommandAction Command="{Binding SearchAchievementCommand}" CommandParameter="{Binding SearchText}"/>
|
||||
</mxic:EventTriggerBehavior>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</AutoSuggestBox>
|
||||
</CommandBar.Content>
|
||||
|
||||
<AppBarElementContainer>
|
||||
<ComboBox
|
||||
Height="36"
|
||||
MinWidth="120"
|
||||
Margin="2,6,3,6"
|
||||
DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding Archives, Mode=OneWay}"
|
||||
SelectedItem="{Binding SelectedArchive, Mode=TwoWay}">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:ComboBoxExtendsContentIntoTitleBarWorkaroundBehavior/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</ComboBox>
|
||||
</AppBarElementContainer>
|
||||
<AppBarButton
|
||||
Command="{Binding AddArchiveCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="创建新存档"/>
|
||||
<AppBarButton
|
||||
Command="{Binding RemoveArchiveCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="删除当前存档"/>
|
||||
<AppBarSeparator/>
|
||||
<AppBarElementContainer>
|
||||
<ComboBox
|
||||
Height="36"
|
||||
MinWidth="120"
|
||||
Margin="2,6,3,6"
|
||||
DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding Archives, Mode=OneWay}"
|
||||
SelectedItem="{Binding SelectedArchive, Mode=TwoWay}">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:ComboBoxExtendsContentIntoTitleBarWorkaroundBehavior/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</ComboBox>
|
||||
</AppBarElementContainer>
|
||||
<AppBarButton
|
||||
Command="{Binding AddArchiveCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="创建新存档"/>
|
||||
<AppBarButton
|
||||
Command="{Binding RemoveArchiveCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="删除当前存档"/>
|
||||
<AppBarSeparator/>
|
||||
|
||||
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="导入">
|
||||
<AppBarButton.Flyout>
|
||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||
<MenuFlyoutItem
|
||||
Command="{Binding ImportUIAFFromClipboardCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Text="从剪贴板导入"/>
|
||||
<MenuFlyoutItem
|
||||
Command="{Binding ImportUIAFFromFileCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Text="从 UIAF 文件导入"/>
|
||||
</MenuFlyout>
|
||||
</AppBarButton.Flyout>
|
||||
</AppBarButton>
|
||||
<AppBarButton
|
||||
Command="{Binding ExportAsUIAFToFileCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="导出"/>
|
||||
<AppBarSeparator/>
|
||||
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="导入">
|
||||
<AppBarButton.Flyout>
|
||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||
<MenuFlyoutItem
|
||||
Command="{Binding ImportUIAFFromClipboardCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Text="从剪贴板导入"/>
|
||||
<MenuFlyoutItem
|
||||
Command="{Binding ImportUIAFFromFileCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Text="从 UIAF 文件导入"/>
|
||||
</MenuFlyout>
|
||||
</AppBarButton.Flyout>
|
||||
</AppBarButton>
|
||||
<AppBarButton
|
||||
Command="{Binding ExportAsUIAFToFileCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="导出"/>
|
||||
<AppBarSeparator/>
|
||||
|
||||
<AppBarToggleButton
|
||||
Command="{Binding SortIncompletedSwitchCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
IsChecked="{Binding IsIncompletedItemsFirst}"
|
||||
Label="优先未完成"/>
|
||||
</CommandBar>
|
||||
</Grid>
|
||||
<AppBarToggleButton
|
||||
Command="{Binding SortIncompletedSwitchCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
IsChecked="{Binding IsIncompletedItemsFirst}"
|
||||
Label="优先未完成"/>
|
||||
</CommandBar>
|
||||
</Grid>
|
||||
|
||||
<SplitView
|
||||
Grid.Row="1"
|
||||
DisplayMode="Inline"
|
||||
IsPaneOpen="True"
|
||||
OpenPaneLength="252"
|
||||
PaneBackground="Transparent">
|
||||
<SplitView.Pane>
|
||||
<ListView
|
||||
ItemsSource="{Binding AchievementGoals}"
|
||||
SelectedItem="{Binding SelectedAchievementGoal, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="36"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shci:CachedImage
|
||||
Grid.Column="0"
|
||||
Width="36"
|
||||
Height="36"
|
||||
Source="{Binding Icon}"/>
|
||||
<StackPanel Grid.Column="1" Margin="12,0,0,2">
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Name}"/>
|
||||
<TextBlock
|
||||
Margin="0,2,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Opacity="0.7"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding FinishDescription}"/>
|
||||
<ProgressBar
|
||||
Height="1"
|
||||
MinHeight="1"
|
||||
Margin="0,4,0,0"
|
||||
Maximum="1"
|
||||
Value="{Binding FinishPercent}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</SplitView.Pane>
|
||||
|
||||
<SplitView.Content>
|
||||
<ScrollViewer Padding="0,0,16,0">
|
||||
<ItemsControl
|
||||
Margin="16,0,0,16"
|
||||
ItemsPanel="{StaticResource ItemsStackPanelTemplate}"
|
||||
ItemsSource="{Binding Achievements}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<SplitView
|
||||
Grid.Row="1"
|
||||
DisplayMode="Inline"
|
||||
IsPaneOpen="True"
|
||||
OpenPaneLength="252"
|
||||
PaneBackground="Transparent">
|
||||
<SplitView.Pane>
|
||||
<ListView
|
||||
ItemsSource="{Binding AchievementGoals}"
|
||||
SelectedItem="{Binding SelectedAchievementGoal, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid
|
||||
MinHeight="48"
|
||||
Margin="0,8,0,0"
|
||||
Padding="8"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Background="{ThemeResource CardBackgroundBrush}"
|
||||
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
||||
BorderThickness="{ThemeResource CardBorderThickness}"
|
||||
CornerRadius="{ThemeResource ControlCornerRadius}">
|
||||
<Grid Margin="0,6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="36"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<CheckBox
|
||||
Grid.Column="1"
|
||||
Margin="6,0,12,0"
|
||||
Padding="16,0,0,0"
|
||||
Command="{Binding Path=DataContext.SaveAchievementCommand, Source={StaticResource BindingProxy}}"
|
||||
CommandParameter="{Binding}"
|
||||
IsChecked="{Binding IsChecked, Mode=TwoWay}"
|
||||
Style="{StaticResource DefaultCheckBoxStyle}">
|
||||
<CheckBox.Content>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Inner.Title}"/>
|
||||
<TextBlock
|
||||
Margin="0,2,0,0"
|
||||
Style="{StaticResource SecondaryTextStyle}"
|
||||
Text="{Binding Inner.Description}"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
</StackPanel>
|
||||
</CheckBox.Content>
|
||||
</CheckBox>
|
||||
<Grid Grid.Column="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="32"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shci:CachedImage
|
||||
Grid.Column="0"
|
||||
Width="36"
|
||||
Height="36"
|
||||
Source="{Binding Icon}"/>
|
||||
<StackPanel Grid.Column="1" Margin="12,0,0,2">
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Name}"/>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="12,0,12,0"
|
||||
Margin="0,2,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Time}"
|
||||
Visibility="{Binding IsChecked, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Height="32"
|
||||
Source="ms-appx:///Resource/Icon/UI_ItemIcon_201.png"/>
|
||||
<TextBlock
|
||||
Grid.Column="2"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Inner.FinishReward.Count}"/>
|
||||
</Grid>
|
||||
Opacity="0.7"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding FinishDescription}"/>
|
||||
<ProgressBar
|
||||
Height="1"
|
||||
MinHeight="1"
|
||||
Margin="0,4,0,0"
|
||||
Maximum="1"
|
||||
Value="{Binding FinishPercent}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</SplitView.Content>
|
||||
</SplitView>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</SplitView.Pane>
|
||||
|
||||
<SplitView.Content>
|
||||
<ScrollViewer Padding="0,0,16,0">
|
||||
<ItemsControl
|
||||
Margin="16,0,0,16"
|
||||
ItemsPanel="{StaticResource ItemsStackPanelTemplate}"
|
||||
ItemsSource="{Binding Achievements}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid
|
||||
MinHeight="48"
|
||||
Margin="0,8,0,0"
|
||||
Padding="8"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Background="{ThemeResource CardBackgroundBrush}"
|
||||
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
||||
BorderThickness="{ThemeResource CardBorderThickness}"
|
||||
CornerRadius="{ThemeResource ControlCornerRadius}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<CheckBox
|
||||
Grid.Column="1"
|
||||
Margin="6,0,12,0"
|
||||
Padding="16,0,0,0"
|
||||
Command="{Binding Path=DataContext.SaveAchievementCommand, Source={StaticResource BindingProxy}}"
|
||||
CommandParameter="{Binding}"
|
||||
IsChecked="{Binding IsChecked, Mode=TwoWay}"
|
||||
Style="{StaticResource DefaultCheckBoxStyle}">
|
||||
<CheckBox.Content>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Inner.Title}"/>
|
||||
<TextBlock
|
||||
Margin="0,2,0,0"
|
||||
Style="{StaticResource SecondaryTextStyle}"
|
||||
Text="{Binding Inner.Description}"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
</StackPanel>
|
||||
</CheckBox.Content>
|
||||
</CheckBox>
|
||||
<Grid Grid.Column="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="32"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="12,0,12,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Time}"
|
||||
Visibility="{Binding IsChecked, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Height="32"
|
||||
Source="ms-appx:///Resource/Icon/UI_ItemIcon_201.png"/>
|
||||
<TextBlock
|
||||
Grid.Column="2"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Inner.FinishReward.Count}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</SplitView.Content>
|
||||
</SplitView>
|
||||
</Grid>
|
||||
<Grid Visibility="{Binding SelectedArchive, Converter={StaticResource EmptyObjectToVisibilityRevertConverter}}">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Image
|
||||
Width="120"
|
||||
Height="120"
|
||||
Source="ms-appx:///Resource/Icon/UI_AchievementIcon_3_3.png"/>
|
||||
<TextBlock
|
||||
Margin="0,16,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="创建新存档以继续"/>
|
||||
<Button
|
||||
Margin="0,16,0,0"
|
||||
Padding="16"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding AddArchiveCommand}"
|
||||
Content="创建新存档"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</shc:ScopedPage>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,9 +12,11 @@
|
||||
xmlns:mxim="using:Microsoft.Xaml.Interactions.Media"
|
||||
xmlns:shc="using:Snap.Hutao.Control"
|
||||
xmlns:shcb="using:Snap.Hutao.Control.Behavior"
|
||||
xmlns:shci="using:Snap.Hutao.Control.Image"
|
||||
xmlns:shcm="using:Snap.Hutao.Control.Markup"
|
||||
xmlns:shv="using:Snap.Hutao.ViewModel"
|
||||
xmlns:shvc="using:Snap.Hutao.View.Control"
|
||||
xmlns:wsc="using:WinUICommunity.SettingsUI.Controls"
|
||||
d:DataContext="{d:DesignInstance shv:CultivationViewModel}"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
||||
mc:Ignorable="d">
|
||||
@@ -41,272 +43,334 @@
|
||||
<shcb:InvokeCommandOnLoadedBehavior Command="{Binding OpenUICommand}"/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
<Grid>
|
||||
<Rectangle
|
||||
Height="48"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
||||
IsHitTestVisible="False"/>
|
||||
<Pivot>
|
||||
<Pivot.RightHeader>
|
||||
<CommandBar DefaultLabelPosition="Right">
|
||||
<AppBarButton
|
||||
Command="{Binding UpdateStatisticsItemsCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="材料统计">
|
||||
<AppBarButton.Flyout>
|
||||
<Flyout Placement="Bottom">
|
||||
<Flyout.FlyoutPresenterStyle>
|
||||
<Style BasedOn="{StaticResource DefaultFlyoutPresenterStyle}" TargetType="FlyoutPresenter">
|
||||
<Setter Property="MaxHeight" Value="480"/>
|
||||
<Setter Property="Padding" Value="0,2,0,2"/>
|
||||
<Setter Property="Background" Value="{ThemeResource FlyoutPresenterBackground}"/>
|
||||
</Style>
|
||||
</Flyout.FlyoutPresenterStyle>
|
||||
<ItemsControl Margin="16,0,16,16" ItemsSource="{Binding StatisticsItems}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,16,0,0">
|
||||
<Grid Visibility="{Binding Projects, Converter={StaticResource EmptyCollectionToVisibilityConverter}}">
|
||||
<Rectangle
|
||||
Height="48"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
||||
IsHitTestVisible="False"/>
|
||||
<Pivot>
|
||||
<Pivot.RightHeader>
|
||||
<CommandBar DefaultLabelPosition="Right">
|
||||
<AppBarButton
|
||||
Command="{Binding UpdateStatisticsItemsCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="材料统计">
|
||||
<AppBarButton.Flyout>
|
||||
<Flyout Placement="Bottom">
|
||||
<Flyout.FlyoutPresenterStyle>
|
||||
<Style BasedOn="{StaticResource DefaultFlyoutPresenterStyle}" TargetType="FlyoutPresenter">
|
||||
<Setter Property="MaxHeight" Value="480"/>
|
||||
<Setter Property="Padding" Value="0,2,0,2"/>
|
||||
<Setter Property="Background" Value="{ThemeResource FlyoutPresenterBackground}"/>
|
||||
</Style>
|
||||
</Flyout.FlyoutPresenterStyle>
|
||||
<ItemsControl Margin="16,0,16,16" ItemsSource="{Binding StatisticsItems}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,16,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="160"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shvc:ItemIcon
|
||||
Grid.Column="0"
|
||||
Width="32"
|
||||
Height="32"
|
||||
Icon="{Binding Inner.Icon, Converter={StaticResource ItemIconConverter}}"
|
||||
Quality="{Binding Inner.RankLevel}"/>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="16,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Inner.Name}"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
<TextBlock
|
||||
Grid.Column="2"
|
||||
Margin="16,0,4,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding CountFormatted}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Flyout>
|
||||
</AppBarButton.Flyout>
|
||||
</AppBarButton>
|
||||
<AppBarSeparator/>
|
||||
<AppBarElementContainer>
|
||||
<ComboBox
|
||||
Height="36"
|
||||
MinWidth="160"
|
||||
Margin="6,6,6,6"
|
||||
DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding Projects}"
|
||||
SelectedItem="{Binding SelectedProject, Mode=TwoWay}">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:ComboBoxExtendsContentIntoTitleBarWorkaroundBehavior/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</ComboBox>
|
||||
</AppBarElementContainer>
|
||||
<AppBarButton
|
||||
Command="{Binding AddProjectCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="新建计划"/>
|
||||
<AppBarButton
|
||||
Command="{Binding RemoveProjectCommand}"
|
||||
CommandParameter="{Binding SelectedProject, Mode=OneWay}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="删除当前计划"/>
|
||||
</CommandBar>
|
||||
</Pivot.RightHeader>
|
||||
|
||||
<PivotItem Header="材料清单">
|
||||
<Grid>
|
||||
<cwucont:AdaptiveGridView
|
||||
Padding="16,16,4,4"
|
||||
cwua:ItemsReorderAnimation.Duration="0:0:0.1"
|
||||
DesiredWidth="320"
|
||||
ItemContainerStyle="{StaticResource LargeGridViewItemStyle}"
|
||||
ItemsSource="{Binding CultivateEntries}"
|
||||
SelectionMode="None"
|
||||
Visibility="{Binding CultivateEntries, Converter={StaticResource EmptyCollectionToVisibilityConverter}}">
|
||||
<cwucont:AdaptiveGridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Style="{StaticResource BorderCardStyle}">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="160"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shvc:ItemIcon
|
||||
Grid.Column="0"
|
||||
Width="32"
|
||||
Height="32"
|
||||
Icon="{Binding Inner.Icon, Converter={StaticResource ItemIconConverter}}"
|
||||
Quality="{Binding Inner.RankLevel}"/>
|
||||
Width="48"
|
||||
Height="48"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="16,0,0,0"
|
||||
Margin="8,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Inner.Name}"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
<TextBlock
|
||||
Text="{Binding Name}"/>
|
||||
<StackPanel
|
||||
x:Name="ButtonPanel"
|
||||
Grid.Column="2"
|
||||
Margin="16,0,4,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding CountFormatted}"/>
|
||||
Orientation="Horizontal"
|
||||
Visibility="Collapsed">
|
||||
<Button
|
||||
Width="48"
|
||||
Height="48"
|
||||
Margin="8,0,0,0"
|
||||
Command="{Binding Path=DataContext.RemoveEntryCommand, Source={StaticResource BindingProxy}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content=""
|
||||
FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
ToolTipService.ToolTip="删除清单"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Flyout>
|
||||
</AppBarButton.Flyout>
|
||||
</AppBarButton>
|
||||
<AppBarSeparator/>
|
||||
<AppBarElementContainer>
|
||||
<ComboBox
|
||||
Height="36"
|
||||
MinWidth="160"
|
||||
Margin="6,6,6,6"
|
||||
DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding Projects}"
|
||||
SelectedItem="{Binding SelectedProject, Mode=TwoWay}">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:ComboBoxExtendsContentIntoTitleBarWorkaroundBehavior/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</ComboBox>
|
||||
</AppBarElementContainer>
|
||||
<AppBarButton
|
||||
Command="{Binding AddProjectCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="新建计划"/>
|
||||
<AppBarButton
|
||||
Command="{Binding RemoveProjectCommand}"
|
||||
CommandParameter="{Binding SelectedProject, Mode=OneWay}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="删除当前计划"/>
|
||||
</CommandBar>
|
||||
</Pivot.RightHeader>
|
||||
|
||||
<PivotItem Header="材料清单">
|
||||
<cwucont:AdaptiveGridView
|
||||
Padding="16,16,4,4"
|
||||
cwua:ItemsReorderAnimation.Duration="0:0:0.1"
|
||||
DesiredWidth="320"
|
||||
ItemContainerStyle="{StaticResource LargeGridViewItemStyle}"
|
||||
ItemsSource="{Binding CultivateEntries}"
|
||||
SelectionMode="None">
|
||||
<cwucont:AdaptiveGridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Style="{StaticResource BorderCardStyle}">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shvc:ItemIcon
|
||||
Width="48"
|
||||
Height="48"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="8,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Name}"/>
|
||||
<StackPanel
|
||||
x:Name="ButtonPanel"
|
||||
Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
Visibility="Collapsed">
|
||||
<Button
|
||||
Width="48"
|
||||
Height="48"
|
||||
Margin="8,0,0,0"
|
||||
Command="{Binding Path=DataContext.RemoveEntryCommand, Source={StaticResource BindingProxy}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content=""
|
||||
FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
ToolTipService.ToolTip="删除清单"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<ScrollViewer Grid.Row="1" Height="240">
|
||||
<ItemsControl Margin="8,0,8,8" ItemsSource="{Binding Items}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,4,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Width="32"
|
||||
Height="32"
|
||||
Icon="{Binding Inner.Icon, Converter={StaticResource ItemIconConverter}}"
|
||||
Opacity="{Binding IsFinished, Converter={StaticResource BoolToOpacityConverter}}"
|
||||
Quality="{Binding Inner.RankLevel}"/>
|
||||
<FontIcon
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="24"
|
||||
Glyph=""
|
||||
Visibility="{Binding IsFinished, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
||||
</Grid>
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Height="32"
|
||||
Margin="6,0,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
BorderBrush="{x:Null}"
|
||||
BorderThickness="0"
|
||||
Command="{Binding FinishStateCommand}">
|
||||
<Grid Opacity="{Binding IsFinished, Converter={StaticResource BoolToOpacityConverter}}">
|
||||
<ScrollViewer Grid.Row="1" Height="240">
|
||||
<ItemsControl Margin="8,0,8,8" ItemsSource="{Binding Items}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="0,4,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{Binding IsToday, Converter={StaticResource BoolToStyleSelector}}"
|
||||
Text="{Binding Inner.Name}"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
<TextBlock
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Width="32"
|
||||
Height="32"
|
||||
Icon="{Binding Inner.Icon, Converter={StaticResource ItemIconConverter}}"
|
||||
Opacity="{Binding IsFinished, Converter={StaticResource BoolToOpacityConverter}}"
|
||||
Quality="{Binding Inner.RankLevel}"/>
|
||||
<FontIcon
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="24"
|
||||
Glyph=""
|
||||
Visibility="{Binding IsFinished, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
||||
</Grid>
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Style="{Binding IsToday, Converter={StaticResource BoolToStyleSelector}}"
|
||||
Text="{Binding Entity.Count}"/>
|
||||
Height="32"
|
||||
Margin="6,0,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
BorderBrush="{x:Null}"
|
||||
BorderThickness="0"
|
||||
Command="{Binding FinishStateCommand}">
|
||||
<Grid Opacity="{Binding IsFinished, Converter={StaticResource BoolToOpacityConverter}}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{Binding IsToday, Converter={StaticResource BoolToStyleSelector}}"
|
||||
Text="{Binding Inner.Name}"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Style="{Binding IsToday, Converter={StaticResource BoolToStyleSelector}}"
|
||||
Text="{Binding Entity.Count}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
<Grid.Resources>
|
||||
<Storyboard x:Name="ButtonPanelVisibleStoryboard">
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0">
|
||||
<DiscreteObjectKeyFrame.Value>
|
||||
<Visibility>Visible</Visibility>
|
||||
</DiscreteObjectKeyFrame.Value>
|
||||
</DiscreteObjectKeyFrame>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
|
||||
<Grid.Resources>
|
||||
<Storyboard x:Name="ButtonPanelVisibleStoryboard">
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0">
|
||||
<DiscreteObjectKeyFrame.Value>
|
||||
<Visibility>Visible</Visibility>
|
||||
</DiscreteObjectKeyFrame.Value>
|
||||
</DiscreteObjectKeyFrame>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<Storyboard x:Name="ButtonPanelCollapsedStoryboard">
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0">
|
||||
<DiscreteObjectKeyFrame.Value>
|
||||
<Visibility>Collapsed</Visibility>
|
||||
</DiscreteObjectKeyFrame.Value>
|
||||
</DiscreteObjectKeyFrame>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</Grid.Resources>
|
||||
|
||||
<Storyboard x:Name="ButtonPanelCollapsedStoryboard">
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0">
|
||||
<DiscreteObjectKeyFrame.Value>
|
||||
<Visibility>Collapsed</Visibility>
|
||||
</DiscreteObjectKeyFrame.Value>
|
||||
</DiscreteObjectKeyFrame>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</Grid.Resources>
|
||||
|
||||
<mxi:Interaction.Behaviors>
|
||||
<mxic:EventTriggerBehavior EventName="PointerEntered">
|
||||
<mxim:ControlStoryboardAction Storyboard="{StaticResource ButtonPanelVisibleStoryboard}"/>
|
||||
</mxic:EventTriggerBehavior>
|
||||
<mxic:EventTriggerBehavior EventName="PointerExited">
|
||||
<mxim:ControlStoryboardAction Storyboard="{StaticResource ButtonPanelCollapsedStoryboard}"/>
|
||||
</mxic:EventTriggerBehavior>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</cwucont:AdaptiveGridView.ItemTemplate>
|
||||
</cwucont:AdaptiveGridView>
|
||||
</PivotItem>
|
||||
<PivotItem Header="背包物品">
|
||||
<cwucont:AdaptiveGridView
|
||||
Padding="16,16,4,4"
|
||||
ItemContainerStyle="{StaticResource LargeGridViewItemStyle}"
|
||||
ItemsSource="{Binding InventoryItems}"
|
||||
SelectionMode="None">
|
||||
<cwucont:AdaptiveGridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button
|
||||
Padding="0"
|
||||
Background="Transparent"
|
||||
BorderBrush="{x:Null}"
|
||||
BorderThickness="0"
|
||||
CornerRadius="{StaticResource CompatCornerRadius}">
|
||||
<shvc:BottomTextControl Text="{Binding Count, Mode=OneWay}">
|
||||
<shvc:ItemIcon Icon="{Binding Inner.Icon, Converter={StaticResource ItemIconConverter}}" Quality="{Binding Inner.RankLevel}"/>
|
||||
</shvc:BottomTextControl>
|
||||
<Button.Flyout>
|
||||
<Flyout>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{Binding Inner.Name}"/>
|
||||
<NumberBox
|
||||
Grid.Row="1"
|
||||
MinWidth="160"
|
||||
Margin="0,16,0,0"
|
||||
Maximum="4294967295"
|
||||
Minimum="0"
|
||||
Value="{Binding Count, Mode=TwoWay}"/>
|
||||
<mxi:Interaction.Behaviors>
|
||||
<mxic:EventTriggerBehavior EventName="PointerEntered">
|
||||
<mxim:ControlStoryboardAction Storyboard="{StaticResource ButtonPanelVisibleStoryboard}"/>
|
||||
</mxic:EventTriggerBehavior>
|
||||
<mxic:EventTriggerBehavior EventName="PointerExited">
|
||||
<mxim:ControlStoryboardAction Storyboard="{StaticResource ButtonPanelCollapsedStoryboard}"/>
|
||||
</mxic:EventTriggerBehavior>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</Grid>
|
||||
</Flyout>
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</cwucont:AdaptiveGridView.ItemTemplate>
|
||||
</cwucont:AdaptiveGridView>
|
||||
</PivotItem>
|
||||
</Pivot>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</cwucont:AdaptiveGridView.ItemTemplate>
|
||||
</cwucont:AdaptiveGridView>
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding CultivateEntries, Converter={StaticResource EmptyCollectionToVisibilityRevertConverter}}">
|
||||
<wsc:SettingsGroup Margin="0,-36,0,0" HorizontalAlignment="Center">
|
||||
<wsc:Setting
|
||||
Description="添加任意角色到养成计划"
|
||||
Header="角色资料"
|
||||
Icon="{shcm:BitmapIcon Source=ms-appx:///Resource/Icon/UI_BagTabIcon_Avatar.png}">
|
||||
<Button
|
||||
Command="{Binding NavigateToPageCommand}"
|
||||
CommandParameter="Snap.Hutao.View.Page.WikiAvatarPage"
|
||||
Content="前往"/>
|
||||
</wsc:Setting>
|
||||
<wsc:Setting
|
||||
Description="添加任意武器到养成计划"
|
||||
Header="武器资料"
|
||||
Icon="{shcm:BitmapIcon Source=ms-appx:///Resource/Icon/UI_BagTabIcon_Weapon.png}">
|
||||
<Button
|
||||
Command="{Binding NavigateToPageCommand}"
|
||||
CommandParameter="Snap.Hutao.View.Page.WikiWeaponPage"
|
||||
Content="前往"/>
|
||||
</wsc:Setting>
|
||||
<wsc:Setting
|
||||
Description="添加我的角色与武器到养成计划"
|
||||
Header="我的角色"
|
||||
Icon="{shcm:BitmapIcon Source=ms-appx:///Resource/Icon/UI_Icon_BoostUp.png}">
|
||||
<Button
|
||||
Command="{Binding NavigateToPageCommand}"
|
||||
CommandParameter="Snap.Hutao.View.Page.AvatarPropertyPage"
|
||||
Content="前往"/>
|
||||
</wsc:Setting>
|
||||
</wsc:SettingsGroup>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
</PivotItem>
|
||||
<PivotItem Header="背包物品">
|
||||
<cwucont:AdaptiveGridView
|
||||
Padding="16,16,4,4"
|
||||
ItemContainerStyle="{StaticResource LargeGridViewItemStyle}"
|
||||
ItemsSource="{Binding InventoryItems}"
|
||||
SelectionMode="None">
|
||||
<cwucont:AdaptiveGridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button
|
||||
Padding="0"
|
||||
Background="Transparent"
|
||||
BorderBrush="{x:Null}"
|
||||
BorderThickness="0"
|
||||
CornerRadius="{StaticResource CompatCornerRadius}">
|
||||
<shvc:BottomTextControl Text="{Binding Count, Mode=OneWay}">
|
||||
<shvc:ItemIcon Icon="{Binding Inner.Icon, Converter={StaticResource ItemIconConverter}}" Quality="{Binding Inner.RankLevel}"/>
|
||||
</shvc:BottomTextControl>
|
||||
<Button.Flyout>
|
||||
<Flyout>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="{Binding Inner.Name}"/>
|
||||
<NumberBox
|
||||
Grid.Row="1"
|
||||
MinWidth="160"
|
||||
Margin="0,16,0,0"
|
||||
Maximum="4294967295"
|
||||
Minimum="0"
|
||||
Value="{Binding Count, Mode=TwoWay}"/>
|
||||
</Grid>
|
||||
</Flyout>
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</cwucont:AdaptiveGridView.ItemTemplate>
|
||||
</cwucont:AdaptiveGridView>
|
||||
</PivotItem>
|
||||
</Pivot>
|
||||
</Grid>
|
||||
|
||||
<Grid Visibility="{Binding Projects, Converter={StaticResource EmptyCollectionToVisibilityRevertConverter}}">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<shci:CachedImage
|
||||
Width="120"
|
||||
Height="120"
|
||||
Source="https://static.snapgenshin.com/EmotionIcon/UI_EmotionIcon293.png"/>
|
||||
<TextBlock
|
||||
Margin="0,16,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="新建养成计划以继续"/>
|
||||
<wsc:SettingsGroup Margin="0,-36,0,0" HorizontalAlignment="Center">
|
||||
<wsc:Setting
|
||||
Description="稍后可以前往其他页面添加养成计划项"
|
||||
Header="新建计划"
|
||||
Icon="{shcm:FontIcon Glyph=}">
|
||||
<Button Command="{Binding AddProjectCommand}" Content="新建"/>
|
||||
</wsc:Setting>
|
||||
</wsc:SettingsGroup>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</shc:ScopedPage>
|
||||
|
||||
@@ -106,6 +106,15 @@
|
||||
</RadioButtons.ItemTemplate>
|
||||
</RadioButtons>
|
||||
<wsc:SettingsGroup Margin="0,-16,0,0" Header="通知">
|
||||
<wsc:Setting
|
||||
Description="在我游玩原神时不通知我"
|
||||
Header="免打扰模式"
|
||||
Icon="">
|
||||
<ToggleSwitch
|
||||
Margin="24,0,0,0"
|
||||
IsOn="{Binding IsSilentWhenPlayingGame, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchSettingStyle}"/>
|
||||
</wsc:Setting>
|
||||
<wsc:Setting
|
||||
Description="防止通知自动收入操作中心"
|
||||
Header="提醒通知"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
xmlns:shcm="using:Snap.Hutao.Control.Markup"
|
||||
xmlns:shv="using:Snap.Hutao.ViewModel"
|
||||
xmlns:shvc="using:Snap.Hutao.View.Control"
|
||||
xmlns:wsc="using:WinUICommunity.SettingsUI.Controls"
|
||||
d:DataContext="{d:DesignInstance shv:GachaLogViewModel}"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
||||
mc:Ignorable="d">
|
||||
@@ -20,461 +21,486 @@
|
||||
</mxi:Interaction.Behaviors>
|
||||
|
||||
<Grid Visibility="{Binding IsInitialized, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<Rectangle
|
||||
Height="48"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
||||
IsHitTestVisible="False"/>
|
||||
<Pivot>
|
||||
<Pivot.LeftHeader>
|
||||
<ComboBox
|
||||
Height="36"
|
||||
MinWidth="120"
|
||||
Margin="16,6,0,6"
|
||||
DisplayMemberPath="Uid"
|
||||
ItemsSource="{Binding Archives}"
|
||||
SelectedItem="{Binding SelectedArchive, Mode=TwoWay}">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:ComboBoxExtendsContentIntoTitleBarWorkaroundBehavior/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</ComboBox>
|
||||
</Pivot.LeftHeader>
|
||||
<Pivot.RightHeader>
|
||||
<CommandBar DefaultLabelPosition="Right">
|
||||
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="刷新">
|
||||
<AppBarButton.Flyout>
|
||||
<MenuFlyout Placement="Bottom">
|
||||
<MenuFlyoutItem
|
||||
Command="{Binding RefreshByStokenCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Text="Stoken刷新"/>
|
||||
<MenuFlyoutItem
|
||||
Command="{Binding RefreshByWebCacheCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Text="从缓存刷新"/>
|
||||
<MenuFlyoutItem
|
||||
Command="{Binding RefreshByManualInputCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Text="手动输入Url"/>
|
||||
<ToggleMenuFlyoutItem
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
IsChecked="{Binding IsAggressiveRefresh}"
|
||||
Text="全量刷新"/>
|
||||
</MenuFlyout>
|
||||
</AppBarButton.Flyout>
|
||||
</AppBarButton>
|
||||
<AppBarSeparator/>
|
||||
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="导入">
|
||||
<AppBarButton.Flyout>
|
||||
<MenuFlyout Placement="Bottom">
|
||||
<MenuFlyoutItem Command="{Binding ImportFromUIGFJsonCommand}" Text="从 UIGF Json 文件导入"/>
|
||||
<MenuFlyoutItem
|
||||
Command="{Binding ImportFromUIGFExcelCommand}"
|
||||
IsEnabled="False"
|
||||
Text="从 UIGF Excel 文件导入"
|
||||
Visibility="Collapsed"/>
|
||||
</MenuFlyout>
|
||||
</AppBarButton.Flyout>
|
||||
</AppBarButton>
|
||||
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="导出">
|
||||
<AppBarButton.Flyout>
|
||||
<MenuFlyout Placement="Bottom">
|
||||
<MenuFlyoutItem Command="{Binding ExportToUIGFJsonCommand}" Text="导出到 UIGF Json 文件"/>
|
||||
<MenuFlyoutItem
|
||||
Command="{Binding ExportToUIGFExcelCommand}"
|
||||
IsEnabled="False"
|
||||
Text="导出到 UIGF Excel 文件"
|
||||
Visibility="Collapsed"/>
|
||||
</MenuFlyout>
|
||||
</AppBarButton.Flyout>
|
||||
</AppBarButton>
|
||||
<CommandBar.SecondaryCommands>
|
||||
<Grid Visibility="{Binding Statistics, Converter={StaticResource EmptyObjectToVisibilityConverter}}">
|
||||
<Rectangle
|
||||
Height="48"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
||||
IsHitTestVisible="False"/>
|
||||
<Pivot>
|
||||
<Pivot.LeftHeader>
|
||||
<ComboBox
|
||||
Height="36"
|
||||
MinWidth="120"
|
||||
Margin="16,6,0,6"
|
||||
DisplayMemberPath="Uid"
|
||||
ItemsSource="{Binding Archives}"
|
||||
SelectedItem="{Binding SelectedArchive, Mode=TwoWay}">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:ComboBoxExtendsContentIntoTitleBarWorkaroundBehavior/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</ComboBox>
|
||||
</Pivot.LeftHeader>
|
||||
<Pivot.RightHeader>
|
||||
<CommandBar DefaultLabelPosition="Right">
|
||||
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="刷新">
|
||||
<AppBarButton.Flyout>
|
||||
<MenuFlyout Placement="Bottom">
|
||||
<MenuFlyoutItem
|
||||
Command="{Binding RefreshByStokenCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Text="Stoken 刷新"/>
|
||||
<MenuFlyoutItem
|
||||
Command="{Binding RefreshByWebCacheCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Text="网页缓存刷新"/>
|
||||
<MenuFlyoutItem
|
||||
Command="{Binding RefreshByManualInputCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Text="手动输入 Url"/>
|
||||
<ToggleMenuFlyoutItem
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
IsChecked="{Binding IsAggressiveRefresh}"
|
||||
Text="全量刷新"/>
|
||||
</MenuFlyout>
|
||||
</AppBarButton.Flyout>
|
||||
</AppBarButton>
|
||||
<AppBarSeparator/>
|
||||
<AppBarButton
|
||||
Command="{Binding RemoveArchiveCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="删除当前存档"/>
|
||||
</CommandBar.SecondaryCommands>
|
||||
</CommandBar>
|
||||
</Pivot.RightHeader>
|
||||
<PivotItem Header="总览">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MaxWidth="388"/>
|
||||
<ColumnDefinition MaxWidth="388"/>
|
||||
<ColumnDefinition MaxWidth="388"/>
|
||||
<ColumnDefinition Width="auto" MinWidth="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shvc:StatisticsCard
|
||||
Grid.Column="0"
|
||||
Margin="16,16,0,16"
|
||||
DataContext="{Binding Statistics.AvatarWish}"/>
|
||||
<shvc:StatisticsCard
|
||||
Grid.Column="1"
|
||||
Margin="16,16,0,16"
|
||||
DataContext="{Binding Statistics.WeaponWish}"/>
|
||||
<shvc:StatisticsCard
|
||||
Grid.Column="2"
|
||||
Margin="16,16,0,16"
|
||||
DataContext="{Binding Statistics.PermanentWish}"/>
|
||||
</Grid>
|
||||
</PivotItem>
|
||||
<PivotItem Header="历史">
|
||||
<SplitView
|
||||
DisplayMode="Inline"
|
||||
IsPaneOpen="True"
|
||||
OpenPaneLength="296"
|
||||
PaneBackground="Transparent">
|
||||
<SplitView.Pane>
|
||||
<ListView ItemsSource="{Binding Statistics.HistoryWishes}" SelectedItem="{Binding SelectedHistoryWish, Mode=TwoWay}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Margin="0,8,0,0" Orientation="Horizontal">
|
||||
Command="{Binding ImportFromUIGFJsonCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="导入"/>
|
||||
<AppBarButton
|
||||
Command="{Binding ExportToUIGFJsonCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="导出"/>
|
||||
<CommandBar.SecondaryCommands>
|
||||
<AppBarButton
|
||||
Command="{Binding RemoveArchiveCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="删除当前存档"/>
|
||||
</CommandBar.SecondaryCommands>
|
||||
</CommandBar>
|
||||
</Pivot.RightHeader>
|
||||
<PivotItem Header="总览">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MaxWidth="388"/>
|
||||
<ColumnDefinition MaxWidth="388"/>
|
||||
<ColumnDefinition MaxWidth="388"/>
|
||||
<ColumnDefinition Width="auto" MinWidth="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shvc:StatisticsCard
|
||||
Grid.Column="0"
|
||||
Margin="16,16,0,16"
|
||||
DataContext="{Binding Statistics.AvatarWish}"/>
|
||||
<shvc:StatisticsCard
|
||||
Grid.Column="1"
|
||||
Margin="16,16,0,16"
|
||||
DataContext="{Binding Statistics.WeaponWish}"/>
|
||||
<shvc:StatisticsCard
|
||||
Grid.Column="2"
|
||||
Margin="16,16,0,16"
|
||||
DataContext="{Binding Statistics.PermanentWish}"/>
|
||||
</Grid>
|
||||
</PivotItem>
|
||||
<PivotItem Header="历史">
|
||||
<SplitView
|
||||
DisplayMode="Inline"
|
||||
IsPaneOpen="True"
|
||||
OpenPaneLength="296"
|
||||
PaneBackground="Transparent">
|
||||
<SplitView.Pane>
|
||||
<ListView ItemsSource="{Binding Statistics.HistoryWishes}" SelectedItem="{Binding SelectedHistoryWish, Mode=TwoWay}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Margin="0,8,0,0" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="32"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{Binding Version}"/>
|
||||
<TextBlock
|
||||
Margin="0,0,0,0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{Binding Name}"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
Width="32"
|
||||
Margin="0,8,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{Binding Version}"/>
|
||||
<TextBlock
|
||||
Margin="0,0,0,0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{Binding Name}"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
Margin="0,8,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{Binding TotalCountFormatted}"/>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Margin="0,6,0,0"
|
||||
Padding="2"
|
||||
HorizontalAlignment="Left"
|
||||
Background="{StaticResource CardBackgroundFillColorDefault}"
|
||||
CornerRadius="{StaticResource CompatCornerRadiusSmall}">
|
||||
<ItemsControl ItemsSource="{Binding OrangeUpList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="2">
|
||||
<shci:CachedImage
|
||||
Width="32"
|
||||
Height="32"
|
||||
Source="{Binding Icon}"/>
|
||||
<TextBlock
|
||||
Margin="0,2,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
Text="{Binding Count}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Margin="0,6,0,0"
|
||||
Padding="2"
|
||||
HorizontalAlignment="Right"
|
||||
Background="{StaticResource CardBackgroundFillColorDefault}"
|
||||
CornerRadius="{StaticResource CompatCornerRadiusSmall}">
|
||||
<ItemsControl ItemsSource="{Binding PurpleUpList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="2">
|
||||
<shci:CachedImage
|
||||
Width="32"
|
||||
Height="32"
|
||||
Source="{Binding Icon}"/>
|
||||
<TextBlock
|
||||
Margin="0,2,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
Text="{Binding Count}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Margin="0,6,0,8"
|
||||
Opacity="0.6"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Text="{Binding TotalCountFormatted}"/>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Margin="0,6,0,0"
|
||||
Padding="2"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
Text="{Binding FromFormatted}"/>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
Text=" - "/>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
Text="{Binding ToFormatted}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</SplitView.Pane>
|
||||
<SplitView.Content>
|
||||
Background="{StaticResource CardBackgroundFillColorDefault}"
|
||||
CornerRadius="{StaticResource CompatCornerRadiusSmall}">
|
||||
<ItemsControl ItemsSource="{Binding OrangeUpList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="2">
|
||||
<shci:CachedImage
|
||||
Width="32"
|
||||
Height="32"
|
||||
Source="{Binding Icon}"/>
|
||||
<TextBlock
|
||||
Margin="0,2,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
Text="{Binding Count}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Margin="0,6,0,0"
|
||||
Padding="2"
|
||||
HorizontalAlignment="Right"
|
||||
Background="{StaticResource CardBackgroundFillColorDefault}"
|
||||
CornerRadius="{StaticResource CompatCornerRadiusSmall}">
|
||||
<ItemsControl ItemsSource="{Binding PurpleUpList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Margin="2">
|
||||
<shci:CachedImage
|
||||
Width="32"
|
||||
Height="32"
|
||||
Source="{Binding Icon}"/>
|
||||
<TextBlock
|
||||
Margin="0,2,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
Text="{Binding Count}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Margin="0,6,0,8"
|
||||
Opacity="0.6"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
Text="{Binding FromFormatted}"/>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
Text=" - "/>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
Text="{Binding ToFormatted}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</SplitView.Pane>
|
||||
<SplitView.Content>
|
||||
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="16,0,16,0">
|
||||
<Border
|
||||
Margin="0,16,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
BorderBrush="{StaticResource CardStrokeColorDefault}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="{StaticResource CompatCornerRadius}">
|
||||
<shci:CachedImage MaxHeight="320" Source="{Binding SelectedHistoryWish.BannerImage}"/>
|
||||
</Border>
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="16,0,16,0">
|
||||
<Border
|
||||
Margin="0,16,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
BorderBrush="{StaticResource CardStrokeColorDefault}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="{StaticResource CompatCornerRadius}">
|
||||
<shci:CachedImage MaxHeight="320" Source="{Binding SelectedHistoryWish.BannerImage}"/>
|
||||
</Border>
|
||||
|
||||
<TextBlock
|
||||
Margin="0,16,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="五星"/>
|
||||
<GridView ItemsSource="{Binding SelectedHistoryWish.OrangeList}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
<TextBlock
|
||||
Margin="0,16,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="五星"/>
|
||||
<GridView ItemsSource="{Binding SelectedHistoryWish.OrangeList}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
|
||||
<TextBlock
|
||||
Margin="0,0,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="四星"/>
|
||||
<GridView ItemsSource="{Binding SelectedHistoryWish.PurpleList}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
<TextBlock
|
||||
Margin="0,0,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="四星"/>
|
||||
<GridView ItemsSource="{Binding SelectedHistoryWish.PurpleList}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
|
||||
<TextBlock
|
||||
Margin="0,0,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="三星"/>
|
||||
<GridView ItemsSource="{Binding SelectedHistoryWish.BlueList}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</SplitView.Content>
|
||||
</SplitView>
|
||||
</PivotItem>
|
||||
<PivotItem Header="角色">
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="16,0,16,0">
|
||||
<TextBlock
|
||||
Margin="0,16,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="五星"/>
|
||||
<GridView ItemsSource="{Binding Statistics.OrangeAvatars}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
<TextBlock
|
||||
Margin="0,0,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="三星"/>
|
||||
<GridView ItemsSource="{Binding SelectedHistoryWish.BlueList}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</SplitView.Content>
|
||||
</SplitView>
|
||||
</PivotItem>
|
||||
<PivotItem Header="角色">
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="16,0,16,0">
|
||||
<TextBlock
|
||||
Margin="0,16,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="五星"/>
|
||||
<GridView ItemsSource="{Binding Statistics.OrangeAvatars}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
|
||||
<TextBlock
|
||||
Margin="0,0,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="四星"/>
|
||||
<GridView ItemsSource="{Binding Statistics.PurpleAvatars}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</PivotItem>
|
||||
<PivotItem Header="武器">
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="16,0,16,0">
|
||||
<TextBlock
|
||||
Margin="0,16,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="五星"/>
|
||||
<GridView ItemsSource="{Binding Statistics.OrangeWeapons}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
<TextBlock
|
||||
Margin="0,0,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="四星"/>
|
||||
<GridView ItemsSource="{Binding Statistics.PurpleAvatars}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</PivotItem>
|
||||
<PivotItem Header="武器">
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="16,0,16,0">
|
||||
<TextBlock
|
||||
Margin="0,16,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="五星"/>
|
||||
<GridView ItemsSource="{Binding Statistics.OrangeWeapons}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
|
||||
<TextBlock
|
||||
Margin="0,0,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="四星"/>
|
||||
<GridView ItemsSource="{Binding Statistics.PurpleWeapons}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
<TextBlock
|
||||
Margin="0,0,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="四星"/>
|
||||
<GridView ItemsSource="{Binding Statistics.PurpleWeapons}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
|
||||
<TextBlock
|
||||
Margin="0,0,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="三星"/>
|
||||
<GridView ItemsSource="{Binding Statistics.BlueWeapons}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</PivotItem>
|
||||
</Pivot>
|
||||
<TextBlock
|
||||
Margin="0,0,0,8"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="三星"/>
|
||||
<GridView ItemsSource="{Binding Statistics.BlueWeapons}" SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<shvc:ItemIcon
|
||||
Badge="{Binding Badge}"
|
||||
Icon="{Binding Icon}"
|
||||
Quality="{Binding Quality}"/>
|
||||
<Border
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Background="#80000000"
|
||||
CornerRadius="0,6,0,6">
|
||||
<TextBlock
|
||||
Margin="6,0,6,2"
|
||||
Foreground="#FFFFFFFF"
|
||||
Text="{Binding Count}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</PivotItem>
|
||||
</Pivot>
|
||||
</Grid>
|
||||
<Grid Visibility="{Binding Statistics, Converter={StaticResource EmptyObjectToVisibilityRevertConverter}}">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<shci:CachedImage
|
||||
Width="120"
|
||||
Height="120"
|
||||
Source="https://static.snapgenshin.com/EmotionIcon/UI_EmotionIcon71.png"/>
|
||||
<TextBlock
|
||||
Margin="0,16,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="尚未获取任何祈愿记录"/>
|
||||
<wsc:SettingsGroup Margin="0,-36,0,0" HorizontalAlignment="Center">
|
||||
<wsc:Setting
|
||||
Description="使用当前账号的Cookie信息刷新祈愿记录"
|
||||
Header="Stoken 刷新"
|
||||
Icon="{shcm:FontIcon Glyph=}">
|
||||
<Button Command="{Binding RefreshByStokenCommand}" Content="获取"/>
|
||||
</wsc:Setting>
|
||||
<wsc:Setting
|
||||
Description="使用游戏内浏览器的网页缓存刷新祈愿记录"
|
||||
Header="网页缓存刷新"
|
||||
Icon="{shcm:FontIcon Glyph=}">
|
||||
<Button Command="{Binding RefreshByWebCacheCommand}" Content="获取"/>
|
||||
</wsc:Setting>
|
||||
<wsc:Setting
|
||||
Description="使用由你提供的 Url 刷新祈愿记录"
|
||||
Header="手动输入 Url"
|
||||
Icon="{shcm:FontIcon Glyph=}">
|
||||
<Button Command="{Binding RefreshByManualInputCommand}" Content="输入"/>
|
||||
</wsc:Setting>
|
||||
<wsc:Setting
|
||||
Description="导入从其他 App 中导出的数据"
|
||||
Header="导入 UIGF Json"
|
||||
Icon="{shcm:FontIcon Glyph=}">
|
||||
<Button Command="{Binding ImportFromUIGFJsonCommand}" Content="导入"/>
|
||||
</wsc:Setting>
|
||||
</wsc:SettingsGroup>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</shc:ScopedPage>
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:mxi="using:Microsoft.Xaml.Interactivity"
|
||||
xmlns:shc="using:Snap.Hutao.Control"
|
||||
xmlns:shcb="using:Snap.Hutao.Control.Behavior"
|
||||
xmlns:shci="using:Snap.Hutao.Control.Image"
|
||||
xmlns:shcm="using:Snap.Hutao.Control.Markup"
|
||||
xmlns:shmbh="using:Snap.Hutao.Model.Binding.Hutao"
|
||||
xmlns:shv="using:Snap.Hutao.ViewModel"
|
||||
@@ -63,7 +64,7 @@
|
||||
</Page.Resources>
|
||||
|
||||
<Grid>
|
||||
<Pivot>
|
||||
<Pivot Visibility="{Binding Overview, Converter={StaticResource EmptyObjectToVisibilityConverter}}">
|
||||
<Pivot.RightHeader>
|
||||
<CommandBar DefaultLabelPosition="Right">
|
||||
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="详情">
|
||||
@@ -330,5 +331,19 @@
|
||||
</Grid>
|
||||
</PivotItem>
|
||||
</Pivot>
|
||||
<cwuc:Loading IsLoading="{Binding Overview, Converter={StaticResource EmptyObjectToBoolRevertConverter}}">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<shci:CachedImage
|
||||
Width="120"
|
||||
Height="120"
|
||||
Source="https://static.snapgenshin.com/EmotionIcon/UI_EmotionIcon272.png"/>
|
||||
<TextBlock
|
||||
Margin="0,16,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="加载中,请稍候"/>
|
||||
<ProgressRing Margin="0,16,0,0" IsActive="True"/>
|
||||
</StackPanel>
|
||||
</cwuc:Loading>
|
||||
</Grid>
|
||||
</shc:ScopedPage>
|
||||
|
||||
@@ -22,31 +22,13 @@
|
||||
</mxi:Interaction.Behaviors>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<CommandBar
|
||||
Grid.Row="0"
|
||||
Background="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
||||
DefaultLabelPosition="Right">
|
||||
<AppBarButton
|
||||
Command="{Binding UploadSpiralAbyssRecordCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="上传数据"/>
|
||||
<AppBarButton
|
||||
Command="{Binding RefreshCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="刷新数据"/>
|
||||
</CommandBar>
|
||||
|
||||
<SplitView
|
||||
Grid.Row="1"
|
||||
DisplayMode="Inline"
|
||||
IsPaneOpen="True"
|
||||
OpenPaneLength="96"
|
||||
PaneBackground="Transparent">
|
||||
PaneBackground="Transparent"
|
||||
Visibility="{Binding SpiralAbyssEntries, Converter={StaticResource EmptyCollectionToVisibilityConverter}}">
|
||||
<SplitView.Pane>
|
||||
<ListView ItemsSource="{Binding SpiralAbyssEntries}" SelectedItem="{Binding SelectedEntry, Mode=TwoWay}">
|
||||
<ListView.ItemTemplate>
|
||||
@@ -57,9 +39,21 @@
|
||||
</ListView>
|
||||
</SplitView.Pane>
|
||||
<SplitView.Content>
|
||||
<Grid DataContext="{Binding SpiralAbyssView}">
|
||||
<Grid>
|
||||
<Pivot>
|
||||
<PivotItem Header="统计数据">
|
||||
<Pivot.RightHeader>
|
||||
<CommandBar Grid.Row="0" DefaultLabelPosition="Right">
|
||||
<AppBarButton
|
||||
Command="{Binding UploadSpiralAbyssRecordCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="上传数据"/>
|
||||
<AppBarButton
|
||||
Command="{Binding RefreshCommand}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="刷新数据"/>
|
||||
</CommandBar>
|
||||
</Pivot.RightHeader>
|
||||
<PivotItem DataContext="{Binding SpiralAbyssView}" Header="统计数据">
|
||||
<ScrollViewer>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -163,7 +157,7 @@
|
||||
|
||||
</ScrollViewer>
|
||||
</PivotItem>
|
||||
<PivotItem Header="详细数据">
|
||||
<PivotItem DataContext="{Binding SpiralAbyssView}" Header="详细数据">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto">
|
||||
<ItemsControl
|
||||
Margin="16,16,0,0"
|
||||
@@ -287,5 +281,27 @@
|
||||
</Grid>
|
||||
</SplitView.Content>
|
||||
</SplitView>
|
||||
<Grid Visibility="{Binding SpiralAbyssEntries, Converter={StaticResource EmptyCollectionToVisibilityRevertConverter}}">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<shci:CachedImage
|
||||
Width="120"
|
||||
Height="120"
|
||||
Source="https://static.snapgenshin.com/EmotionIcon/UI_EmotionIcon25.png"/>
|
||||
<TextBlock
|
||||
Margin="0,16,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="尚未获取任何挑战记录"/>
|
||||
<wsc:SettingsGroup Margin="0,-36,0,0" HorizontalAlignment="Center">
|
||||
<wsc:Setting
|
||||
Description="同步米游社的深渊挑战记录"
|
||||
Header="刷新数据"
|
||||
Icon="">
|
||||
<Button Command="{Binding RefreshCommand}" Content="刷新"/>
|
||||
</wsc:Setting>
|
||||
</wsc:SettingsGroup>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</shc:ScopedPage>
|
||||
|
||||
</shc:ScopedPage>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -32,215 +32,230 @@
|
||||
</Page.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<CommandBar
|
||||
Grid.Row="0"
|
||||
Background="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
||||
BorderBrush="{x:Null}"
|
||||
BorderThickness="0"
|
||||
DefaultLabelPosition="Right">
|
||||
<CommandBar.Content>
|
||||
<shcp:PanelSelector x:Name="ItemsPanelSelector" Margin="6,8,0,0"/>
|
||||
</CommandBar.Content>
|
||||
<AppBarElementContainer>
|
||||
<AutoSuggestBox
|
||||
Width="240"
|
||||
Height="36"
|
||||
Margin="16,6,6,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalContentAlignment="Center"
|
||||
PlaceholderText="筛选武器"
|
||||
QueryIcon="{shcm:FontIcon Glyph=}"
|
||||
Text="{Binding FilterText, Mode=TwoWay}">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<mxic:EventTriggerBehavior EventName="QuerySubmitted">
|
||||
<mxic:InvokeCommandAction Command="{Binding FilterCommand}" CommandParameter="{Binding FilterText}"/>
|
||||
</mxic:EventTriggerBehavior>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</AutoSuggestBox>
|
||||
</AppBarElementContainer>
|
||||
<AppBarButton
|
||||
Command="{Binding CultivateCommand}"
|
||||
CommandParameter="{Binding Selected}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="养成计算"/>
|
||||
</CommandBar>
|
||||
<SplitView
|
||||
Grid.Row="1"
|
||||
DisplayMode="Inline"
|
||||
IsPaneOpen="True"
|
||||
OpenPaneLength="200"
|
||||
PaneBackground="{StaticResource CardBackgroundFillColorSecondary}">
|
||||
<SplitView.Pane>
|
||||
<cwuc:SwitchPresenter Grid.Row="1" Value="{Binding ElementName=ItemsPanelSelector, Path=Current}">
|
||||
<cwuc:Case Value="List">
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
ItemsSource="{Binding Weapons}"
|
||||
SelectedItem="{Binding Selected, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Visibility="{Binding Weapons, Converter={StaticResource EmptyCollectionToVisibilityConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<CommandBar
|
||||
Grid.Row="0"
|
||||
Background="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
||||
BorderBrush="{x:Null}"
|
||||
BorderThickness="0"
|
||||
DefaultLabelPosition="Right">
|
||||
<CommandBar.Content>
|
||||
<shcp:PanelSelector x:Name="ItemsPanelSelector" Margin="6,8,0,0"/>
|
||||
</CommandBar.Content>
|
||||
<AppBarElementContainer>
|
||||
<AutoSuggestBox
|
||||
Width="240"
|
||||
Height="36"
|
||||
Margin="16,6,6,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalContentAlignment="Center"
|
||||
PlaceholderText="筛选武器"
|
||||
QueryIcon="{shcm:FontIcon Glyph=}"
|
||||
Text="{Binding FilterText, Mode=TwoWay}">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<mxic:EventTriggerBehavior EventName="QuerySubmitted">
|
||||
<mxic:InvokeCommandAction Command="{Binding FilterCommand}" CommandParameter="{Binding FilterText}"/>
|
||||
</mxic:EventTriggerBehavior>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</AutoSuggestBox>
|
||||
</AppBarElementContainer>
|
||||
<AppBarButton
|
||||
Command="{Binding CultivateCommand}"
|
||||
CommandParameter="{Binding Selected}"
|
||||
Icon="{shcm:FontIcon Glyph=}"
|
||||
Label="养成计算"/>
|
||||
</CommandBar>
|
||||
<SplitView
|
||||
Grid.Row="1"
|
||||
DisplayMode="Inline"
|
||||
IsPaneOpen="True"
|
||||
OpenPaneLength="200"
|
||||
PaneBackground="{StaticResource CardBackgroundFillColorSecondary}">
|
||||
<SplitView.Pane>
|
||||
<cwuc:SwitchPresenter Grid.Row="1" Value="{Binding ElementName=ItemsPanelSelector, Path=Current}">
|
||||
<cwuc:Case Value="List">
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
ItemsSource="{Binding Weapons}"
|
||||
SelectedItem="{Binding Selected, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shci:CachedImage
|
||||
Grid.Column="0"
|
||||
Width="48"
|
||||
Height="48"
|
||||
Margin="0,0,12,6"
|
||||
Source="{Binding Icon, Converter={StaticResource EquipIconConverter}, Mode=OneWay}"/>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Name}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</cwuc:Case>
|
||||
<cwuc:Case Value="Grid">
|
||||
<GridView
|
||||
Margin="6,6,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
HorizontalContentAlignment="Left"
|
||||
ItemsSource="{Binding Weapons}"
|
||||
SelectedItem="{Binding Selected, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<shci:CachedImage
|
||||
Grid.Column="0"
|
||||
Width="40"
|
||||
Height="40"
|
||||
Margin="0"
|
||||
Source="{Binding Icon, Converter={StaticResource EquipIconConverter}, Mode=OneWay}"/>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</cwuc:Case>
|
||||
</cwuc:SwitchPresenter>
|
||||
</SplitView.Pane>
|
||||
<SplitView.Content>
|
||||
<ScrollViewer>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MaxWidth="800"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="0,0,20,0">
|
||||
<Border
|
||||
Margin="16,16,0,0"
|
||||
BorderBrush="{StaticResource CardStrokeColorDefault}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="{StaticResource CompatCornerRadius}">
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="ms-appx:///Resource/Icon/UI_GachaShowPanel_Bg_Weapon.png"/>
|
||||
</Border.Background>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shci:CachedImage
|
||||
Grid.Column="0"
|
||||
Width="48"
|
||||
Height="48"
|
||||
Margin="0,0,12,6"
|
||||
Source="{Binding Icon, Converter={StaticResource EquipIconConverter}, Mode=OneWay}"/>
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:AutoHeightBehavior TargetHeight="1024" TargetWidth="2048"/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
<ScrollViewer Grid.Column="0" Margin="16">
|
||||
<StackPanel>
|
||||
<shvc:BottomTextControl RequestedTheme="Light" Text="突破前">
|
||||
<shvc:ItemIcon Icon="{Binding Selected.Icon, Converter={StaticResource EquipIconConverter}}" Quality="{Binding Selected.RankLevel}"/>
|
||||
</shvc:BottomTextControl>
|
||||
|
||||
<shvc:BottomTextControl
|
||||
Margin="0,16,0,0"
|
||||
RequestedTheme="Light"
|
||||
Text="突破后">
|
||||
<shvc:ItemIcon Icon="{Binding Selected.AwakenIcon, Converter={StaticResource EquipIconConverter}}" Quality="{Binding Selected.RankLevel}"/>
|
||||
</shvc:BottomTextControl>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="176*"/>
|
||||
<ColumnDefinition Width="848*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shci:CachedImage
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Stretch"
|
||||
Source="{Binding Selected.Icon, Converter={StaticResource GachaEquipIconConverter}}"/>
|
||||
</Grid>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Name}"/>
|
||||
Margin="16"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{Binding Selected.Name}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</cwuc:Case>
|
||||
<cwuc:Case Value="Grid">
|
||||
<GridView
|
||||
Margin="6,6,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
HorizontalContentAlignment="Left"
|
||||
ItemsSource="{Binding Weapons}"
|
||||
SelectedItem="{Binding Selected, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<shci:CachedImage
|
||||
Grid.Column="0"
|
||||
Width="40"
|
||||
Height="40"
|
||||
Margin="0"
|
||||
Source="{Binding Icon, Converter={StaticResource EquipIconConverter}, Mode=OneWay}"/>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</cwuc:Case>
|
||||
</cwuc:SwitchPresenter>
|
||||
</SplitView.Pane>
|
||||
<SplitView.Content>
|
||||
<ScrollViewer>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MaxWidth="800"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Margin="0,0,20,0">
|
||||
<Border
|
||||
Margin="16,16,0,0"
|
||||
BorderBrush="{StaticResource CardStrokeColorDefault}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="{StaticResource CompatCornerRadius}">
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="ms-appx:///Resource/Icon/UI_GachaShowPanel_Bg_Weapon.png"/>
|
||||
</Border.Background>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:AutoHeightBehavior TargetHeight="1024" TargetWidth="2048"/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
<ScrollViewer Grid.Column="0" Margin="16">
|
||||
<StackPanel>
|
||||
<shvc:BottomTextControl RequestedTheme="Light" Text="突破前">
|
||||
<shvc:ItemIcon Icon="{Binding Selected.Icon, Converter={StaticResource EquipIconConverter}}" Quality="{Binding Selected.RankLevel}"/>
|
||||
</Border>
|
||||
<TextBlock
|
||||
Margin="16,16,0,0"
|
||||
Text="{Binding Selected.Description}"
|
||||
TextWrapping="Wrap"/>
|
||||
<ContentControl
|
||||
Margin="16,16,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Content="{Binding Selected.Property, Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource PropertyDataTemplate}"/>
|
||||
<TextBlock
|
||||
Margin="16,32,0,0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{Binding Selected.Affix.Name}"/>
|
||||
<Pivot ItemsSource="{Binding Selected.Affix.Descriptions}">
|
||||
<Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Style="{StaticResource CaptionTextBlockStyle}" Text="{Binding LevelFormatted}"/>
|
||||
</DataTemplate>
|
||||
</Pivot.HeaderTemplate>
|
||||
<Pivot.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<shct:DescriptionTextBlock Margin="16,16,0,0" Description="{Binding Description}">
|
||||
<shct:DescriptionTextBlock.Resources>
|
||||
<Style BasedOn="{StaticResource BodyTextBlockStyle}" TargetType="TextBlock">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
</Style>
|
||||
</shct:DescriptionTextBlock.Resources>
|
||||
</shct:DescriptionTextBlock>
|
||||
</DataTemplate>
|
||||
</Pivot.ItemTemplate>
|
||||
</Pivot>
|
||||
<TextBlock
|
||||
Margin="16,32,0,0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="搭配角色"/>
|
||||
<GridView
|
||||
Margin="16,16,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
ItemsSource="{Binding Selected.Collocation.Avatars}"
|
||||
SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<shvc:BottomTextControl Text="{Binding Rate}" ToolTipService.ToolTip="{Binding Name}">
|
||||
<shvc:ItemIcon Icon="{Binding Icon}" Quality="{Binding Quality}"/>
|
||||
</shvc:BottomTextControl>
|
||||
|
||||
<shvc:BottomTextControl
|
||||
Margin="0,16,0,0"
|
||||
RequestedTheme="Light"
|
||||
Text="突破后">
|
||||
<shvc:ItemIcon Icon="{Binding Selected.AwakenIcon, Converter={StaticResource EquipIconConverter}}" Quality="{Binding Selected.RankLevel}"/>
|
||||
</shvc:BottomTextControl>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="176*"/>
|
||||
<ColumnDefinition Width="848*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<shci:CachedImage
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Stretch"
|
||||
Source="{Binding Selected.Icon, Converter={StaticResource GachaEquipIconConverter}}"/>
|
||||
</Grid>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="16"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{Binding Selected.Name}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<TextBlock
|
||||
Margin="16,16,0,0"
|
||||
Text="{Binding Selected.Description}"
|
||||
TextWrapping="Wrap"/>
|
||||
<ContentControl
|
||||
Margin="16,16,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Content="{Binding Selected.Property, Mode=OneWay}"
|
||||
ContentTemplate="{StaticResource PropertyDataTemplate}"/>
|
||||
<TextBlock
|
||||
Margin="16,32,0,0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="{Binding Selected.Affix.Name}"/>
|
||||
<Pivot ItemsSource="{Binding Selected.Affix.Descriptions}">
|
||||
<Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Style="{StaticResource CaptionTextBlockStyle}" Text="{Binding LevelFormatted}"/>
|
||||
</DataTemplate>
|
||||
</Pivot.HeaderTemplate>
|
||||
<Pivot.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<shct:DescriptionTextBlock Margin="16,16,0,0" Description="{Binding Description}">
|
||||
<shct:DescriptionTextBlock.Resources>
|
||||
<Style BasedOn="{StaticResource BodyTextBlockStyle}" TargetType="TextBlock">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
</Style>
|
||||
</shct:DescriptionTextBlock.Resources>
|
||||
</shct:DescriptionTextBlock>
|
||||
</DataTemplate>
|
||||
</Pivot.ItemTemplate>
|
||||
</Pivot>
|
||||
<TextBlock
|
||||
Margin="16,32,0,0"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="搭配角色"/>
|
||||
<GridView
|
||||
Margin="16,16,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
ItemsSource="{Binding Selected.Collocation.Avatars}"
|
||||
SelectionMode="None">
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<shvc:BottomTextControl Text="{Binding Rate}" ToolTipService.ToolTip="{Binding Name}">
|
||||
<shvc:ItemIcon Icon="{Binding Icon}" Quality="{Binding Quality}"/>
|
||||
</shvc:BottomTextControl>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</SplitView.Content>
|
||||
</SplitView>
|
||||
</DataTemplate>
|
||||
</GridView.ItemTemplate>
|
||||
</GridView>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</SplitView.Content>
|
||||
</SplitView>
|
||||
</Grid>
|
||||
<cwuc:Loading IsLoading="{Binding Weapons, Converter={StaticResource EmptyCollectionToBoolRevertConverter}}">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<shci:CachedImage
|
||||
Width="120"
|
||||
Height="120"
|
||||
Source="https://static.snapgenshin.com/EmotionIcon/UI_EmotionIcon272.png"/>
|
||||
<TextBlock
|
||||
Margin="0,16,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="加载中,请稍候"/>
|
||||
<ProgressRing Margin="0,16,0,0" IsActive="True"/>
|
||||
</StackPanel>
|
||||
</cwuc:Loading>
|
||||
</Grid>
|
||||
|
||||
</shc:ScopedPage>
|
||||
|
||||
@@ -62,128 +62,135 @@
|
||||
</Style>
|
||||
</Flyout.FlyoutPresenterStyle>
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
Margin="10,6,0,6"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="角色"/>
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
Margin="4"
|
||||
CanReorderItems="True"
|
||||
ItemsSource="{Binding SelectedUser.UserGameRoles}"
|
||||
SelectedItem="{Binding SelectedUser.SelectedUserGameRole, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Padding="0,6">
|
||||
<TextBlock Text="{Binding Nickname}"/>
|
||||
<TextBlock
|
||||
Margin="0,2,0,0"
|
||||
Opacity="0.6"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Description}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
<MenuFlyoutSeparator/>
|
||||
<TextBlock
|
||||
Margin="10,6,0,6"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="账号"/>
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
MaxHeight="224"
|
||||
Margin="4"
|
||||
ItemsSource="{Binding Users}"
|
||||
SelectedItem="{Binding SelectedUser, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid
|
||||
Width="200"
|
||||
Padding="0,12"
|
||||
Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<PersonPicture
|
||||
Height="32"
|
||||
Margin="0,0"
|
||||
HorizontalAlignment="Left"
|
||||
ProfilePicture="{Binding UserInfo.AvatarUrl, Mode=OneWay}"/>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding UserInfo.Nickname}"/>
|
||||
|
||||
<StackPanel
|
||||
x:Name="ButtonPanel"
|
||||
Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
Visibility="Collapsed">
|
||||
<Button
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
BorderBrush="{x:Null}"
|
||||
BorderThickness="0"
|
||||
Command="{Binding DataContext.CopyCookieCommand, Source={StaticResource ViewModelBindingProxy}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content=""
|
||||
FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
ToolTipService.ToolTip="复制 Cookie"/>
|
||||
<Button
|
||||
Margin="6,0,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
BorderBrush="{x:Null}"
|
||||
BorderThickness="0"
|
||||
Command="{Binding DataContext.RemoveUserCommand, Source={StaticResource ViewModelBindingProxy}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content=""
|
||||
FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
ToolTipService.ToolTip="移除用户"/>
|
||||
<StackPanel Visibility="{Binding Users, Converter={StaticResource EmptyCollectionToVisibilityConverter}}">
|
||||
<TextBlock
|
||||
Margin="10,6,0,6"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="角色"/>
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
Margin="4"
|
||||
CanReorderItems="True"
|
||||
ItemsSource="{Binding SelectedUser.UserGameRoles}"
|
||||
SelectedItem="{Binding SelectedUser.SelectedUserGameRole, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Padding="0,6">
|
||||
<TextBlock Text="{Binding Nickname}"/>
|
||||
<TextBlock
|
||||
Margin="0,2,0,0"
|
||||
Opacity="0.6"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding Description}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
<MenuFlyoutSeparator/>
|
||||
<TextBlock
|
||||
Margin="10,6,0,6"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
Text="账号"/>
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
MaxHeight="224"
|
||||
Margin="4"
|
||||
ItemsSource="{Binding Users}"
|
||||
SelectedItem="{Binding SelectedUser, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid
|
||||
Width="200"
|
||||
Padding="0,12"
|
||||
Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<PersonPicture
|
||||
Height="32"
|
||||
Margin="0,0"
|
||||
HorizontalAlignment="Left"
|
||||
ProfilePicture="{Binding UserInfo.AvatarUrl, Mode=OneWay}"/>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding UserInfo.Nickname}"/>
|
||||
|
||||
<Grid.Resources>
|
||||
<Storyboard x:Name="ButtonPanelVisibleStoryboard">
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0">
|
||||
<DiscreteObjectKeyFrame.Value>
|
||||
<Visibility>Visible</Visibility>
|
||||
</DiscreteObjectKeyFrame.Value>
|
||||
</DiscreteObjectKeyFrame>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<StackPanel
|
||||
x:Name="ButtonPanel"
|
||||
Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
Visibility="Collapsed">
|
||||
<Button
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
BorderBrush="{x:Null}"
|
||||
BorderThickness="0"
|
||||
Command="{Binding DataContext.CopyCookieCommand, Source={StaticResource ViewModelBindingProxy}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content=""
|
||||
FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
ToolTipService.ToolTip="复制 Cookie"/>
|
||||
<Button
|
||||
Margin="6,0,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
BorderBrush="{x:Null}"
|
||||
BorderThickness="0"
|
||||
Command="{Binding DataContext.RemoveUserCommand, Source={StaticResource ViewModelBindingProxy}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content=""
|
||||
FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
ToolTipService.ToolTip="移除用户"/>
|
||||
</StackPanel>
|
||||
|
||||
<Storyboard x:Name="ButtonPanelCollapsedStoryboard">
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0">
|
||||
<DiscreteObjectKeyFrame.Value>
|
||||
<Visibility>Collapsed</Visibility>
|
||||
</DiscreteObjectKeyFrame.Value>
|
||||
</DiscreteObjectKeyFrame>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</Grid.Resources>
|
||||
<Grid.Resources>
|
||||
<Storyboard x:Name="ButtonPanelVisibleStoryboard">
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0">
|
||||
<DiscreteObjectKeyFrame.Value>
|
||||
<Visibility>Visible</Visibility>
|
||||
</DiscreteObjectKeyFrame.Value>
|
||||
</DiscreteObjectKeyFrame>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
|
||||
<mxi:Interaction.Behaviors>
|
||||
<mxic:EventTriggerBehavior EventName="PointerEntered">
|
||||
<mxim:ControlStoryboardAction Storyboard="{StaticResource ButtonPanelVisibleStoryboard}"/>
|
||||
</mxic:EventTriggerBehavior>
|
||||
<mxic:EventTriggerBehavior EventName="PointerExited">
|
||||
<mxim:ControlStoryboardAction Storyboard="{StaticResource ButtonPanelCollapsedStoryboard}"/>
|
||||
</mxic:EventTriggerBehavior>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
<Storyboard x:Name="ButtonPanelCollapsedStoryboard">
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0">
|
||||
<DiscreteObjectKeyFrame.Value>
|
||||
<Visibility>Collapsed</Visibility>
|
||||
</DiscreteObjectKeyFrame.Value>
|
||||
</DiscreteObjectKeyFrame>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</Grid.Resources>
|
||||
|
||||
<mxi:Interaction.Behaviors>
|
||||
<mxic:EventTriggerBehavior EventName="PointerEntered">
|
||||
<mxim:ControlStoryboardAction Storyboard="{StaticResource ButtonPanelVisibleStoryboard}"/>
|
||||
</mxic:EventTriggerBehavior>
|
||||
<mxic:EventTriggerBehavior EventName="PointerExited">
|
||||
<mxim:ControlStoryboardAction Storyboard="{StaticResource ButtonPanelCollapsedStoryboard}"/>
|
||||
</mxic:EventTriggerBehavior>
|
||||
</mxi:Interaction.Behaviors>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
Margin="10,6,0,6"
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="请先登录"
|
||||
Visibility="{Binding Users, Converter={StaticResource EmptyCollectionToVisibilityRevertConverter}}"/>
|
||||
<TextBlock
|
||||
Margin="10,6,0,6"
|
||||
Style="{StaticResource BaseTextBlockStyle}"
|
||||
|
||||
@@ -286,11 +286,6 @@ internal class AchievementViewModel
|
||||
|
||||
Archives = achievementService.GetArchiveCollection();
|
||||
SelectedArchive = Archives.SingleOrDefault(a => a.IsSelected == true);
|
||||
|
||||
if (SelectedArchive == null)
|
||||
{
|
||||
infoBarService.Warning("请创建一个成就存档");
|
||||
}
|
||||
}
|
||||
catch (TaskCanceledException)
|
||||
{
|
||||
|
||||
@@ -74,7 +74,6 @@ internal class AnnouncementViewModel : ObservableObject, ISupportCancellation
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
logger.LogInformation($"{nameof(OpenUIAsync)} cancelled");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ using Snap.Hutao.Model.Entity;
|
||||
using Snap.Hutao.Service.Abstraction;
|
||||
using Snap.Hutao.Service.Cultivation;
|
||||
using Snap.Hutao.Service.Metadata;
|
||||
using Snap.Hutao.Service.Navigation;
|
||||
using Snap.Hutao.View.Dialog;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
@@ -58,6 +59,7 @@ internal class CultivationViewModel : ObservableObject, ISupportCancellation
|
||||
RemoveEntryCommand = asyncRelayCommandFactory.Create<Model.Binding.Cultivation.CultivateEntry>(RemoveEntryAsync);
|
||||
SaveInventoryItemCommand = new RelayCommand<Model.Binding.Inventory.InventoryItem>(SaveInventoryItem);
|
||||
UpdateStatisticsItemsCommand = asyncRelayCommandFactory.Create(UpdateStatisticsItemsAsync);
|
||||
NavigateToPageCommand = new RelayCommand<string>(NavigateToPage);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
@@ -131,6 +133,11 @@ internal class CultivationViewModel : ObservableObject, ISupportCancellation
|
||||
/// </summary>
|
||||
public ICommand UpdateStatisticsItemsCommand { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航到指定的页面命令
|
||||
/// </summary>
|
||||
public ICommand NavigateToPageCommand { get; set; }
|
||||
|
||||
private async Task OpenUIAsync()
|
||||
{
|
||||
if (await metadataService.InitializeAsync().ConfigureAwait(true))
|
||||
@@ -154,6 +161,9 @@ internal class CultivationViewModel : ObservableObject, ISupportCancellation
|
||||
{
|
||||
case ProjectAddResult.Added:
|
||||
infoBarService.Success($"添加成功");
|
||||
|
||||
await ThreadHelper.SwitchToMainThreadAsync();
|
||||
SelectedProject = project;
|
||||
break;
|
||||
case ProjectAddResult.InvalidName:
|
||||
infoBarService.Information($"不能添加名称无效的计划");
|
||||
@@ -228,4 +238,13 @@ internal class CultivationViewModel : ObservableObject, ISupportCancellation
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void NavigateToPage(string? typeString)
|
||||
{
|
||||
if (typeString != null)
|
||||
{
|
||||
Type? pageType = Type.GetType(typeString);
|
||||
Ioc.Default.GetRequiredService<INavigationService>().Navigate(pageType!, INavigationAwaiter.Default, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,9 @@ internal class DailyNoteViewModel : ObservableObject, ISupportCancellation
|
||||
|
||||
private SettingEntry? refreshSecondsEntry;
|
||||
private SettingEntry? reminderNotifyEntry;
|
||||
private SettingEntry? silentModeEntry;
|
||||
private ObservableCollection<DailyNoteEntry>? dailyNoteEntries;
|
||||
private bool isSilentWhenPlayingGame;
|
||||
|
||||
/// <summary>
|
||||
/// 构造一个新的实时便笺视图模型
|
||||
@@ -115,6 +117,22 @@ internal class DailyNoteViewModel : ObservableObject, ISupportCancellation
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否开启免打扰模式
|
||||
/// </summary>
|
||||
public bool IsSilentWhenPlayingGame
|
||||
{
|
||||
get => isSilentWhenPlayingGame;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref isSilentWhenPlayingGame, value))
|
||||
{
|
||||
silentModeEntry!.SetBoolean(value);
|
||||
appDbContext.Settings.UpdateAndSave(silentModeEntry!);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用户与角色集合
|
||||
/// </summary>
|
||||
@@ -164,11 +182,17 @@ internal class DailyNoteViewModel : ObservableObject, ISupportCancellation
|
||||
ScheduleTaskHelper.RegisterForDailyNoteRefresh(480);
|
||||
OnPropertyChanged(nameof(SelectedRefreshTime));
|
||||
|
||||
reminderNotifyEntry = appDbContext.Settings.SingleOrAdd(SettingEntry.DailyNoteReminderNotify, false.ToString());
|
||||
reminderNotifyEntry = appDbContext.Settings.SingleOrAdd(SettingEntry.DailyNoteReminderNotify, SettingEntryHelper.FalseString);
|
||||
isReminderNotification = reminderNotifyEntry.GetBoolean();
|
||||
OnPropertyChanged(nameof(IsReminderNotification));
|
||||
|
||||
DailyNoteEntries = await dailyNoteService.GetDailyNoteEntriesAsync().ConfigureAwait(true);
|
||||
silentModeEntry = appDbContext.Settings.SingleOrAdd(SettingEntry.DailyNoteSilentWhenPlayingGame, SettingEntryHelper.FalseString);
|
||||
isSilentWhenPlayingGame = silentModeEntry.GetBoolean();
|
||||
OnPropertyChanged(nameof(IsSilentWhenPlayingGame));
|
||||
|
||||
ObservableCollection<DailyNoteEntry> temp = await dailyNoteService.GetDailyNoteEntriesAsync().ConfigureAwait(false);
|
||||
await ThreadHelper.SwitchToMainThreadAsync();
|
||||
DailyNoteEntries = temp;
|
||||
}
|
||||
|
||||
private async Task TrackRoleAsync(UserAndRole? role)
|
||||
|
||||
@@ -184,11 +184,6 @@ internal class GachaLogViewModel : ObservableObject, ISupportCancellation
|
||||
Archives = gachaLogService.GetArchiveCollection();
|
||||
SelectedArchive = Archives.SingleOrDefault(a => a.IsSelected == true);
|
||||
|
||||
if (SelectedArchive == null)
|
||||
{
|
||||
infoBarService.Information("请刷新或导入祈愿记录");
|
||||
}
|
||||
|
||||
await ThreadHelper.SwitchToMainThreadAsync();
|
||||
IsInitialized = true;
|
||||
}
|
||||
|
||||
@@ -120,6 +120,12 @@ internal class UserViewModel : ObservableObject
|
||||
switch (optionResult)
|
||||
{
|
||||
case UserOptionResult.Added:
|
||||
if (Users!.Count == 1)
|
||||
{
|
||||
await ThreadHelper.SwitchToMainThreadAsync();
|
||||
SelectedUser = Users.Single();
|
||||
}
|
||||
|
||||
infoBarService.Success($"用户 [{uid}] 添加成功");
|
||||
break;
|
||||
case UserOptionResult.Incomplete:
|
||||
|
||||
@@ -124,7 +124,7 @@ public class MiHoYoJSInterface
|
||||
[JsMethod("getDS")]
|
||||
public virtual JsResult<Dictionary<string, string>> GetDynamicSecrectV1(JsParam param)
|
||||
{
|
||||
string salt = DynamicSecretHandler.DynamicSecrets[nameof(SaltType.LK2)];
|
||||
string salt = Core.CoreEnvironment.DynamicSecrets[nameof(SaltType.LK2)];
|
||||
long t = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||
string r = GetRandomString();
|
||||
string check = Md5Convert.ToHexString($"salt={salt}&t={t}&r={r}").ToLowerInvariant();
|
||||
@@ -155,7 +155,7 @@ public class MiHoYoJSInterface
|
||||
[JsMethod("getDS2")]
|
||||
public virtual JsResult<Dictionary<string, string>> GetDynamicSecrectV2(JsParam<DynamicSecrect2Playload> param)
|
||||
{
|
||||
string salt = DynamicSecretHandler.DynamicSecrets[nameof(SaltType.X4)];
|
||||
string salt = Core.CoreEnvironment.DynamicSecrets[nameof(SaltType.X4)];
|
||||
long t = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||
int r = GetRandom();
|
||||
string b = param.Payload.Body;
|
||||
|
||||
@@ -15,19 +15,6 @@ namespace Snap.Hutao.Web.Hoyolab.DynamicSecret;
|
||||
[Injection(InjectAs.Transient)]
|
||||
public class DynamicSecretHandler : DelegatingHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// 盐
|
||||
/// </summary>
|
||||
// https://github.com/UIGF-org/Hoyolab.Salt
|
||||
public static readonly ImmutableDictionary<string, string> DynamicSecrets = new Dictionary<string, string>()
|
||||
{
|
||||
[nameof(SaltType.K2)] = "jrU9ULHGZdM9Os3uGHOpjyRELYxby5cg",
|
||||
[nameof(SaltType.LK2)] = "9gaxOdeeY2W9dw5x62pywhik8cxy5TIJ",
|
||||
[nameof(SaltType.X4)] = "xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs",
|
||||
[nameof(SaltType.X6)] = "t0qEgfub6cvueAPgR5m9aQWWVciEer7v",
|
||||
[nameof(SaltType.PROD)] = "JwYDpKvLj6MrMqqYU6jTKF17KNO2PXoS",
|
||||
}.ToImmutableDictionary();
|
||||
|
||||
private const string RandomRange = "abcdefghijklmnopqrstuvwxyz1234567890";
|
||||
|
||||
/// <inheritdoc/>
|
||||
@@ -40,7 +27,7 @@ public class DynamicSecretHandler : DelegatingHandler
|
||||
string saltType = definations[1];
|
||||
bool includeChars = definations[2] == "true";
|
||||
|
||||
string salt = DynamicSecrets[saltType];
|
||||
string salt = Core.CoreEnvironment.DynamicSecrets[saltType];
|
||||
|
||||
long t = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user