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'
|
project: $(Build.SourcesDirectory)/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj'
|
||||||
buildPlatform: 'x64'
|
buildPlatform: 'x64'
|
||||||
buildConfiguration: 'Release'
|
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:
|
steps:
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
<shmmc:AvatarSideIconConverter x:Key="AvatarSideIconConverter"/>
|
<shmmc:AvatarSideIconConverter x:Key="AvatarSideIconConverter"/>
|
||||||
<shmmc:DescParamDescriptor x:Key="DescParamDescriptor"/>
|
<shmmc:DescParamDescriptor x:Key="DescParamDescriptor"/>
|
||||||
<shmmc:ElementNameIconConverter x:Key="ElementNameIconConverter"/>
|
<shmmc:ElementNameIconConverter x:Key="ElementNameIconConverter"/>
|
||||||
|
<shmmc:EmotionIconConverter x:Key="EmotionIconConverter"/>
|
||||||
<shmmc:EquipIconConverter x:Key="EquipIconConverter"/>
|
<shmmc:EquipIconConverter x:Key="EquipIconConverter"/>
|
||||||
<shmmc:GachaAvatarImgConverter x:Key="GachaAvatarImgConverter"/>
|
<shmmc:GachaAvatarImgConverter x:Key="GachaAvatarImgConverter"/>
|
||||||
<shmmc:GachaAvatarIconConverter x:Key="GachaAvatarIconConverter"/>
|
<shmmc:GachaAvatarIconConverter x:Key="GachaAvatarIconConverter"/>
|
||||||
@@ -61,8 +62,14 @@
|
|||||||
<shmmc:QualityColorConverter x:Key="QualityColorConverter"/>
|
<shmmc:QualityColorConverter x:Key="QualityColorConverter"/>
|
||||||
<shmmc:WeaponTypeIconConverter x:Key="WeaponTypeIconConverter"/>
|
<shmmc:WeaponTypeIconConverter x:Key="WeaponTypeIconConverter"/>
|
||||||
<shvc:BoolToVisibilityRevertConverter x:Key="BoolToVisibilityRevertConverter"/>
|
<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:EmptyObjectToVisibilityConverter x:Key="EmptyObjectToVisibilityConverter"/>
|
||||||
|
<shvc:EmptyObjectToVisibilityRevertConverter x:Key="EmptyObjectToVisibilityRevertConverter"/>
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
<Style
|
<Style
|
||||||
x:Key="LargeGridViewItemStyle"
|
x:Key="LargeGridViewItemStyle"
|
||||||
@@ -70,7 +77,6 @@
|
|||||||
TargetType="GridViewItem">
|
TargetType="GridViewItem">
|
||||||
<Setter Property="Margin" Value="0,0,12,12"/>
|
<Setter Property="Margin" Value="0,0,12,12"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style
|
<Style
|
||||||
x:Key="SettingButtonStyle"
|
x:Key="SettingButtonStyle"
|
||||||
BasedOn="{StaticResource DefaultButtonStyle}"
|
BasedOn="{StaticResource DefaultButtonStyle}"
|
||||||
@@ -81,7 +87,6 @@
|
|||||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="BorderCardStyle" TargetType="Border">
|
<Style x:Key="BorderCardStyle" TargetType="Border">
|
||||||
<Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}"/>
|
<Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}"/>
|
||||||
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}"/>
|
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}"/>
|
||||||
@@ -92,7 +97,6 @@
|
|||||||
<ItemsPanelTemplate x:Key="ItemsStackPanelTemplate">
|
<ItemsPanelTemplate x:Key="ItemsStackPanelTemplate">
|
||||||
<ItemsStackPanel/>
|
<ItemsStackPanel/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
|
|
||||||
<ItemsPanelTemplate x:Key="HorizontalStackPanelTemplate">
|
<ItemsPanelTemplate x:Key="HorizontalStackPanelTemplate">
|
||||||
<StackPanel Orientation="Horizontal"/>
|
<StackPanel Orientation="Horizontal"/>
|
||||||
</ItemsPanelTemplate>
|
</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.Convert;
|
||||||
using Snap.Hutao.Core.Json;
|
using Snap.Hutao.Core.Json;
|
||||||
using Snap.Hutao.Extension;
|
using Snap.Hutao.Extension;
|
||||||
|
using Snap.Hutao.Web.Hoyolab.DynamicSecret;
|
||||||
|
using System.Collections.Immutable;
|
||||||
using System.Text.Json.Serialization.Metadata;
|
using System.Text.Json.Serialization.Metadata;
|
||||||
using Windows.ApplicationModel;
|
using Windows.ApplicationModel;
|
||||||
|
|
||||||
@@ -28,7 +30,20 @@ internal static class CoreEnvironment
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 米游社 Rpc 版本
|
/// 米游社 Rpc 版本
|
||||||
/// </summary>
|
/// </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>
|
/// <summary>
|
||||||
/// 标准UA
|
/// 标准UA
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ public class SettingEntry
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const string DailyNoteReminderNotify = "DailyNote.ReminderNotify";
|
public const string DailyNoteReminderNotify = "DailyNote.ReminderNotify";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 实时便笺免打扰模式
|
||||||
|
/// </summary>
|
||||||
|
public const string DailyNoteSilentWhenPlayingGame = "DailyNote.SilentWhenPlayingGame";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 启动游戏 全屏
|
/// 启动游戏 全屏
|
||||||
/// </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);
|
return IconNameToUri(from);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<Identity
|
<Identity
|
||||||
Name="7f0db578-026f-4e0b-a75b-d5d06bb0a74d"
|
Name="7f0db578-026f-4e0b-a75b-d5d06bb0a74d"
|
||||||
Publisher="CN=DGP Studio"
|
Publisher="CN=DGP Studio"
|
||||||
Version="1.3.0.0" />
|
Version="1.3.1.0" />
|
||||||
|
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>胡桃</DisplayName>
|
<DisplayName>胡桃</DisplayName>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"profiles": {
|
"profiles": {
|
||||||
"Snap.Hutao (Package)": {
|
"Snap.Hutao (Package)": {
|
||||||
"commandName": "MsixPackage",
|
"commandName": "MsixPackage",
|
||||||
"nativeDebugging": true,
|
"nativeDebugging": false,
|
||||||
"doNotLaunchApp": false
|
"doNotLaunchApp": false
|
||||||
},
|
},
|
||||||
"Snap.Hutao (Unpackaged)": {
|
"Snap.Hutao (Unpackaged)": {
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
@@ -167,41 +167,38 @@ internal class DailyNoteNotifier
|
|||||||
builder.SetToastScenario(ToastScenario.Reminder);
|
builder.SetToastScenario(ToastScenario.Reminder);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Desktop and Mobile started supporting adaptive toasts in API contract 3 (Anniversary Update)
|
if (notifyInfos.Count > 2)
|
||||||
if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3))
|
|
||||||
{
|
{
|
||||||
AdaptiveGroup group = new();
|
builder.AddText("多个提醒项达到设定值");
|
||||||
foreach (NotifyInfo info in notifyInfos)
|
|
||||||
|
// 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,
|
AdaptiveSubgroup subgroup = new()
|
||||||
Children =
|
{
|
||||||
|
HintWeight = 1,
|
||||||
|
Children =
|
||||||
{
|
{
|
||||||
new AdaptiveImage() { Source = info.AdaptiveIcon, HintRemoveMargin = true, },
|
new AdaptiveImage() { Source = info.AdaptiveIcon, HintRemoveMargin = true, },
|
||||||
new AdaptiveText() { Text = info.AdaptiveHint, HintAlign = AdaptiveTextAlign.Center, },
|
new AdaptiveText() { Text = info.AdaptiveHint, HintAlign = AdaptiveTextAlign.Center, },
|
||||||
new AdaptiveText() { Text = info.Title, HintAlign = AdaptiveTextAlign.Center, HintStyle = AdaptiveTextStyle.CaptionSubtle, },
|
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
|
else
|
||||||
{
|
{
|
||||||
if (notifyInfos.Count > 2)
|
foreach (NotifyInfo info in notifyInfos)
|
||||||
{
|
{
|
||||||
builder.AddText("多个提醒项达到设定值");
|
builder.AddText(info.Hint);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach (NotifyInfo info in notifyInfos)
|
|
||||||
{
|
|
||||||
builder.AddText(info.Hint);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ using Snap.Hutao.Message;
|
|||||||
using Snap.Hutao.Model.Binding.User;
|
using Snap.Hutao.Model.Binding.User;
|
||||||
using Snap.Hutao.Model.Entity;
|
using Snap.Hutao.Model.Entity;
|
||||||
using Snap.Hutao.Model.Entity.Database;
|
using Snap.Hutao.Model.Entity.Database;
|
||||||
|
using Snap.Hutao.Service.Game;
|
||||||
using Snap.Hutao.Service.User;
|
using Snap.Hutao.Service.User;
|
||||||
using Snap.Hutao.Web.Hoyolab.Takumi.GameRecord;
|
using Snap.Hutao.Web.Hoyolab.Takumi.GameRecord;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
@@ -96,6 +97,13 @@ internal class DailyNoteService : IDailyNoteService, IRecipient<UserRemovedMessa
|
|||||||
AppDbContext appDbContext = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
AppDbContext appDbContext = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||||
GameRecordClient gameRecordClient = scope.ServiceProvider.GetRequiredService<GameRecordClient>();
|
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))
|
foreach (DailyNoteEntry entry in appDbContext.DailyNotes.Include(n => n.User))
|
||||||
{
|
{
|
||||||
WebDailyNote? dailyNote = await gameRecordClient.GetDailyNoteAsync(entry.User, entry.Uid).ConfigureAwait(false);
|
WebDailyNote? dailyNote = await gameRecordClient.GetDailyNoteAsync(entry.User, entry.Uid).ConfigureAwait(false);
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ internal class GameService : IGameService, IDisposable
|
|||||||
|
|
||||||
if (!result.IsOk)
|
if (!result.IsOk)
|
||||||
{
|
{
|
||||||
// Try locate manually
|
// Try locate by registry
|
||||||
locator = gameLocators.Single(l => l.Name == nameof(RegistryLauncherLocator));
|
locator = gameLocators.Single(l => l.Name == nameof(RegistryLauncherLocator));
|
||||||
result = await locator.LocateGamePathAsync().ConfigureAwait(false);
|
result = await locator.LocateGamePathAsync().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
|
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
|
||||||
<PackageCertificateThumbprint>F8C2255969BEA4A681CED102771BF807856AEC02</PackageCertificateThumbprint>
|
<PackageCertificateThumbprint>F8C2255969BEA4A681CED102771BF807856AEC02</PackageCertificateThumbprint>
|
||||||
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
|
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
|
||||||
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
|
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
|
||||||
<AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
|
<AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
|
||||||
<GenerateTestArtifacts>True</GenerateTestArtifacts>
|
<GenerateTestArtifacts>True</GenerateTestArtifacts>
|
||||||
<AppxBundle>Never</AppxBundle>
|
<AppxBundle>Never</AppxBundle>
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
<None Remove="LaunchGameWindow.xaml" />
|
<None Remove="LaunchGameWindow.xaml" />
|
||||||
<None Remove="NativeMethods.json" />
|
<None Remove="NativeMethods.json" />
|
||||||
<None Remove="NativeMethods.txt" />
|
<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_Avatar.png" />
|
||||||
<None Remove="Resource\Icon\UI_BagTabIcon_Weapon.png" />
|
<None Remove="Resource\Icon\UI_BagTabIcon_Weapon.png" />
|
||||||
<None Remove="Resource\Icon\UI_BtnIcon_ActivityEntry.png" />
|
<None Remove="Resource\Icon\UI_BtnIcon_ActivityEntry.png" />
|
||||||
@@ -119,6 +120,7 @@
|
|||||||
<Content Include="Assets\StoreLogo.png" />
|
<Content Include="Assets\StoreLogo.png" />
|
||||||
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
|
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
|
||||||
<Content Include="Resource\Font\Segoe Fluent Icons.ttf" />
|
<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_Avatar.png" />
|
||||||
<Content Include="Resource\Icon\UI_BagTabIcon_Weapon.png" />
|
<Content Include="Resource\Icon\UI_BagTabIcon_Weapon.png" />
|
||||||
<Content Include="Resource\Icon\UI_BtnIcon_ActivityEntry.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>
|
</mxi:Interaction.Behaviors>
|
||||||
|
|
||||||
<Grid Visibility="{Binding IsInitialized, Converter={StaticResource BoolToVisibilityConverter}}">
|
<Grid Visibility="{Binding IsInitialized, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||||
<Grid.RowDefinitions>
|
<Grid Visibility="{Binding SelectedArchive, Converter={StaticResource EmptyObjectToVisibilityConverter}}">
|
||||||
<RowDefinition Height="auto"/>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition Height="auto"/>
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition/>
|
||||||
<Grid Background="{StaticResource CardBackgroundFillColorDefaultBrush}">
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid Background="{StaticResource CardBackgroundFillColorDefaultBrush}">
|
||||||
<ColumnDefinition Width="252"/>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="252"/>
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="16,0,0,2"
|
Margin="16,0,0,2"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||||
Text="{Binding FinishDescription}"/>
|
Text="{Binding FinishDescription}"/>
|
||||||
|
|
||||||
<CommandBar Grid.Column="1" DefaultLabelPosition="Right">
|
<CommandBar Grid.Column="1" DefaultLabelPosition="Right">
|
||||||
|
|
||||||
<CommandBar.Content>
|
<CommandBar.Content>
|
||||||
<AutoSuggestBox
|
<AutoSuggestBox
|
||||||
Width="240"
|
Width="240"
|
||||||
Height="36"
|
Height="36"
|
||||||
Margin="12,6,6,0"
|
Margin="12,6,6,0"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
PlaceholderText="搜索成就名称,描述或编号"
|
PlaceholderText="搜索成就名称,描述或编号"
|
||||||
QueryIcon="{shcm:FontIcon Glyph=}"
|
QueryIcon="{shcm:FontIcon Glyph=}"
|
||||||
Text="{Binding SearchText, Mode=TwoWay}">
|
Text="{Binding SearchText, Mode=TwoWay}">
|
||||||
<mxi:Interaction.Behaviors>
|
<mxi:Interaction.Behaviors>
|
||||||
<mxic:EventTriggerBehavior EventName="QuerySubmitted">
|
<mxic:EventTriggerBehavior EventName="QuerySubmitted">
|
||||||
<mxic:InvokeCommandAction Command="{Binding SearchAchievementCommand}" CommandParameter="{Binding SearchText}"/>
|
<mxic:InvokeCommandAction Command="{Binding SearchAchievementCommand}" CommandParameter="{Binding SearchText}"/>
|
||||||
</mxic:EventTriggerBehavior>
|
</mxic:EventTriggerBehavior>
|
||||||
</mxi:Interaction.Behaviors>
|
</mxi:Interaction.Behaviors>
|
||||||
</AutoSuggestBox>
|
</AutoSuggestBox>
|
||||||
</CommandBar.Content>
|
</CommandBar.Content>
|
||||||
|
|
||||||
<AppBarElementContainer>
|
<AppBarElementContainer>
|
||||||
<ComboBox
|
<ComboBox
|
||||||
Height="36"
|
Height="36"
|
||||||
MinWidth="120"
|
MinWidth="120"
|
||||||
Margin="2,6,3,6"
|
Margin="2,6,3,6"
|
||||||
DisplayMemberPath="Name"
|
DisplayMemberPath="Name"
|
||||||
ItemsSource="{Binding Archives, Mode=OneWay}"
|
ItemsSource="{Binding Archives, Mode=OneWay}"
|
||||||
SelectedItem="{Binding SelectedArchive, Mode=TwoWay}">
|
SelectedItem="{Binding SelectedArchive, Mode=TwoWay}">
|
||||||
<mxi:Interaction.Behaviors>
|
<mxi:Interaction.Behaviors>
|
||||||
<shcb:ComboBoxExtendsContentIntoTitleBarWorkaroundBehavior/>
|
<shcb:ComboBoxExtendsContentIntoTitleBarWorkaroundBehavior/>
|
||||||
</mxi:Interaction.Behaviors>
|
</mxi:Interaction.Behaviors>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</AppBarElementContainer>
|
</AppBarElementContainer>
|
||||||
<AppBarButton
|
<AppBarButton
|
||||||
Command="{Binding AddArchiveCommand}"
|
Command="{Binding AddArchiveCommand}"
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
Label="创建新存档"/>
|
Label="创建新存档"/>
|
||||||
<AppBarButton
|
<AppBarButton
|
||||||
Command="{Binding RemoveArchiveCommand}"
|
Command="{Binding RemoveArchiveCommand}"
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
Label="删除当前存档"/>
|
Label="删除当前存档"/>
|
||||||
<AppBarSeparator/>
|
<AppBarSeparator/>
|
||||||
|
|
||||||
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="导入">
|
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="导入">
|
||||||
<AppBarButton.Flyout>
|
<AppBarButton.Flyout>
|
||||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
||||||
<MenuFlyoutItem
|
<MenuFlyoutItem
|
||||||
Command="{Binding ImportUIAFFromClipboardCommand}"
|
Command="{Binding ImportUIAFFromClipboardCommand}"
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
Text="从剪贴板导入"/>
|
Text="从剪贴板导入"/>
|
||||||
<MenuFlyoutItem
|
<MenuFlyoutItem
|
||||||
Command="{Binding ImportUIAFFromFileCommand}"
|
Command="{Binding ImportUIAFFromFileCommand}"
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
Text="从 UIAF 文件导入"/>
|
Text="从 UIAF 文件导入"/>
|
||||||
</MenuFlyout>
|
</MenuFlyout>
|
||||||
</AppBarButton.Flyout>
|
</AppBarButton.Flyout>
|
||||||
</AppBarButton>
|
</AppBarButton>
|
||||||
<AppBarButton
|
<AppBarButton
|
||||||
Command="{Binding ExportAsUIAFToFileCommand}"
|
Command="{Binding ExportAsUIAFToFileCommand}"
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
Label="导出"/>
|
Label="导出"/>
|
||||||
<AppBarSeparator/>
|
<AppBarSeparator/>
|
||||||
|
|
||||||
<AppBarToggleButton
|
<AppBarToggleButton
|
||||||
Command="{Binding SortIncompletedSwitchCommand}"
|
Command="{Binding SortIncompletedSwitchCommand}"
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
IsChecked="{Binding IsIncompletedItemsFirst}"
|
IsChecked="{Binding IsIncompletedItemsFirst}"
|
||||||
Label="优先未完成"/>
|
Label="优先未完成"/>
|
||||||
</CommandBar>
|
</CommandBar>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<SplitView
|
<SplitView
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
DisplayMode="Inline"
|
DisplayMode="Inline"
|
||||||
IsPaneOpen="True"
|
IsPaneOpen="True"
|
||||||
OpenPaneLength="252"
|
OpenPaneLength="252"
|
||||||
PaneBackground="Transparent">
|
PaneBackground="Transparent">
|
||||||
<SplitView.Pane>
|
<SplitView.Pane>
|
||||||
<ListView
|
<ListView
|
||||||
ItemsSource="{Binding AchievementGoals}"
|
ItemsSource="{Binding AchievementGoals}"
|
||||||
SelectedItem="{Binding SelectedAchievementGoal, Mode=TwoWay}"
|
SelectedItem="{Binding SelectedAchievementGoal, Mode=TwoWay}"
|
||||||
SelectionMode="Single">
|
SelectionMode="Single">
|
||||||
<ListView.ItemTemplate>
|
<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>
|
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid
|
<Grid Margin="0,6">
|
||||||
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>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="36"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
<shci:CachedImage
|
||||||
<CheckBox
|
Grid.Column="0"
|
||||||
Grid.Column="1"
|
Width="36"
|
||||||
Margin="6,0,12,0"
|
Height="36"
|
||||||
Padding="16,0,0,0"
|
Source="{Binding Icon}"/>
|
||||||
Command="{Binding Path=DataContext.SaveAchievementCommand, Source={StaticResource BindingProxy}}"
|
<StackPanel Grid.Column="1" Margin="12,0,0,2">
|
||||||
CommandParameter="{Binding}"
|
<TextBlock VerticalAlignment="Center" Text="{Binding Name}"/>
|
||||||
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
|
<TextBlock
|
||||||
Grid.Column="0"
|
Margin="0,2,0,0"
|
||||||
Margin="12,0,12,0"
|
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{Binding Time}"
|
Opacity="0.7"
|
||||||
Visibility="{Binding IsChecked, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
<Image
|
Text="{Binding FinishDescription}"/>
|
||||||
Grid.Column="1"
|
<ProgressBar
|
||||||
Height="32"
|
Height="1"
|
||||||
Source="ms-appx:///Resource/Icon/UI_ItemIcon_201.png"/>
|
MinHeight="1"
|
||||||
<TextBlock
|
Margin="0,4,0,0"
|
||||||
Grid.Column="2"
|
Maximum="1"
|
||||||
Margin="12,0,0,0"
|
Value="{Binding FinishPercent}"/>
|
||||||
VerticalAlignment="Center"
|
</StackPanel>
|
||||||
Text="{Binding Inner.FinishReward.Count}"/>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
</ItemsControl>
|
</ListView>
|
||||||
</ScrollViewer>
|
</SplitView.Pane>
|
||||||
</SplitView.Content>
|
|
||||||
</SplitView>
|
<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>
|
</Grid>
|
||||||
</shc:ScopedPage>
|
</shc:ScopedPage>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -12,9 +12,11 @@
|
|||||||
xmlns:mxim="using:Microsoft.Xaml.Interactions.Media"
|
xmlns:mxim="using:Microsoft.Xaml.Interactions.Media"
|
||||||
xmlns:shc="using:Snap.Hutao.Control"
|
xmlns:shc="using:Snap.Hutao.Control"
|
||||||
xmlns:shcb="using:Snap.Hutao.Control.Behavior"
|
xmlns:shcb="using:Snap.Hutao.Control.Behavior"
|
||||||
|
xmlns:shci="using:Snap.Hutao.Control.Image"
|
||||||
xmlns:shcm="using:Snap.Hutao.Control.Markup"
|
xmlns:shcm="using:Snap.Hutao.Control.Markup"
|
||||||
xmlns:shv="using:Snap.Hutao.ViewModel"
|
xmlns:shv="using:Snap.Hutao.ViewModel"
|
||||||
xmlns:shvc="using:Snap.Hutao.View.Control"
|
xmlns:shvc="using:Snap.Hutao.View.Control"
|
||||||
|
xmlns:wsc="using:WinUICommunity.SettingsUI.Controls"
|
||||||
d:DataContext="{d:DesignInstance shv:CultivationViewModel}"
|
d:DataContext="{d:DesignInstance shv:CultivationViewModel}"
|
||||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
@@ -41,272 +43,334 @@
|
|||||||
<shcb:InvokeCommandOnLoadedBehavior Command="{Binding OpenUICommand}"/>
|
<shcb:InvokeCommandOnLoadedBehavior Command="{Binding OpenUICommand}"/>
|
||||||
</mxi:Interaction.Behaviors>
|
</mxi:Interaction.Behaviors>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Rectangle
|
<Grid Visibility="{Binding Projects, Converter={StaticResource EmptyCollectionToVisibilityConverter}}">
|
||||||
Height="48"
|
<Rectangle
|
||||||
VerticalAlignment="Top"
|
Height="48"
|
||||||
Fill="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
VerticalAlignment="Top"
|
||||||
IsHitTestVisible="False"/>
|
Fill="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
||||||
<Pivot>
|
IsHitTestVisible="False"/>
|
||||||
<Pivot.RightHeader>
|
<Pivot>
|
||||||
<CommandBar DefaultLabelPosition="Right">
|
<Pivot.RightHeader>
|
||||||
<AppBarButton
|
<CommandBar DefaultLabelPosition="Right">
|
||||||
Command="{Binding UpdateStatisticsItemsCommand}"
|
<AppBarButton
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
Command="{Binding UpdateStatisticsItemsCommand}"
|
||||||
Label="材料统计">
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
<AppBarButton.Flyout>
|
Label="材料统计">
|
||||||
<Flyout Placement="Bottom">
|
<AppBarButton.Flyout>
|
||||||
<Flyout.FlyoutPresenterStyle>
|
<Flyout Placement="Bottom">
|
||||||
<Style BasedOn="{StaticResource DefaultFlyoutPresenterStyle}" TargetType="FlyoutPresenter">
|
<Flyout.FlyoutPresenterStyle>
|
||||||
<Setter Property="MaxHeight" Value="480"/>
|
<Style BasedOn="{StaticResource DefaultFlyoutPresenterStyle}" TargetType="FlyoutPresenter">
|
||||||
<Setter Property="Padding" Value="0,2,0,2"/>
|
<Setter Property="MaxHeight" Value="480"/>
|
||||||
<Setter Property="Background" Value="{ThemeResource FlyoutPresenterBackground}"/>
|
<Setter Property="Padding" Value="0,2,0,2"/>
|
||||||
</Style>
|
<Setter Property="Background" Value="{ThemeResource FlyoutPresenterBackground}"/>
|
||||||
</Flyout.FlyoutPresenterStyle>
|
</Style>
|
||||||
<ItemsControl Margin="16,0,16,16" ItemsSource="{Binding StatisticsItems}">
|
</Flyout.FlyoutPresenterStyle>
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl Margin="16,0,16,16" ItemsSource="{Binding StatisticsItems}">
|
||||||
<DataTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<Grid Margin="0,16,0,0">
|
<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>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="auto"/>
|
<ColumnDefinition Width="auto"/>
|
||||||
<ColumnDefinition Width="160"/>
|
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<shvc:ItemIcon
|
<shvc:ItemIcon
|
||||||
Grid.Column="0"
|
Width="48"
|
||||||
Width="32"
|
Height="48"
|
||||||
Height="32"
|
Icon="{Binding Icon}"
|
||||||
Icon="{Binding Inner.Icon, Converter={StaticResource ItemIconConverter}}"
|
Quality="{Binding Quality}"/>
|
||||||
Quality="{Binding Inner.RankLevel}"/>
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="16,0,0,0"
|
Margin="8,0,0,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{Binding Inner.Name}"
|
Text="{Binding Name}"/>
|
||||||
TextTrimming="CharacterEllipsis"/>
|
<StackPanel
|
||||||
<TextBlock
|
x:Name="ButtonPanel"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Margin="16,0,4,0"
|
Orientation="Horizontal"
|
||||||
HorizontalAlignment="Right"
|
Visibility="Collapsed">
|
||||||
VerticalAlignment="Center"
|
<Button
|
||||||
Text="{Binding CountFormatted}"/>
|
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>
|
</Grid>
|
||||||
</DataTemplate>
|
<ScrollViewer Grid.Row="1" Height="240">
|
||||||
</ItemsControl.ItemTemplate>
|
<ItemsControl Margin="8,0,8,8" ItemsSource="{Binding Items}">
|
||||||
</ItemsControl>
|
<ItemsControl.ItemTemplate>
|
||||||
</Flyout>
|
<DataTemplate>
|
||||||
</AppBarButton.Flyout>
|
<Grid Margin="0,4,0,0">
|
||||||
</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}}">
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="auto"/>
|
<ColumnDefinition Width="auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock
|
<Grid>
|
||||||
Grid.Column="0"
|
<shvc:ItemIcon
|
||||||
Margin="0,0,0,0"
|
Width="32"
|
||||||
VerticalAlignment="Center"
|
Height="32"
|
||||||
Style="{Binding IsToday, Converter={StaticResource BoolToStyleSelector}}"
|
Icon="{Binding Inner.Icon, Converter={StaticResource ItemIconConverter}}"
|
||||||
Text="{Binding Inner.Name}"
|
Opacity="{Binding IsFinished, Converter={StaticResource BoolToOpacityConverter}}"
|
||||||
TextTrimming="CharacterEllipsis"/>
|
Quality="{Binding Inner.RankLevel}"/>
|
||||||
<TextBlock
|
<FontIcon
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontSize="24"
|
||||||
|
Glyph=""
|
||||||
|
Visibility="{Binding IsFinished, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
||||||
|
</Grid>
|
||||||
|
<Button
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
HorizontalAlignment="Right"
|
Height="32"
|
||||||
VerticalAlignment="Center"
|
Margin="6,0,0,0"
|
||||||
Style="{Binding IsToday, Converter={StaticResource BoolToStyleSelector}}"
|
HorizontalAlignment="Stretch"
|
||||||
Text="{Binding Entity.Count}"/>
|
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>
|
</Grid>
|
||||||
</Button>
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</ScrollViewer>
|
||||||
|
|
||||||
</Grid>
|
<Grid.Resources>
|
||||||
</DataTemplate>
|
<Storyboard x:Name="ButtonPanelVisibleStoryboard">
|
||||||
</ItemsControl.ItemTemplate>
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
||||||
</ItemsControl>
|
<DiscreteObjectKeyFrame KeyTime="0">
|
||||||
</ScrollViewer>
|
<DiscreteObjectKeyFrame.Value>
|
||||||
|
<Visibility>Visible</Visibility>
|
||||||
|
</DiscreteObjectKeyFrame.Value>
|
||||||
|
</DiscreteObjectKeyFrame>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
|
||||||
<Grid.Resources>
|
<Storyboard x:Name="ButtonPanelCollapsedStoryboard">
|
||||||
<Storyboard x:Name="ButtonPanelVisibleStoryboard">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
<DiscreteObjectKeyFrame KeyTime="0">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0">
|
<DiscreteObjectKeyFrame.Value>
|
||||||
<DiscreteObjectKeyFrame.Value>
|
<Visibility>Collapsed</Visibility>
|
||||||
<Visibility>Visible</Visibility>
|
</DiscreteObjectKeyFrame.Value>
|
||||||
</DiscreteObjectKeyFrame.Value>
|
</DiscreteObjectKeyFrame>
|
||||||
</DiscreteObjectKeyFrame>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</Storyboard>
|
||||||
</Storyboard>
|
</Grid.Resources>
|
||||||
|
|
||||||
<Storyboard x:Name="ButtonPanelCollapsedStoryboard">
|
<mxi:Interaction.Behaviors>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
<mxic:EventTriggerBehavior EventName="PointerEntered">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0">
|
<mxim:ControlStoryboardAction Storyboard="{StaticResource ButtonPanelVisibleStoryboard}"/>
|
||||||
<DiscreteObjectKeyFrame.Value>
|
</mxic:EventTriggerBehavior>
|
||||||
<Visibility>Collapsed</Visibility>
|
<mxic:EventTriggerBehavior EventName="PointerExited">
|
||||||
</DiscreteObjectKeyFrame.Value>
|
<mxim:ControlStoryboardAction Storyboard="{StaticResource ButtonPanelCollapsedStoryboard}"/>
|
||||||
</DiscreteObjectKeyFrame>
|
</mxic:EventTriggerBehavior>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</mxi:Interaction.Behaviors>
|
||||||
</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}"/>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Flyout>
|
</Border>
|
||||||
</Button.Flyout>
|
</DataTemplate>
|
||||||
</Button>
|
</cwucont:AdaptiveGridView.ItemTemplate>
|
||||||
</DataTemplate>
|
</cwucont:AdaptiveGridView>
|
||||||
</cwucont:AdaptiveGridView.ItemTemplate>
|
<StackPanel
|
||||||
</cwucont:AdaptiveGridView>
|
HorizontalAlignment="Center"
|
||||||
</PivotItem>
|
VerticalAlignment="Center"
|
||||||
</Pivot>
|
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>
|
</Grid>
|
||||||
</shc:ScopedPage>
|
</shc:ScopedPage>
|
||||||
|
|||||||
@@ -106,6 +106,15 @@
|
|||||||
</RadioButtons.ItemTemplate>
|
</RadioButtons.ItemTemplate>
|
||||||
</RadioButtons>
|
</RadioButtons>
|
||||||
<wsc:SettingsGroup Margin="0,-16,0,0" Header="通知">
|
<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
|
<wsc:Setting
|
||||||
Description="防止通知自动收入操作中心"
|
Description="防止通知自动收入操作中心"
|
||||||
Header="提醒通知"
|
Header="提醒通知"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
xmlns:shcm="using:Snap.Hutao.Control.Markup"
|
xmlns:shcm="using:Snap.Hutao.Control.Markup"
|
||||||
xmlns:shv="using:Snap.Hutao.ViewModel"
|
xmlns:shv="using:Snap.Hutao.ViewModel"
|
||||||
xmlns:shvc="using:Snap.Hutao.View.Control"
|
xmlns:shvc="using:Snap.Hutao.View.Control"
|
||||||
|
xmlns:wsc="using:WinUICommunity.SettingsUI.Controls"
|
||||||
d:DataContext="{d:DesignInstance shv:GachaLogViewModel}"
|
d:DataContext="{d:DesignInstance shv:GachaLogViewModel}"
|
||||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
@@ -20,461 +21,486 @@
|
|||||||
</mxi:Interaction.Behaviors>
|
</mxi:Interaction.Behaviors>
|
||||||
|
|
||||||
<Grid Visibility="{Binding IsInitialized, Converter={StaticResource BoolToVisibilityConverter}}">
|
<Grid Visibility="{Binding IsInitialized, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||||
<Rectangle
|
<Grid Visibility="{Binding Statistics, Converter={StaticResource EmptyObjectToVisibilityConverter}}">
|
||||||
Height="48"
|
<Rectangle
|
||||||
VerticalAlignment="Top"
|
Height="48"
|
||||||
Fill="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
VerticalAlignment="Top"
|
||||||
IsHitTestVisible="False"/>
|
Fill="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
||||||
<Pivot>
|
IsHitTestVisible="False"/>
|
||||||
<Pivot.LeftHeader>
|
<Pivot>
|
||||||
<ComboBox
|
<Pivot.LeftHeader>
|
||||||
Height="36"
|
<ComboBox
|
||||||
MinWidth="120"
|
Height="36"
|
||||||
Margin="16,6,0,6"
|
MinWidth="120"
|
||||||
DisplayMemberPath="Uid"
|
Margin="16,6,0,6"
|
||||||
ItemsSource="{Binding Archives}"
|
DisplayMemberPath="Uid"
|
||||||
SelectedItem="{Binding SelectedArchive, Mode=TwoWay}">
|
ItemsSource="{Binding Archives}"
|
||||||
<mxi:Interaction.Behaviors>
|
SelectedItem="{Binding SelectedArchive, Mode=TwoWay}">
|
||||||
<shcb:ComboBoxExtendsContentIntoTitleBarWorkaroundBehavior/>
|
<mxi:Interaction.Behaviors>
|
||||||
</mxi:Interaction.Behaviors>
|
<shcb:ComboBoxExtendsContentIntoTitleBarWorkaroundBehavior/>
|
||||||
</ComboBox>
|
</mxi:Interaction.Behaviors>
|
||||||
</Pivot.LeftHeader>
|
</ComboBox>
|
||||||
<Pivot.RightHeader>
|
</Pivot.LeftHeader>
|
||||||
<CommandBar DefaultLabelPosition="Right">
|
<Pivot.RightHeader>
|
||||||
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="刷新">
|
<CommandBar DefaultLabelPosition="Right">
|
||||||
<AppBarButton.Flyout>
|
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="刷新">
|
||||||
<MenuFlyout Placement="Bottom">
|
<AppBarButton.Flyout>
|
||||||
<MenuFlyoutItem
|
<MenuFlyout Placement="Bottom">
|
||||||
Command="{Binding RefreshByStokenCommand}"
|
<MenuFlyoutItem
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
Command="{Binding RefreshByStokenCommand}"
|
||||||
Text="Stoken刷新"/>
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
<MenuFlyoutItem
|
Text="Stoken 刷新"/>
|
||||||
Command="{Binding RefreshByWebCacheCommand}"
|
<MenuFlyoutItem
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
Command="{Binding RefreshByWebCacheCommand}"
|
||||||
Text="从缓存刷新"/>
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
<MenuFlyoutItem
|
Text="网页缓存刷新"/>
|
||||||
Command="{Binding RefreshByManualInputCommand}"
|
<MenuFlyoutItem
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
Command="{Binding RefreshByManualInputCommand}"
|
||||||
Text="手动输入Url"/>
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
<ToggleMenuFlyoutItem
|
Text="手动输入 Url"/>
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
<ToggleMenuFlyoutItem
|
||||||
IsChecked="{Binding IsAggressiveRefresh}"
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
Text="全量刷新"/>
|
IsChecked="{Binding IsAggressiveRefresh}"
|
||||||
</MenuFlyout>
|
Text="全量刷新"/>
|
||||||
</AppBarButton.Flyout>
|
</MenuFlyout>
|
||||||
</AppBarButton>
|
</AppBarButton.Flyout>
|
||||||
<AppBarSeparator/>
|
</AppBarButton>
|
||||||
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="导入">
|
<AppBarSeparator/>
|
||||||
<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>
|
|
||||||
<AppBarButton
|
<AppBarButton
|
||||||
Command="{Binding RemoveArchiveCommand}"
|
Command="{Binding ImportFromUIGFJsonCommand}"
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
Label="删除当前存档"/>
|
Label="导入"/>
|
||||||
</CommandBar.SecondaryCommands>
|
<AppBarButton
|
||||||
</CommandBar>
|
Command="{Binding ExportToUIGFJsonCommand}"
|
||||||
</Pivot.RightHeader>
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
<PivotItem Header="总览">
|
Label="导出"/>
|
||||||
<Grid>
|
<CommandBar.SecondaryCommands>
|
||||||
<Grid.ColumnDefinitions>
|
<AppBarButton
|
||||||
<ColumnDefinition MaxWidth="388"/>
|
Command="{Binding RemoveArchiveCommand}"
|
||||||
<ColumnDefinition MaxWidth="388"/>
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
<ColumnDefinition MaxWidth="388"/>
|
Label="删除当前存档"/>
|
||||||
<ColumnDefinition Width="auto" MinWidth="16"/>
|
</CommandBar.SecondaryCommands>
|
||||||
</Grid.ColumnDefinitions>
|
</CommandBar>
|
||||||
<shvc:StatisticsCard
|
</Pivot.RightHeader>
|
||||||
Grid.Column="0"
|
<PivotItem Header="总览">
|
||||||
Margin="16,16,0,16"
|
<Grid>
|
||||||
DataContext="{Binding Statistics.AvatarWish}"/>
|
<Grid.ColumnDefinitions>
|
||||||
<shvc:StatisticsCard
|
<ColumnDefinition MaxWidth="388"/>
|
||||||
Grid.Column="1"
|
<ColumnDefinition MaxWidth="388"/>
|
||||||
Margin="16,16,0,16"
|
<ColumnDefinition MaxWidth="388"/>
|
||||||
DataContext="{Binding Statistics.WeaponWish}"/>
|
<ColumnDefinition Width="auto" MinWidth="16"/>
|
||||||
<shvc:StatisticsCard
|
</Grid.ColumnDefinitions>
|
||||||
Grid.Column="2"
|
<shvc:StatisticsCard
|
||||||
Margin="16,16,0,16"
|
Grid.Column="0"
|
||||||
DataContext="{Binding Statistics.PermanentWish}"/>
|
Margin="16,16,0,16"
|
||||||
</Grid>
|
DataContext="{Binding Statistics.AvatarWish}"/>
|
||||||
</PivotItem>
|
<shvc:StatisticsCard
|
||||||
<PivotItem Header="历史">
|
Grid.Column="1"
|
||||||
<SplitView
|
Margin="16,16,0,16"
|
||||||
DisplayMode="Inline"
|
DataContext="{Binding Statistics.WeaponWish}"/>
|
||||||
IsPaneOpen="True"
|
<shvc:StatisticsCard
|
||||||
OpenPaneLength="296"
|
Grid.Column="2"
|
||||||
PaneBackground="Transparent">
|
Margin="16,16,0,16"
|
||||||
<SplitView.Pane>
|
DataContext="{Binding Statistics.PermanentWish}"/>
|
||||||
<ListView ItemsSource="{Binding Statistics.HistoryWishes}" SelectedItem="{Binding SelectedHistoryWish, Mode=TwoWay}">
|
</Grid>
|
||||||
<ListView.ItemTemplate>
|
</PivotItem>
|
||||||
<DataTemplate>
|
<PivotItem Header="历史">
|
||||||
<Grid>
|
<SplitView
|
||||||
<Grid.RowDefinitions>
|
DisplayMode="Inline"
|
||||||
<RowDefinition Height="auto"/>
|
IsPaneOpen="True"
|
||||||
<RowDefinition/>
|
OpenPaneLength="296"
|
||||||
<RowDefinition/>
|
PaneBackground="Transparent">
|
||||||
</Grid.RowDefinitions>
|
<SplitView.Pane>
|
||||||
<StackPanel Margin="0,8,0,0" Orientation="Horizontal">
|
<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
|
<TextBlock
|
||||||
Width="32"
|
Margin="0,8,0,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
Style="{StaticResource BaseTextBlockStyle}"
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
Text="{Binding Version}"/>
|
Text="{Binding TotalCountFormatted}"/>
|
||||||
<TextBlock
|
<Border
|
||||||
Margin="0,0,0,0"
|
Grid.Row="1"
|
||||||
Style="{StaticResource BaseTextBlockStyle}"
|
Margin="0,6,0,0"
|
||||||
Text="{Binding Name}"/>
|
Padding="2"
|
||||||
</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
|
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Style="{StaticResource BodyTextBlockStyle}"
|
Background="{StaticResource CardBackgroundFillColorDefault}"
|
||||||
Text="{Binding FromFormatted}"/>
|
CornerRadius="{StaticResource CompatCornerRadiusSmall}">
|
||||||
<TextBlock
|
<ItemsControl ItemsSource="{Binding OrangeUpList}">
|
||||||
HorizontalAlignment="Left"
|
<ItemsControl.ItemsPanel>
|
||||||
VerticalAlignment="Center"
|
<ItemsPanelTemplate>
|
||||||
Style="{StaticResource BodyTextBlockStyle}"
|
<StackPanel Orientation="Horizontal"/>
|
||||||
Text=" - "/>
|
</ItemsPanelTemplate>
|
||||||
<TextBlock
|
</ItemsControl.ItemsPanel>
|
||||||
HorizontalAlignment="Left"
|
<ItemsControl.ItemTemplate>
|
||||||
Style="{StaticResource BodyTextBlockStyle}"
|
<DataTemplate>
|
||||||
Text="{Binding ToFormatted}"/>
|
<StackPanel Margin="2">
|
||||||
</StackPanel>
|
<shci:CachedImage
|
||||||
</Grid>
|
Width="32"
|
||||||
</DataTemplate>
|
Height="32"
|
||||||
</ListView.ItemTemplate>
|
Source="{Binding Icon}"/>
|
||||||
</ListView>
|
<TextBlock
|
||||||
</SplitView.Pane>
|
Margin="0,2,0,0"
|
||||||
<SplitView.Content>
|
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>
|
<ScrollViewer>
|
||||||
<StackPanel Margin="16,0,16,0">
|
<StackPanel Margin="16,0,16,0">
|
||||||
<Border
|
<Border
|
||||||
Margin="0,16,0,0"
|
Margin="0,16,0,0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
BorderBrush="{StaticResource CardStrokeColorDefault}"
|
BorderBrush="{StaticResource CardStrokeColorDefault}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="{StaticResource CompatCornerRadius}">
|
CornerRadius="{StaticResource CompatCornerRadius}">
|
||||||
<shci:CachedImage MaxHeight="320" Source="{Binding SelectedHistoryWish.BannerImage}"/>
|
<shci:CachedImage MaxHeight="320" Source="{Binding SelectedHistoryWish.BannerImage}"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,16,0,8"
|
Margin="0,16,0,8"
|
||||||
Style="{StaticResource BaseTextBlockStyle}"
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
Text="五星"/>
|
Text="五星"/>
|
||||||
<GridView ItemsSource="{Binding SelectedHistoryWish.OrangeList}" SelectionMode="None">
|
<GridView ItemsSource="{Binding SelectedHistoryWish.OrangeList}" SelectionMode="None">
|
||||||
<GridView.ItemTemplate>
|
<GridView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
<shvc:ItemIcon
|
<shvc:ItemIcon
|
||||||
Badge="{Binding Badge}"
|
Badge="{Binding Badge}"
|
||||||
Icon="{Binding Icon}"
|
Icon="{Binding Icon}"
|
||||||
Quality="{Binding Quality}"/>
|
Quality="{Binding Quality}"/>
|
||||||
<Border
|
<Border
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Background="#80000000"
|
Background="#80000000"
|
||||||
CornerRadius="0,6,0,6">
|
CornerRadius="0,6,0,6">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="6,0,6,2"
|
Margin="6,0,6,2"
|
||||||
Foreground="#FFFFFFFF"
|
Foreground="#FFFFFFFF"
|
||||||
Text="{Binding Count}"/>
|
Text="{Binding Count}"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridView.ItemTemplate>
|
</GridView.ItemTemplate>
|
||||||
</GridView>
|
</GridView>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,0,0,8"
|
Margin="0,0,0,8"
|
||||||
Style="{StaticResource BaseTextBlockStyle}"
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
Text="四星"/>
|
Text="四星"/>
|
||||||
<GridView ItemsSource="{Binding SelectedHistoryWish.PurpleList}" SelectionMode="None">
|
<GridView ItemsSource="{Binding SelectedHistoryWish.PurpleList}" SelectionMode="None">
|
||||||
<GridView.ItemTemplate>
|
<GridView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
<shvc:ItemIcon
|
<shvc:ItemIcon
|
||||||
Badge="{Binding Badge}"
|
Badge="{Binding Badge}"
|
||||||
Icon="{Binding Icon}"
|
Icon="{Binding Icon}"
|
||||||
Quality="{Binding Quality}"/>
|
Quality="{Binding Quality}"/>
|
||||||
<Border
|
<Border
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Background="#80000000"
|
Background="#80000000"
|
||||||
CornerRadius="0,6,0,6">
|
CornerRadius="0,6,0,6">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="6,0,6,2"
|
Margin="6,0,6,2"
|
||||||
Foreground="#FFFFFFFF"
|
Foreground="#FFFFFFFF"
|
||||||
Text="{Binding Count}"/>
|
Text="{Binding Count}"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridView.ItemTemplate>
|
</GridView.ItemTemplate>
|
||||||
</GridView>
|
</GridView>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,0,0,8"
|
Margin="0,0,0,8"
|
||||||
Style="{StaticResource BaseTextBlockStyle}"
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
Text="三星"/>
|
Text="三星"/>
|
||||||
<GridView ItemsSource="{Binding SelectedHistoryWish.BlueList}" SelectionMode="None">
|
<GridView ItemsSource="{Binding SelectedHistoryWish.BlueList}" SelectionMode="None">
|
||||||
<GridView.ItemTemplate>
|
<GridView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
<shvc:ItemIcon
|
<shvc:ItemIcon
|
||||||
Badge="{Binding Badge}"
|
Badge="{Binding Badge}"
|
||||||
Icon="{Binding Icon}"
|
Icon="{Binding Icon}"
|
||||||
Quality="{Binding Quality}"/>
|
Quality="{Binding Quality}"/>
|
||||||
<Border
|
<Border
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Background="#80000000"
|
Background="#80000000"
|
||||||
CornerRadius="0,6,0,6">
|
CornerRadius="0,6,0,6">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="6,0,6,2"
|
Margin="6,0,6,2"
|
||||||
Foreground="#FFFFFFFF"
|
Foreground="#FFFFFFFF"
|
||||||
Text="{Binding Count}"/>
|
Text="{Binding Count}"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridView.ItemTemplate>
|
</GridView.ItemTemplate>
|
||||||
</GridView>
|
</GridView>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</SplitView.Content>
|
</SplitView.Content>
|
||||||
</SplitView>
|
</SplitView>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
<PivotItem Header="角色">
|
<PivotItem Header="角色">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel Margin="16,0,16,0">
|
<StackPanel Margin="16,0,16,0">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,16,0,8"
|
Margin="0,16,0,8"
|
||||||
Style="{StaticResource BaseTextBlockStyle}"
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
Text="五星"/>
|
Text="五星"/>
|
||||||
<GridView ItemsSource="{Binding Statistics.OrangeAvatars}" SelectionMode="None">
|
<GridView ItemsSource="{Binding Statistics.OrangeAvatars}" SelectionMode="None">
|
||||||
<GridView.ItemTemplate>
|
<GridView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
<shvc:ItemIcon
|
<shvc:ItemIcon
|
||||||
Badge="{Binding Badge}"
|
Badge="{Binding Badge}"
|
||||||
Icon="{Binding Icon}"
|
Icon="{Binding Icon}"
|
||||||
Quality="{Binding Quality}"/>
|
Quality="{Binding Quality}"/>
|
||||||
<Border
|
<Border
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Background="#80000000"
|
Background="#80000000"
|
||||||
CornerRadius="0,6,0,6">
|
CornerRadius="0,6,0,6">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="6,0,6,2"
|
Margin="6,0,6,2"
|
||||||
Foreground="#FFFFFFFF"
|
Foreground="#FFFFFFFF"
|
||||||
Text="{Binding Count}"/>
|
Text="{Binding Count}"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridView.ItemTemplate>
|
</GridView.ItemTemplate>
|
||||||
</GridView>
|
</GridView>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,0,0,8"
|
Margin="0,0,0,8"
|
||||||
Style="{StaticResource BaseTextBlockStyle}"
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
Text="四星"/>
|
Text="四星"/>
|
||||||
<GridView ItemsSource="{Binding Statistics.PurpleAvatars}" SelectionMode="None">
|
<GridView ItemsSource="{Binding Statistics.PurpleAvatars}" SelectionMode="None">
|
||||||
<GridView.ItemTemplate>
|
<GridView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
<shvc:ItemIcon
|
<shvc:ItemIcon
|
||||||
Badge="{Binding Badge}"
|
Badge="{Binding Badge}"
|
||||||
Icon="{Binding Icon}"
|
Icon="{Binding Icon}"
|
||||||
Quality="{Binding Quality}"/>
|
Quality="{Binding Quality}"/>
|
||||||
<Border
|
<Border
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Background="#80000000"
|
Background="#80000000"
|
||||||
CornerRadius="0,6,0,6">
|
CornerRadius="0,6,0,6">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="6,0,6,2"
|
Margin="6,0,6,2"
|
||||||
Foreground="#FFFFFFFF"
|
Foreground="#FFFFFFFF"
|
||||||
Text="{Binding Count}"/>
|
Text="{Binding Count}"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridView.ItemTemplate>
|
</GridView.ItemTemplate>
|
||||||
</GridView>
|
</GridView>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
<PivotItem Header="武器">
|
<PivotItem Header="武器">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<StackPanel Margin="16,0,16,0">
|
<StackPanel Margin="16,0,16,0">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,16,0,8"
|
Margin="0,16,0,8"
|
||||||
Style="{StaticResource BaseTextBlockStyle}"
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
Text="五星"/>
|
Text="五星"/>
|
||||||
<GridView ItemsSource="{Binding Statistics.OrangeWeapons}" SelectionMode="None">
|
<GridView ItemsSource="{Binding Statistics.OrangeWeapons}" SelectionMode="None">
|
||||||
<GridView.ItemTemplate>
|
<GridView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
<shvc:ItemIcon
|
<shvc:ItemIcon
|
||||||
Badge="{Binding Badge}"
|
Badge="{Binding Badge}"
|
||||||
Icon="{Binding Icon}"
|
Icon="{Binding Icon}"
|
||||||
Quality="{Binding Quality}"/>
|
Quality="{Binding Quality}"/>
|
||||||
<Border
|
<Border
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Background="#80000000"
|
Background="#80000000"
|
||||||
CornerRadius="0,6,0,6">
|
CornerRadius="0,6,0,6">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="6,0,6,2"
|
Margin="6,0,6,2"
|
||||||
Foreground="#FFFFFFFF"
|
Foreground="#FFFFFFFF"
|
||||||
Text="{Binding Count}"/>
|
Text="{Binding Count}"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridView.ItemTemplate>
|
</GridView.ItemTemplate>
|
||||||
</GridView>
|
</GridView>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,0,0,8"
|
Margin="0,0,0,8"
|
||||||
Style="{StaticResource BaseTextBlockStyle}"
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
Text="四星"/>
|
Text="四星"/>
|
||||||
<GridView ItemsSource="{Binding Statistics.PurpleWeapons}" SelectionMode="None">
|
<GridView ItemsSource="{Binding Statistics.PurpleWeapons}" SelectionMode="None">
|
||||||
<GridView.ItemTemplate>
|
<GridView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
<shvc:ItemIcon
|
<shvc:ItemIcon
|
||||||
Badge="{Binding Badge}"
|
Badge="{Binding Badge}"
|
||||||
Icon="{Binding Icon}"
|
Icon="{Binding Icon}"
|
||||||
Quality="{Binding Quality}"/>
|
Quality="{Binding Quality}"/>
|
||||||
<Border
|
<Border
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Background="#80000000"
|
Background="#80000000"
|
||||||
CornerRadius="0,6,0,6">
|
CornerRadius="0,6,0,6">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="6,0,6,2"
|
Margin="6,0,6,2"
|
||||||
Foreground="#FFFFFFFF"
|
Foreground="#FFFFFFFF"
|
||||||
Text="{Binding Count}"/>
|
Text="{Binding Count}"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridView.ItemTemplate>
|
</GridView.ItemTemplate>
|
||||||
</GridView>
|
</GridView>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,0,0,8"
|
Margin="0,0,0,8"
|
||||||
Style="{StaticResource BaseTextBlockStyle}"
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
Text="三星"/>
|
Text="三星"/>
|
||||||
<GridView ItemsSource="{Binding Statistics.BlueWeapons}" SelectionMode="None">
|
<GridView ItemsSource="{Binding Statistics.BlueWeapons}" SelectionMode="None">
|
||||||
<GridView.ItemTemplate>
|
<GridView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid>
|
<Grid>
|
||||||
<shvc:ItemIcon
|
<shvc:ItemIcon
|
||||||
Badge="{Binding Badge}"
|
Badge="{Binding Badge}"
|
||||||
Icon="{Binding Icon}"
|
Icon="{Binding Icon}"
|
||||||
Quality="{Binding Quality}"/>
|
Quality="{Binding Quality}"/>
|
||||||
<Border
|
<Border
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Background="#80000000"
|
Background="#80000000"
|
||||||
CornerRadius="0,6,0,6">
|
CornerRadius="0,6,0,6">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="6,0,6,2"
|
Margin="6,0,6,2"
|
||||||
Foreground="#FFFFFFFF"
|
Foreground="#FFFFFFFF"
|
||||||
Text="{Binding Count}"/>
|
Text="{Binding Count}"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridView.ItemTemplate>
|
</GridView.ItemTemplate>
|
||||||
</GridView>
|
</GridView>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
</Pivot>
|
</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>
|
</Grid>
|
||||||
</shc:ScopedPage>
|
</shc:ScopedPage>
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
xmlns:mxi="using:Microsoft.Xaml.Interactivity"
|
xmlns:mxi="using:Microsoft.Xaml.Interactivity"
|
||||||
xmlns:shc="using:Snap.Hutao.Control"
|
xmlns:shc="using:Snap.Hutao.Control"
|
||||||
xmlns:shcb="using:Snap.Hutao.Control.Behavior"
|
xmlns:shcb="using:Snap.Hutao.Control.Behavior"
|
||||||
|
xmlns:shci="using:Snap.Hutao.Control.Image"
|
||||||
xmlns:shcm="using:Snap.Hutao.Control.Markup"
|
xmlns:shcm="using:Snap.Hutao.Control.Markup"
|
||||||
xmlns:shmbh="using:Snap.Hutao.Model.Binding.Hutao"
|
xmlns:shmbh="using:Snap.Hutao.Model.Binding.Hutao"
|
||||||
xmlns:shv="using:Snap.Hutao.ViewModel"
|
xmlns:shv="using:Snap.Hutao.ViewModel"
|
||||||
@@ -63,7 +64,7 @@
|
|||||||
</Page.Resources>
|
</Page.Resources>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Pivot>
|
<Pivot Visibility="{Binding Overview, Converter={StaticResource EmptyObjectToVisibilityConverter}}">
|
||||||
<Pivot.RightHeader>
|
<Pivot.RightHeader>
|
||||||
<CommandBar DefaultLabelPosition="Right">
|
<CommandBar DefaultLabelPosition="Right">
|
||||||
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="详情">
|
<AppBarButton Icon="{shcm:FontIcon Glyph=}" Label="详情">
|
||||||
@@ -330,5 +331,19 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
</Pivot>
|
</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>
|
</Grid>
|
||||||
</shc:ScopedPage>
|
</shc:ScopedPage>
|
||||||
|
|||||||
@@ -22,31 +22,13 @@
|
|||||||
</mxi:Interaction.Behaviors>
|
</mxi:Interaction.Behaviors>
|
||||||
|
|
||||||
<Grid>
|
<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
|
<SplitView
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
DisplayMode="Inline"
|
DisplayMode="Inline"
|
||||||
IsPaneOpen="True"
|
IsPaneOpen="True"
|
||||||
OpenPaneLength="96"
|
OpenPaneLength="96"
|
||||||
PaneBackground="Transparent">
|
PaneBackground="Transparent"
|
||||||
|
Visibility="{Binding SpiralAbyssEntries, Converter={StaticResource EmptyCollectionToVisibilityConverter}}">
|
||||||
<SplitView.Pane>
|
<SplitView.Pane>
|
||||||
<ListView ItemsSource="{Binding SpiralAbyssEntries}" SelectedItem="{Binding SelectedEntry, Mode=TwoWay}">
|
<ListView ItemsSource="{Binding SpiralAbyssEntries}" SelectedItem="{Binding SelectedEntry, Mode=TwoWay}">
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
@@ -57,9 +39,21 @@
|
|||||||
</ListView>
|
</ListView>
|
||||||
</SplitView.Pane>
|
</SplitView.Pane>
|
||||||
<SplitView.Content>
|
<SplitView.Content>
|
||||||
<Grid DataContext="{Binding SpiralAbyssView}">
|
<Grid>
|
||||||
<Pivot>
|
<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>
|
<ScrollViewer>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -163,7 +157,7 @@
|
|||||||
|
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
<PivotItem Header="详细数据">
|
<PivotItem DataContext="{Binding SpiralAbyssView}" Header="详细数据">
|
||||||
<ScrollViewer HorizontalScrollBarVisibility="Auto">
|
<ScrollViewer HorizontalScrollBarVisibility="Auto">
|
||||||
<ItemsControl
|
<ItemsControl
|
||||||
Margin="16,16,0,0"
|
Margin="16,16,0,0"
|
||||||
@@ -287,5 +281,27 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</SplitView.Content>
|
</SplitView.Content>
|
||||||
</SplitView>
|
</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>
|
</Grid>
|
||||||
</shc:ScopedPage>
|
|
||||||
|
</shc:ScopedPage>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -32,215 +32,230 @@
|
|||||||
</Page.Resources>
|
</Page.Resources>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid Visibility="{Binding Weapons, Converter={StaticResource EmptyCollectionToVisibilityConverter}}">
|
||||||
<RowDefinition Height="auto"/>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition/>
|
<RowDefinition Height="auto"/>
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition/>
|
||||||
<CommandBar
|
</Grid.RowDefinitions>
|
||||||
Grid.Row="0"
|
<CommandBar
|
||||||
Background="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
Grid.Row="0"
|
||||||
BorderBrush="{x:Null}"
|
Background="{StaticResource CardBackgroundFillColorDefaultBrush}"
|
||||||
BorderThickness="0"
|
BorderBrush="{x:Null}"
|
||||||
DefaultLabelPosition="Right">
|
BorderThickness="0"
|
||||||
<CommandBar.Content>
|
DefaultLabelPosition="Right">
|
||||||
<shcp:PanelSelector x:Name="ItemsPanelSelector" Margin="6,8,0,0"/>
|
<CommandBar.Content>
|
||||||
</CommandBar.Content>
|
<shcp:PanelSelector x:Name="ItemsPanelSelector" Margin="6,8,0,0"/>
|
||||||
<AppBarElementContainer>
|
</CommandBar.Content>
|
||||||
<AutoSuggestBox
|
<AppBarElementContainer>
|
||||||
Width="240"
|
<AutoSuggestBox
|
||||||
Height="36"
|
Width="240"
|
||||||
Margin="16,6,6,0"
|
Height="36"
|
||||||
HorizontalAlignment="Stretch"
|
Margin="16,6,6,0"
|
||||||
VerticalContentAlignment="Center"
|
HorizontalAlignment="Stretch"
|
||||||
PlaceholderText="筛选武器"
|
VerticalContentAlignment="Center"
|
||||||
QueryIcon="{shcm:FontIcon Glyph=}"
|
PlaceholderText="筛选武器"
|
||||||
Text="{Binding FilterText, Mode=TwoWay}">
|
QueryIcon="{shcm:FontIcon Glyph=}"
|
||||||
<mxi:Interaction.Behaviors>
|
Text="{Binding FilterText, Mode=TwoWay}">
|
||||||
<mxic:EventTriggerBehavior EventName="QuerySubmitted">
|
<mxi:Interaction.Behaviors>
|
||||||
<mxic:InvokeCommandAction Command="{Binding FilterCommand}" CommandParameter="{Binding FilterText}"/>
|
<mxic:EventTriggerBehavior EventName="QuerySubmitted">
|
||||||
</mxic:EventTriggerBehavior>
|
<mxic:InvokeCommandAction Command="{Binding FilterCommand}" CommandParameter="{Binding FilterText}"/>
|
||||||
</mxi:Interaction.Behaviors>
|
</mxic:EventTriggerBehavior>
|
||||||
</AutoSuggestBox>
|
</mxi:Interaction.Behaviors>
|
||||||
</AppBarElementContainer>
|
</AutoSuggestBox>
|
||||||
<AppBarButton
|
</AppBarElementContainer>
|
||||||
Command="{Binding CultivateCommand}"
|
<AppBarButton
|
||||||
CommandParameter="{Binding Selected}"
|
Command="{Binding CultivateCommand}"
|
||||||
Icon="{shcm:FontIcon Glyph=}"
|
CommandParameter="{Binding Selected}"
|
||||||
Label="养成计算"/>
|
Icon="{shcm:FontIcon Glyph=}"
|
||||||
</CommandBar>
|
Label="养成计算"/>
|
||||||
<SplitView
|
</CommandBar>
|
||||||
Grid.Row="1"
|
<SplitView
|
||||||
DisplayMode="Inline"
|
Grid.Row="1"
|
||||||
IsPaneOpen="True"
|
DisplayMode="Inline"
|
||||||
OpenPaneLength="200"
|
IsPaneOpen="True"
|
||||||
PaneBackground="{StaticResource CardBackgroundFillColorSecondary}">
|
OpenPaneLength="200"
|
||||||
<SplitView.Pane>
|
PaneBackground="{StaticResource CardBackgroundFillColorSecondary}">
|
||||||
<cwuc:SwitchPresenter Grid.Row="1" Value="{Binding ElementName=ItemsPanelSelector, Path=Current}">
|
<SplitView.Pane>
|
||||||
<cwuc:Case Value="List">
|
<cwuc:SwitchPresenter Grid.Row="1" Value="{Binding ElementName=ItemsPanelSelector, Path=Current}">
|
||||||
<ListView
|
<cwuc:Case Value="List">
|
||||||
Grid.Row="1"
|
<ListView
|
||||||
ItemsSource="{Binding Weapons}"
|
Grid.Row="1"
|
||||||
SelectedItem="{Binding Selected, Mode=TwoWay}"
|
ItemsSource="{Binding Weapons}"
|
||||||
SelectionMode="Single">
|
SelectedItem="{Binding Selected, Mode=TwoWay}"
|
||||||
<ListView.ItemTemplate>
|
SelectionMode="Single">
|
||||||
<DataTemplate>
|
<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>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="auto"/>
|
<ColumnDefinition Width="auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<shci:CachedImage
|
<mxi:Interaction.Behaviors>
|
||||||
Grid.Column="0"
|
<shcb:AutoHeightBehavior TargetHeight="1024" TargetWidth="2048"/>
|
||||||
Width="48"
|
</mxi:Interaction.Behaviors>
|
||||||
Height="48"
|
<ScrollViewer Grid.Column="0" Margin="16">
|
||||||
Margin="0,0,12,6"
|
<StackPanel>
|
||||||
Source="{Binding Icon, Converter={StaticResource EquipIconConverter}, Mode=OneWay}"/>
|
<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
|
<TextBlock
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="12,0,0,0"
|
Margin="16"
|
||||||
VerticalAlignment="Center"
|
HorizontalAlignment="Right"
|
||||||
Text="{Binding Name}"/>
|
VerticalAlignment="Bottom"
|
||||||
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||||
|
Text="{Binding Selected.Name}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</Border>
|
||||||
</ListView.ItemTemplate>
|
<TextBlock
|
||||||
</ListView>
|
Margin="16,16,0,0"
|
||||||
</cwuc:Case>
|
Text="{Binding Selected.Description}"
|
||||||
<cwuc:Case Value="Grid">
|
TextWrapping="Wrap"/>
|
||||||
<GridView
|
<ContentControl
|
||||||
Margin="6,6,0,0"
|
Margin="16,16,0,0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Stretch"
|
||||||
HorizontalContentAlignment="Left"
|
HorizontalContentAlignment="Stretch"
|
||||||
ItemsSource="{Binding Weapons}"
|
Content="{Binding Selected.Property, Mode=OneWay}"
|
||||||
SelectedItem="{Binding Selected, Mode=TwoWay}"
|
ContentTemplate="{StaticResource PropertyDataTemplate}"/>
|
||||||
SelectionMode="Single">
|
<TextBlock
|
||||||
<GridView.ItemTemplate>
|
Margin="16,32,0,0"
|
||||||
<DataTemplate>
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
<shci:CachedImage
|
Text="{Binding Selected.Affix.Name}"/>
|
||||||
Grid.Column="0"
|
<Pivot ItemsSource="{Binding Selected.Affix.Descriptions}">
|
||||||
Width="40"
|
<Pivot.HeaderTemplate>
|
||||||
Height="40"
|
<DataTemplate>
|
||||||
Margin="0"
|
<TextBlock Style="{StaticResource CaptionTextBlockStyle}" Text="{Binding LevelFormatted}"/>
|
||||||
Source="{Binding Icon, Converter={StaticResource EquipIconConverter}, Mode=OneWay}"/>
|
</DataTemplate>
|
||||||
</DataTemplate>
|
</Pivot.HeaderTemplate>
|
||||||
</GridView.ItemTemplate>
|
<Pivot.ItemTemplate>
|
||||||
</GridView>
|
<DataTemplate>
|
||||||
</cwuc:Case>
|
<shct:DescriptionTextBlock Margin="16,16,0,0" Description="{Binding Description}">
|
||||||
</cwuc:SwitchPresenter>
|
<shct:DescriptionTextBlock.Resources>
|
||||||
</SplitView.Pane>
|
<Style BasedOn="{StaticResource BodyTextBlockStyle}" TargetType="TextBlock">
|
||||||
<SplitView.Content>
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||||
<ScrollViewer>
|
</Style>
|
||||||
<Grid>
|
</shct:DescriptionTextBlock.Resources>
|
||||||
<Grid.ColumnDefinitions>
|
</shct:DescriptionTextBlock>
|
||||||
<ColumnDefinition MaxWidth="800"/>
|
</DataTemplate>
|
||||||
<ColumnDefinition Width="auto"/>
|
</Pivot.ItemTemplate>
|
||||||
</Grid.ColumnDefinitions>
|
</Pivot>
|
||||||
<StackPanel Margin="0,0,20,0">
|
<TextBlock
|
||||||
<Border
|
Margin="16,32,0,0"
|
||||||
Margin="16,16,0,0"
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
BorderBrush="{StaticResource CardStrokeColorDefault}"
|
Text="搭配角色"/>
|
||||||
BorderThickness="1"
|
<GridView
|
||||||
CornerRadius="{StaticResource CompatCornerRadius}">
|
Margin="16,16,0,0"
|
||||||
<Border.Background>
|
HorizontalAlignment="Stretch"
|
||||||
<ImageBrush ImageSource="ms-appx:///Resource/Icon/UI_GachaShowPanel_Bg_Weapon.png"/>
|
HorizontalContentAlignment="Stretch"
|
||||||
</Border.Background>
|
ItemsSource="{Binding Selected.Collocation.Avatars}"
|
||||||
<Grid>
|
SelectionMode="None">
|
||||||
<Grid.ColumnDefinitions>
|
<GridView.ItemTemplate>
|
||||||
<ColumnDefinition Width="auto"/>
|
<DataTemplate>
|
||||||
<ColumnDefinition/>
|
<shvc:BottomTextControl Text="{Binding Rate}" ToolTipService.ToolTip="{Binding Name}">
|
||||||
</Grid.ColumnDefinitions>
|
<shvc:ItemIcon Icon="{Binding Icon}" Quality="{Binding Quality}"/>
|
||||||
<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>
|
||||||
|
</DataTemplate>
|
||||||
<shvc:BottomTextControl
|
</GridView.ItemTemplate>
|
||||||
Margin="0,16,0,0"
|
</GridView>
|
||||||
RequestedTheme="Light"
|
</StackPanel>
|
||||||
Text="突破后">
|
</Grid>
|
||||||
<shvc:ItemIcon Icon="{Binding Selected.AwakenIcon, Converter={StaticResource EquipIconConverter}}" Quality="{Binding Selected.RankLevel}"/>
|
</ScrollViewer>
|
||||||
</shvc:BottomTextControl>
|
</SplitView.Content>
|
||||||
</StackPanel>
|
</SplitView>
|
||||||
</ScrollViewer>
|
</Grid>
|
||||||
|
<cwuc:Loading IsLoading="{Binding Weapons, Converter={StaticResource EmptyCollectionToBoolRevertConverter}}">
|
||||||
<Grid Grid.ColumnSpan="2">
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
<Grid.ColumnDefinitions>
|
<shci:CachedImage
|
||||||
<ColumnDefinition Width="176*"/>
|
Width="120"
|
||||||
<ColumnDefinition Width="848*"/>
|
Height="120"
|
||||||
</Grid.ColumnDefinitions>
|
Source="https://static.snapgenshin.com/EmotionIcon/UI_EmotionIcon272.png"/>
|
||||||
<shci:CachedImage
|
<TextBlock
|
||||||
Grid.Column="1"
|
Margin="0,16,0,0"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Stretch"
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||||
Source="{Binding Selected.Icon, Converter={StaticResource GachaEquipIconConverter}}"/>
|
Text="加载中,请稍候"/>
|
||||||
</Grid>
|
<ProgressRing Margin="0,16,0,0" IsActive="True"/>
|
||||||
<TextBlock
|
</StackPanel>
|
||||||
Grid.Column="1"
|
</cwuc:Loading>
|
||||||
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>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</shc:ScopedPage>
|
</shc:ScopedPage>
|
||||||
|
|||||||
@@ -62,128 +62,135 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Flyout.FlyoutPresenterStyle>
|
</Flyout.FlyoutPresenterStyle>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock
|
<StackPanel Visibility="{Binding Users, Converter={StaticResource EmptyCollectionToVisibilityConverter}}">
|
||||||
Margin="10,6,0,6"
|
<TextBlock
|
||||||
Style="{StaticResource BaseTextBlockStyle}"
|
Margin="10,6,0,6"
|
||||||
Text="角色"/>
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
<ListView
|
Text="角色"/>
|
||||||
Grid.Row="1"
|
<ListView
|
||||||
Margin="4"
|
Grid.Row="1"
|
||||||
CanReorderItems="True"
|
Margin="4"
|
||||||
ItemsSource="{Binding SelectedUser.UserGameRoles}"
|
CanReorderItems="True"
|
||||||
SelectedItem="{Binding SelectedUser.SelectedUserGameRole, Mode=TwoWay}"
|
ItemsSource="{Binding SelectedUser.UserGameRoles}"
|
||||||
SelectionMode="Single">
|
SelectedItem="{Binding SelectedUser.SelectedUserGameRole, Mode=TwoWay}"
|
||||||
<ListView.ItemTemplate>
|
SelectionMode="Single">
|
||||||
<DataTemplate>
|
<ListView.ItemTemplate>
|
||||||
<StackPanel Padding="0,6">
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Nickname}"/>
|
<StackPanel Padding="0,6">
|
||||||
<TextBlock
|
<TextBlock Text="{Binding Nickname}"/>
|
||||||
Margin="0,2,0,0"
|
<TextBlock
|
||||||
Opacity="0.6"
|
Margin="0,2,0,0"
|
||||||
Style="{StaticResource CaptionTextBlockStyle}"
|
Opacity="0.6"
|
||||||
Text="{Binding Description}"/>
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
</StackPanel>
|
Text="{Binding Description}"/>
|
||||||
</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>
|
</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>
|
<StackPanel
|
||||||
<Storyboard x:Name="ButtonPanelVisibleStoryboard">
|
x:Name="ButtonPanel"
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
Grid.Column="2"
|
||||||
<DiscreteObjectKeyFrame KeyTime="0">
|
Orientation="Horizontal"
|
||||||
<DiscreteObjectKeyFrame.Value>
|
Visibility="Collapsed">
|
||||||
<Visibility>Visible</Visibility>
|
<Button
|
||||||
</DiscreteObjectKeyFrame.Value>
|
Margin="12,0,0,0"
|
||||||
</DiscreteObjectKeyFrame>
|
VerticalAlignment="Stretch"
|
||||||
</ObjectAnimationUsingKeyFrames>
|
Background="Transparent"
|
||||||
</Storyboard>
|
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">
|
<Grid.Resources>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
<Storyboard x:Name="ButtonPanelVisibleStoryboard">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
||||||
<DiscreteObjectKeyFrame.Value>
|
<DiscreteObjectKeyFrame KeyTime="0">
|
||||||
<Visibility>Collapsed</Visibility>
|
<DiscreteObjectKeyFrame.Value>
|
||||||
</DiscreteObjectKeyFrame.Value>
|
<Visibility>Visible</Visibility>
|
||||||
</DiscreteObjectKeyFrame>
|
</DiscreteObjectKeyFrame.Value>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</DiscreteObjectKeyFrame>
|
||||||
</Storyboard>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</Grid.Resources>
|
</Storyboard>
|
||||||
|
|
||||||
<mxi:Interaction.Behaviors>
|
<Storyboard x:Name="ButtonPanelCollapsedStoryboard">
|
||||||
<mxic:EventTriggerBehavior EventName="PointerEntered">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonPanel" Storyboard.TargetProperty="Visibility">
|
||||||
<mxim:ControlStoryboardAction Storyboard="{StaticResource ButtonPanelVisibleStoryboard}"/>
|
<DiscreteObjectKeyFrame KeyTime="0">
|
||||||
</mxic:EventTriggerBehavior>
|
<DiscreteObjectKeyFrame.Value>
|
||||||
<mxic:EventTriggerBehavior EventName="PointerExited">
|
<Visibility>Collapsed</Visibility>
|
||||||
<mxim:ControlStoryboardAction Storyboard="{StaticResource ButtonPanelCollapsedStoryboard}"/>
|
</DiscreteObjectKeyFrame.Value>
|
||||||
</mxic:EventTriggerBehavior>
|
</DiscreteObjectKeyFrame>
|
||||||
</mxi:Interaction.Behaviors>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</Grid>
|
</Storyboard>
|
||||||
</DataTemplate>
|
</Grid.Resources>
|
||||||
</ListView.ItemTemplate>
|
|
||||||
</ListView>
|
<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
|
<TextBlock
|
||||||
Margin="10,6,0,6"
|
Margin="10,6,0,6"
|
||||||
Style="{StaticResource BaseTextBlockStyle}"
|
Style="{StaticResource BaseTextBlockStyle}"
|
||||||
|
|||||||
@@ -286,11 +286,6 @@ internal class AchievementViewModel
|
|||||||
|
|
||||||
Archives = achievementService.GetArchiveCollection();
|
Archives = achievementService.GetArchiveCollection();
|
||||||
SelectedArchive = Archives.SingleOrDefault(a => a.IsSelected == true);
|
SelectedArchive = Archives.SingleOrDefault(a => a.IsSelected == true);
|
||||||
|
|
||||||
if (SelectedArchive == null)
|
|
||||||
{
|
|
||||||
infoBarService.Warning("请创建一个成就存档");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (TaskCanceledException)
|
catch (TaskCanceledException)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ internal class AnnouncementViewModel : ObservableObject, ISupportCancellation
|
|||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
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.Abstraction;
|
||||||
using Snap.Hutao.Service.Cultivation;
|
using Snap.Hutao.Service.Cultivation;
|
||||||
using Snap.Hutao.Service.Metadata;
|
using Snap.Hutao.Service.Metadata;
|
||||||
|
using Snap.Hutao.Service.Navigation;
|
||||||
using Snap.Hutao.View.Dialog;
|
using Snap.Hutao.View.Dialog;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
@@ -58,6 +59,7 @@ internal class CultivationViewModel : ObservableObject, ISupportCancellation
|
|||||||
RemoveEntryCommand = asyncRelayCommandFactory.Create<Model.Binding.Cultivation.CultivateEntry>(RemoveEntryAsync);
|
RemoveEntryCommand = asyncRelayCommandFactory.Create<Model.Binding.Cultivation.CultivateEntry>(RemoveEntryAsync);
|
||||||
SaveInventoryItemCommand = new RelayCommand<Model.Binding.Inventory.InventoryItem>(SaveInventoryItem);
|
SaveInventoryItemCommand = new RelayCommand<Model.Binding.Inventory.InventoryItem>(SaveInventoryItem);
|
||||||
UpdateStatisticsItemsCommand = asyncRelayCommandFactory.Create(UpdateStatisticsItemsAsync);
|
UpdateStatisticsItemsCommand = asyncRelayCommandFactory.Create(UpdateStatisticsItemsAsync);
|
||||||
|
NavigateToPageCommand = new RelayCommand<string>(NavigateToPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
@@ -131,6 +133,11 @@ internal class CultivationViewModel : ObservableObject, ISupportCancellation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public ICommand UpdateStatisticsItemsCommand { get; }
|
public ICommand UpdateStatisticsItemsCommand { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 导航到指定的页面命令
|
||||||
|
/// </summary>
|
||||||
|
public ICommand NavigateToPageCommand { get; set; }
|
||||||
|
|
||||||
private async Task OpenUIAsync()
|
private async Task OpenUIAsync()
|
||||||
{
|
{
|
||||||
if (await metadataService.InitializeAsync().ConfigureAwait(true))
|
if (await metadataService.InitializeAsync().ConfigureAwait(true))
|
||||||
@@ -154,6 +161,9 @@ internal class CultivationViewModel : ObservableObject, ISupportCancellation
|
|||||||
{
|
{
|
||||||
case ProjectAddResult.Added:
|
case ProjectAddResult.Added:
|
||||||
infoBarService.Success($"添加成功");
|
infoBarService.Success($"添加成功");
|
||||||
|
|
||||||
|
await ThreadHelper.SwitchToMainThreadAsync();
|
||||||
|
SelectedProject = project;
|
||||||
break;
|
break;
|
||||||
case ProjectAddResult.InvalidName:
|
case ProjectAddResult.InvalidName:
|
||||||
infoBarService.Information($"不能添加名称无效的计划");
|
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? refreshSecondsEntry;
|
||||||
private SettingEntry? reminderNotifyEntry;
|
private SettingEntry? reminderNotifyEntry;
|
||||||
|
private SettingEntry? silentModeEntry;
|
||||||
private ObservableCollection<DailyNoteEntry>? dailyNoteEntries;
|
private ObservableCollection<DailyNoteEntry>? dailyNoteEntries;
|
||||||
|
private bool isSilentWhenPlayingGame;
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
||||||
/// 用户与角色集合
|
/// 用户与角色集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -164,11 +182,17 @@ internal class DailyNoteViewModel : ObservableObject, ISupportCancellation
|
|||||||
ScheduleTaskHelper.RegisterForDailyNoteRefresh(480);
|
ScheduleTaskHelper.RegisterForDailyNoteRefresh(480);
|
||||||
OnPropertyChanged(nameof(SelectedRefreshTime));
|
OnPropertyChanged(nameof(SelectedRefreshTime));
|
||||||
|
|
||||||
reminderNotifyEntry = appDbContext.Settings.SingleOrAdd(SettingEntry.DailyNoteReminderNotify, false.ToString());
|
reminderNotifyEntry = appDbContext.Settings.SingleOrAdd(SettingEntry.DailyNoteReminderNotify, SettingEntryHelper.FalseString);
|
||||||
isReminderNotification = reminderNotifyEntry.GetBoolean();
|
isReminderNotification = reminderNotifyEntry.GetBoolean();
|
||||||
OnPropertyChanged(nameof(IsReminderNotification));
|
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)
|
private async Task TrackRoleAsync(UserAndRole? role)
|
||||||
|
|||||||
@@ -184,11 +184,6 @@ internal class GachaLogViewModel : ObservableObject, ISupportCancellation
|
|||||||
Archives = gachaLogService.GetArchiveCollection();
|
Archives = gachaLogService.GetArchiveCollection();
|
||||||
SelectedArchive = Archives.SingleOrDefault(a => a.IsSelected == true);
|
SelectedArchive = Archives.SingleOrDefault(a => a.IsSelected == true);
|
||||||
|
|
||||||
if (SelectedArchive == null)
|
|
||||||
{
|
|
||||||
infoBarService.Information("请刷新或导入祈愿记录");
|
|
||||||
}
|
|
||||||
|
|
||||||
await ThreadHelper.SwitchToMainThreadAsync();
|
await ThreadHelper.SwitchToMainThreadAsync();
|
||||||
IsInitialized = true;
|
IsInitialized = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,6 +120,12 @@ internal class UserViewModel : ObservableObject
|
|||||||
switch (optionResult)
|
switch (optionResult)
|
||||||
{
|
{
|
||||||
case UserOptionResult.Added:
|
case UserOptionResult.Added:
|
||||||
|
if (Users!.Count == 1)
|
||||||
|
{
|
||||||
|
await ThreadHelper.SwitchToMainThreadAsync();
|
||||||
|
SelectedUser = Users.Single();
|
||||||
|
}
|
||||||
|
|
||||||
infoBarService.Success($"用户 [{uid}] 添加成功");
|
infoBarService.Success($"用户 [{uid}] 添加成功");
|
||||||
break;
|
break;
|
||||||
case UserOptionResult.Incomplete:
|
case UserOptionResult.Incomplete:
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ public class MiHoYoJSInterface
|
|||||||
[JsMethod("getDS")]
|
[JsMethod("getDS")]
|
||||||
public virtual JsResult<Dictionary<string, string>> GetDynamicSecrectV1(JsParam param)
|
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();
|
long t = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||||
string r = GetRandomString();
|
string r = GetRandomString();
|
||||||
string check = Md5Convert.ToHexString($"salt={salt}&t={t}&r={r}").ToLowerInvariant();
|
string check = Md5Convert.ToHexString($"salt={salt}&t={t}&r={r}").ToLowerInvariant();
|
||||||
@@ -155,7 +155,7 @@ public class MiHoYoJSInterface
|
|||||||
[JsMethod("getDS2")]
|
[JsMethod("getDS2")]
|
||||||
public virtual JsResult<Dictionary<string, string>> GetDynamicSecrectV2(JsParam<DynamicSecrect2Playload> param)
|
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();
|
long t = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||||
int r = GetRandom();
|
int r = GetRandom();
|
||||||
string b = param.Payload.Body;
|
string b = param.Payload.Body;
|
||||||
|
|||||||
@@ -15,19 +15,6 @@ namespace Snap.Hutao.Web.Hoyolab.DynamicSecret;
|
|||||||
[Injection(InjectAs.Transient)]
|
[Injection(InjectAs.Transient)]
|
||||||
public class DynamicSecretHandler : DelegatingHandler
|
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";
|
private const string RandomRange = "abcdefghijklmnopqrstuvwxyz1234567890";
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
@@ -40,7 +27,7 @@ public class DynamicSecretHandler : DelegatingHandler
|
|||||||
string saltType = definations[1];
|
string saltType = definations[1];
|
||||||
bool includeChars = definations[2] == "true";
|
bool includeChars = definations[2] == "true";
|
||||||
|
|
||||||
string salt = DynamicSecrets[saltType];
|
string salt = Core.CoreEnvironment.DynamicSecrets[saltType];
|
||||||
|
|
||||||
long t = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
long t = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user