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>
|
||||
internal static string ViewGuideStepAgreementIHaveReadText {
|
||||
get {
|
||||
|
||||
@@ -1020,7 +1020,7 @@
|
||||
<value>祈愿记录</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepAgreementIHaveReadText" xml:space="preserve">
|
||||
<value>我已阅读</value>
|
||||
<value>我已阅读并同意</value>
|
||||
</data>
|
||||
<data name="ViewGuideStepAgreementIssueReport" xml:space="preserve">
|
||||
<value>问题报告方式与流程</value>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Core;
|
||||
using Snap.Hutao.Core.Shell;
|
||||
using Snap.Hutao.Model;
|
||||
using Snap.Hutao.Model.Entity;
|
||||
@@ -18,6 +19,7 @@ internal sealed class DailyNoteOptions : DbStoreOptions
|
||||
{
|
||||
private const int OneMinute = 60;
|
||||
|
||||
private readonly RuntimeOptions runtimeOptions;
|
||||
private readonly IServiceProvider serviceProvider;
|
||||
private readonly IScheduleTaskInterop scheduleTaskInterop;
|
||||
|
||||
@@ -53,6 +55,12 @@ internal sealed class DailyNoteOptions : DbStoreOptions
|
||||
get => scheduleTaskInterop.IsDailyNoteRefreshEnabled();
|
||||
set
|
||||
{
|
||||
if (runtimeOptions.IsElevated)
|
||||
{
|
||||
// leave below untouched if we are running in elevated privilege
|
||||
return;
|
||||
}
|
||||
|
||||
if (value)
|
||||
{
|
||||
if (SelectedRefreshTime is not null)
|
||||
@@ -74,9 +82,25 @@ internal sealed class DailyNoteOptions : DbStoreOptions
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
if (runtimeOptions.IsElevated)
|
||||
{
|
||||
// leave below untouched if we are running in elevated privilege
|
||||
return;
|
||||
}
|
||||
|
||||
if (value is not null)
|
||||
{
|
||||
if (scheduleTaskInterop.RegisterForDailyNoteRefresh(value.Value))
|
||||
|
||||
@@ -137,6 +137,9 @@
|
||||
ItemsSource="{Binding AchievementGoals}"
|
||||
SelectedItem="{Binding SelectedAchievementGoal, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:SelectedItemInViewBehavior/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style BasedOn="{StaticResource DefaultListViewItemStyle}" TargetType="ListViewItem">
|
||||
<Setter Property="Margin" Value="0,0,6,0"/>
|
||||
@@ -259,6 +262,9 @@
|
||||
ItemsSource="{Binding AchievementGoals}"
|
||||
SelectedItem="{Binding SelectedAchievementGoal, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<mxi:Interaction.Behaviors>
|
||||
<shcb:SelectedItemInViewBehavior/>
|
||||
</mxi:Interaction.Behaviors>
|
||||
<GridView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border MinWidth="180" Style="{StaticResource BorderCardStyle}">
|
||||
|
||||
Reference in New Issue
Block a user