fix daily note setting

This commit is contained in:
qhy040404
2024-05-26 11:16:46 +08:00
parent 492e867391
commit c1bf3dad52
3 changed files with 8 additions and 1 deletions

View File

@@ -1964,6 +1964,9 @@
<data name="ViewPageDailyNoteNotificationSetting" xml:space="preserve">
<value>通知设置</value>
</data>
<data name="ViewPageDailyNoteNotificationUnavailableHint" xml:space="preserve">
<value>胡桃的通知权限已被关闭</value>
</data>
<data name="ViewPageDailyNoteRefresh" xml:space="preserve">
<value>立即刷新</value>
</data>

View File

@@ -545,7 +545,7 @@
</cwcont:HeaderedContentControl.Header>
<StackPanel Spacing="{StaticResource SettingsCardSpacing}">
<InfoBar
Title="胡桃的通知权限已被关闭"
Title="{shcm:ResourceString Name=ViewPageDailyNoteNotificationUnavailableHint}"
IsClosable="False"
IsOpen="True"
Severity="Warning"

View File

@@ -3,6 +3,7 @@
using Microsoft.UI.Xaml.Controls;
using Snap.Hutao.Control.Extension;
using Snap.Hutao.Core;
using Snap.Hutao.Core.ExceptionService;
using Snap.Hutao.Factory.ContentDialog;
using Snap.Hutao.Model.Entity;
@@ -31,6 +32,7 @@ internal sealed partial class DailyNoteViewModel : Abstraction.ViewModel
private readonly DailyNoteOptions dailyNoteOptions;
private readonly IMetadataService metadataService;
private readonly IInfoBarService infoBarService;
private readonly RuntimeOptions runtimeOptions;
private readonly ITaskContext taskContext;
private readonly IUserService userService;
private readonly AppOptions appOptions;
@@ -40,6 +42,8 @@ internal sealed partial class DailyNoteViewModel : Abstraction.ViewModel
public DailyNoteOptions DailyNoteOptions { get => dailyNoteOptions; }
public RuntimeOptions RuntimeOptions { get => runtimeOptions; }
public AppOptions AppOptions { get => appOptions; }
public IWebViewerSource VerifyUrlSource { get; } = new DailyNoteWebViewerSource();