From e489737e174984910b66b45c81d0d11f0ebec3c8 Mon Sep 17 00:00:00 2001 From: roger Date: Thu, 29 Feb 2024 10:04:41 +0800 Subject: [PATCH] fix: 1.When the first day of a week is not set, an exception occurs in the plug-in. 2.The text for setting the first day of a week is not displayed. --- CHANGELOG.md | 7 ++++++- plugin.json | 2 +- src/ScheduleManager.ts | 2 +- src/i18n/en_US.json | 3 ++- src/i18n/zh_CN.json | 3 ++- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bb9122..f21e0dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -117,4 +117,9 @@ ## v1.2.8 ### feat: -1. 支持设置一周开始时间 [#37] \ No newline at end of file +1. 支持设置一周开始时间 [#37] + +## v1.2.9 +### fix: +1. 未设置一周从哪天开始时,插件出现异常 [#38] +2. 设置一周从哪天开始设置项的文字未显示 \ No newline at end of file diff --git a/plugin.json b/plugin.json index 5d8bc21..e964eb2 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "name": "siyuan-plugin-schedule-manager", "author": "RogerHuHu", "url": "https://github.com/RogerHuHu/siyuan-plugin-schedule-manager", - "version": "1.2.8", + "version": "1.2.9", "minAppVersion": "2.10.6", "backends": ["all"], "frontends": ["all"], diff --git a/src/ScheduleManager.ts b/src/ScheduleManager.ts index f29bc19..c0eadee 100644 --- a/src/ScheduleManager.ts +++ b/src/ScheduleManager.ts @@ -236,7 +236,7 @@ export class ScheduleManager { doc.archiveTime = response.data['custom-archiveTime']; doc.firstDayOfWeek = response.data["custom-firstDayOfWeek"]; globalData.archiveTime = doc.archiveTime === undefined ? 7 : parseInt(doc.archiveTime, 10); - globalData.selectedFirstDayOfWeek = doc.firstDayOfWeek; + globalData.selectedFirstDayOfWeek = doc.firstDayOfWeek === undefined ? 0 : doc.firstDayOfWeek; }) } } diff --git a/src/i18n/en_US.json b/src/i18n/en_US.json index e4a647b..37e2d8c 100644 --- a/src/i18n/en_US.json +++ b/src/i18n/en_US.json @@ -58,5 +58,6 @@ "confirmRemove": "Confirm to delete the data in ${name}?", "insertEmoji": "Insert Emoji", "archiveTime": "Archive time", - "hasUpdated": "Has updated" + "hasUpdated": "Has updated", + "firstdayOfWeek": "First day of week" } \ No newline at end of file diff --git a/src/i18n/zh_CN.json b/src/i18n/zh_CN.json index 3ece3fa..ebc9960 100644 --- a/src/i18n/zh_CN.json +++ b/src/i18n/zh_CN.json @@ -58,5 +58,6 @@ "confirmRemove": "确认删除 ${name} 中的数据?", "insertEmoji": "插入表情", "archiveTime": "归档时间", - "hasUpdated": "已更新" + "hasUpdated": "已更新", + "firstDayOfWeek": "一周开始" }