diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index e2d5b7b4d..667fbf74d 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -1,4 +1,5 @@ { + "includeTime": "Include time", "accountSupport1": "So far, we have made more than 5,000 improvements to SiYuan. Our unremitting efforts are entirely due to users' recognition and support of SiYuan.", "accountSupport2": "The development of SiYuan cannot be separated from your support. We will continue to make good products with our heart and provide you with a better knowledge management experience.", "goToTab1": "Go to tab #1", diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json index c4ec0f0cb..7676fcaf7 100644 --- a/app/appearance/langs/es_ES.json +++ b/app/appearance/langs/es_ES.json @@ -1,4 +1,5 @@ { + "includeTime": "Incluir tiempo", "accountSupport1": "Hasta ahora, hemos realizado más de 5000 mejoras en SiYuan. Nuestros incansables esfuerzos se deben enteramente al reconocimiento y apoyo de los usuarios a SiYuan.", "accountSupport2": "El desarrollo de SiYuan no puede separarse de su apoyo. Continuaremos fabricando buenos productos con nuestro corazón y brindándole una mejor experiencia de gestión del conocimiento.", "goToTab1": "Ir a la pestaña #1", diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json index 2348714d5..7369e140b 100644 --- a/app/appearance/langs/fr_FR.json +++ b/app/appearance/langs/fr_FR.json @@ -1,4 +1,5 @@ { + "includeTime": "Inclure l'heure", "accountSupport1": "Jusqu'à présent, nous avons apporté plus de 5 000 améliorations à SiYuan. Nos efforts inlassables sont entièrement dus à la reconnaissance et au soutien des utilisateurs pour SiYuan.", "accountSupport2": "Le développement de SiYuan ne peut être séparé de votre soutien. Nous continuerons à fabriquer de bons produits avec notre cœur et à vous offrir une meilleure expérience de gestion des connaissances.", "goToTab1": "Aller à l'onglet #1", diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index e599ce1c9..6fa374544 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -1,4 +1,5 @@ { + "includeTime": "具體時間", "accountSupport1": "到目前為止,我們對思源筆記進行了 5000 多項改進,我們堅持不懈的努力完全源於用戶對思源筆記的認可和支持。", "accountSupport2": "思源筆記的發展離不開你的支持,我們會繼續用心做好產品,為你提供更好的知識管理體驗。", "goToTab1": "跳到第一個頁籤", diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index a568870fb..3b83dc3f7 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -1,4 +1,5 @@ { + "includeTime": "具体时间", "accountSupport1": "到目前为止,我们对思源笔记进行了 5000 多项改进,我们坚持不懈的努力完全源于用户对思源笔记的认可和支持。", "accountSupport2": "思源笔记的发展离不开你的支持,我们会继续用心做好产品,为你提供更好的知识管理体验。", "goToTab1": "跳转到第一个页签", diff --git a/app/src/menus/commonMenuItem.ts b/app/src/menus/commonMenuItem.ts index 2766f1212..cf13b33f7 100644 --- a/app/src/menus/commonMenuItem.ts +++ b/app/src/menus/commonMenuItem.ts @@ -36,7 +36,7 @@ export const openWechatNotify = (nodeElement: Element) => { const reminder = nodeElement.getAttribute(Constants.CUSTOM_REMINDER_WECHAT); let reminderFormat = ""; if (reminder) { - reminderFormat = dayjs(reminder).format("YYYY-MM-DDTHH:mm"); + reminderFormat = dayjs(reminder).format("YYYY-MM-DD HH:mm"); } const dialog = new Dialog({ width: isMobile() ? "92vw" : "50vw", @@ -101,7 +101,7 @@ export const openFileWechatNotify = (protyle: IProtyle) => { const reminder = response.data.ial[Constants.CUSTOM_REMINDER_WECHAT]; let reminderFormat = ""; if (reminder) { - reminderFormat = dayjs(reminder).format("YYYY-MM-DDTHH:mm"); + reminderFormat = dayjs(reminder).format("YYYY-MM-DD HH:mm"); } const dialog = new Dialog({ width: isMobile() ? "92vw" : "50vw", @@ -162,7 +162,7 @@ export const openFileAttr = (attrs: IObject, focusName = "bookmark", protyle?: I notifyHTML = ``; } else if (item.indexOf("custom-av") > -1) { hasAV = true; diff --git a/app/src/protyle/render/av/blockAttr.ts b/app/src/protyle/render/av/blockAttr.ts index 0ddb0ed89..a387b2c10 100644 --- a/app/src/protyle/render/av/blockAttr.ts +++ b/app/src/protyle/render/av/blockAttr.ts @@ -33,14 +33,18 @@ export const genAVValueHTML = (value: IAVCellValue) => { }); break; case "date": + if (value[value.type].isNotEmpty) { + html = `${dayjs(value[value.type].content).format(value[value.type].isNotTime ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm")}`; + } + if (value[value.type].hasEndDate && value[value.type].isNotEmpty2 && value[value.type].isNotEmpty) { + html += `${dayjs(value[value.type].content2).format(value[value.type].isNotTime ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm")}`; + } + break; case "created": case "updated": if (value[value.type].isNotEmpty) { html = `${dayjs(value[value.type].content).format("YYYY-MM-DD HH:mm")}`; } - if (value[value.type].hasEndDate && value[value.type].isNotEmpty2 && value[value.type].isNotEmpty) { - html += `${dayjs(value[value.type].content2).format("YYYY-MM-DD HH:mm")}`; - } break; case "url": html = ` diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index 3936b983d..a38c86e5c 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -113,6 +113,7 @@ export const genCellValue = (colType: TAVCol, value: string | any) => { content2: null, isNotEmpty2: false, hasEndDate: false, + isNotTime: true, } }; } diff --git a/app/src/protyle/render/av/date.ts b/app/src/protyle/render/av/date.ts index 01aea4fd0..62c18abd4 100644 --- a/app/src/protyle/render/av/date.ts +++ b/app/src/protyle/render/av/date.ts @@ -27,22 +27,27 @@ export const getDateHTML = (data: IAVTable, cellElements: HTMLElement[]) => { } let value = ""; if (cellValue?.value?.date?.isNotEmpty) { - value = dayjs(cellValue.value.date.content).format("YYYY-MM-DDTHH:mm"); + value = dayjs(cellValue.value.date.content).format(cellValue.value.date.isNotTime ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm"); } let value2 = ""; if (cellValue?.value?.date?.isNotEmpty2) { - value2 = dayjs(cellValue.value.date.content2).format("YYYY-MM-DDTHH:mm"); + value2 = dayjs(cellValue.value.date.content2).format(cellValue.value.date.isNotTime ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm"); } return `