Skip to content

Commit

Permalink
Merge pull request #38 from a-nano-dust/fix-部分功能优化
Browse files Browse the repository at this point in the history
[FIX]修复插件重启后季度命名方式不能正常生效的问题;优化文件命名规则设置项的描述,未设置文件命名规则的时候,在描述中提示不能创建笔记文件
  • Loading branch information
a-nano-dust committed Jun 4, 2024
2 parents 5eea090 + 8af2076 commit 3fc06a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default class DustCalendarPlugin extends Plugin {
// 加载插件设置
await this.database.loadSetting();
this.templateController.updateTemplatePlugin(this.database.setting.templatePlugin);
this.viewController.setQuarterNameMode(this.database.setting.quarterNameMode);

// 注册日历视图
this.registerView(VIEW_TYPE_CALENDAR, (leaf) => new CalendarView(leaf, this));
Expand Down
5 changes: 4 additions & 1 deletion src/view/setting/NotePattern.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export default function NotePattern({plugin, noteType}: { plugin: DustCalendarPl
<div>请使用&nbsp;<a
href="src/view/setting/DailyNotePattern#/formatting?id=table-of-tokens">luxon语法</a>&nbsp;指定笔记文件的生成路径。
</div>
<div>规则应用后的文件路径为(基于当前日期):{text}</div>
{notePattern.length === 0
? <div className="d-color-error">尚未配置文件命名规则,Dust Calendar 将无法为您创建笔记文件。</div>
: <div>规则应用后的文件路径为(基于当前日期):{text}</div>
}
</div>
</div>
<div className="setting-item-control">
Expand Down

0 comments on commit 3fc06a4

Please sign in to comment.