mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix minor bugs
This commit is contained in:
@@ -2599,7 +2599,7 @@ namespace Snap.Hutao.Resource.Localization {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 我已阅读 的本地化字符串。
|
/// 查找类似 我已阅读并同意 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string ViewGuideStepAgreementIHaveReadText {
|
internal static string ViewGuideStepAgreementIHaveReadText {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -1020,7 +1020,7 @@
|
|||||||
<value>祈愿记录</value>
|
<value>祈愿记录</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ViewGuideStepAgreementIHaveReadText" xml:space="preserve">
|
<data name="ViewGuideStepAgreementIHaveReadText" xml:space="preserve">
|
||||||
<value>我已阅读</value>
|
<value>我已阅读并同意</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ViewGuideStepAgreementIssueReport" xml:space="preserve">
|
<data name="ViewGuideStepAgreementIssueReport" xml:space="preserve">
|
||||||
<value>问题报告方式与流程</value>
|
<value>问题报告方式与流程</value>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) DGP Studio. All rights reserved.
|
// Copyright (c) DGP Studio. All rights reserved.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
|
using Snap.Hutao.Core;
|
||||||
using Snap.Hutao.Core.Shell;
|
using Snap.Hutao.Core.Shell;
|
||||||
using Snap.Hutao.Model;
|
using Snap.Hutao.Model;
|
||||||
using Snap.Hutao.Model.Entity;
|
using Snap.Hutao.Model.Entity;
|
||||||
@@ -18,6 +19,7 @@ internal sealed class DailyNoteOptions : DbStoreOptions
|
|||||||
{
|
{
|
||||||
private const int OneMinute = 60;
|
private const int OneMinute = 60;
|
||||||
|
|
||||||
|
private readonly RuntimeOptions runtimeOptions;
|
||||||
private readonly IServiceProvider serviceProvider;
|
private readonly IServiceProvider serviceProvider;
|
||||||
private readonly IScheduleTaskInterop scheduleTaskInterop;
|
private readonly IScheduleTaskInterop scheduleTaskInterop;
|
||||||
|
|
||||||
@@ -53,6 +55,12 @@ internal sealed class DailyNoteOptions : DbStoreOptions
|
|||||||
get => scheduleTaskInterop.IsDailyNoteRefreshEnabled();
|
get => scheduleTaskInterop.IsDailyNoteRefreshEnabled();
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
if (runtimeOptions.IsElevated)
|
||||||
|
{
|
||||||
|
// leave below untouched if we are running in elevated privilege
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
if (SelectedRefreshTime is not null)
|
if (SelectedRefreshTime is not null)
|
||||||
@@ -74,9 +82,25 @@ internal sealed class DailyNoteOptions : DbStoreOptions
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public NameValue<int>? SelectedRefreshTime
|
public NameValue<int>? SelectedRefreshTime
|
||||||
{
|
{
|
||||||
get => GetOption(ref selectedRefreshTime, SettingEntry.DailyNoteRefreshSeconds, time => RefreshTimes.Single(t => t.Value == int.Parse(time, CultureInfo.InvariantCulture)), RefreshTimes[1]);
|
get
|
||||||
|
{
|
||||||
|
if (runtimeOptions.IsElevated)
|
||||||
|
{
|
||||||
|
// leave below untouched if we are running in elevated privilege
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return GetOption(ref selectedRefreshTime, SettingEntry.DailyNoteRefreshSeconds, time => RefreshTimes.Single(t => t.Value == int.Parse(time, CultureInfo.InvariantCulture)), RefreshTimes[1]);
|
||||||
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
if (runtimeOptions.IsElevated)
|
||||||
|
{
|
||||||
|
// leave below untouched if we are running in elevated privilege
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (value is not null)
|
if (value is not null)
|
||||||
{
|
{
|
||||||
if (scheduleTaskInterop.RegisterForDailyNoteRefresh(value.Value))
|
if (scheduleTaskInterop.RegisterForDailyNoteRefresh(value.Value))
|
||||||
|
|||||||
@@ -137,6 +137,9 @@
|
|||||||
ItemsSource="{Binding AchievementGoals}"
|
ItemsSource="{Binding AchievementGoals}"
|
||||||
SelectedItem="{Binding SelectedAchievementGoal, Mode=TwoWay}"
|
SelectedItem="{Binding SelectedAchievementGoal, Mode=TwoWay}"
|
||||||
SelectionMode="Single">
|
SelectionMode="Single">
|
||||||
|
<mxi:Interaction.Behaviors>
|
||||||
|
<shcb:SelectedItemInViewBehavior/>
|
||||||
|
</mxi:Interaction.Behaviors>
|
||||||
<ListView.ItemContainerStyle>
|
<ListView.ItemContainerStyle>
|
||||||
<Style BasedOn="{StaticResource DefaultListViewItemStyle}" TargetType="ListViewItem">
|
<Style BasedOn="{StaticResource DefaultListViewItemStyle}" TargetType="ListViewItem">
|
||||||
<Setter Property="Margin" Value="0,0,6,0"/>
|
<Setter Property="Margin" Value="0,0,6,0"/>
|
||||||
@@ -259,6 +262,9 @@
|
|||||||
ItemsSource="{Binding AchievementGoals}"
|
ItemsSource="{Binding AchievementGoals}"
|
||||||
SelectedItem="{Binding SelectedAchievementGoal, Mode=TwoWay}"
|
SelectedItem="{Binding SelectedAchievementGoal, Mode=TwoWay}"
|
||||||
SelectionMode="Single">
|
SelectionMode="Single">
|
||||||
|
<mxi:Interaction.Behaviors>
|
||||||
|
<shcb:SelectedItemInViewBehavior/>
|
||||||
|
</mxi:Interaction.Behaviors>
|
||||||
<GridView.ItemTemplate>
|
<GridView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Border MinWidth="180" Style="{StaticResource BorderCardStyle}">
|
<Border MinWidth="180" Style="{StaticResource BorderCardStyle}">
|
||||||
|
|||||||
Reference in New Issue
Block a user