From b37bc1c939ea03eb153021efddafef0085a9e34e Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 27 Oct 2023 15:34:20 +0800 Subject: [PATCH 1/3] Revert ":art:" This reverts commit e8577e8573b925a89f40fa47bff4df4fd3b0736e. --- app/src/assets/scss/component/_button.scss | 2 +- app/src/config/account.ts | 62 ++++------------------ 2 files changed, 12 insertions(+), 52 deletions(-) diff --git a/app/src/assets/scss/component/_button.scss b/app/src/assets/scss/component/_button.scss index e8f4509d1..56bd15337 100644 --- a/app/src/assets/scss/component/_button.scss +++ b/app/src/assets/scss/component/_button.scss @@ -62,7 +62,7 @@ min-width: 214px; background: var(--b3-theme-secondary); color:var(--b3-theme-on-secondary); - padding: 16px; + padding: 24px 16px; font-size: 16px; } diff --git a/app/src/config/account.ts b/app/src/config/account.ts index 729200b42..91f2754da 100644 --- a/app/src/config/account.ts +++ b/app/src/config/account.ts @@ -15,60 +15,20 @@ import {getCloudURL} from "./util/about"; export const account = { element: undefined as Element, genHTML: (onlyPayHTML = false) => { - const payHTML = `
-
- - S3/WebDAV 数据同步和备份 -
-
- - 搜索资源文件内容 -
- - - ${window.siyuan.languages.freeSub} - - - - ${window.siyuan.languages.sponsor} - -
-
-
-
-         功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能 -
-
-
-         功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能特性功能 -
-
-
-
-
-

功能特性

-
- ¥64 -
¥48 终身
-
-
-
-

团购优惠

-
- 低至 -
¥ 96 首年
-
-
-
-

年付订阅

-
- ¥192 -
¥148 每年
-
-
+ const payHTML = `
${window.siyuan.languages.account2}
${window.siyuan.languages.account1} + +
+ + + ${window.siyuan.languages.freeSub} + +
+ + + ${window.siyuan.languages.sponsor} `; if (onlyPayHTML) { return `
${payHTML}
`; From ee5081418937970c98782a0408f17130e612fd1d Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 27 Oct 2023 15:56:07 +0800 Subject: [PATCH 2/3] :art: Update text --- app/appearance/langs/en_US.json | 2 ++ app/appearance/langs/es_ES.json | 2 ++ app/appearance/langs/fr_FR.json | 2 ++ app/appearance/langs/zh_CHT.json | 2 ++ app/appearance/langs/zh_CN.json | 2 ++ app/src/config/account.ts | 14 +++++++++++--- 6 files changed, 21 insertions(+), 3 deletions(-) diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index 33938508e..e2d5b7b4d 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -1,4 +1,6 @@ { + "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", "goToTab2": "Go to tab #2", "goToTab3": "Go to tab #3", diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json index 88601fd50..c4ec0f0cb 100644 --- a/app/appearance/langs/es_ES.json +++ b/app/appearance/langs/es_ES.json @@ -1,4 +1,6 @@ { + "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", "goToTab2": "Ir a la pestaña #2", "goToTab3": "Ir a la pestaña #3", diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json index 80e8d3783..2348714d5 100644 --- a/app/appearance/langs/fr_FR.json +++ b/app/appearance/langs/fr_FR.json @@ -1,4 +1,6 @@ { + "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", "goToTab2": "Aller à l'onglet #2", "goToTab3": "Aller à l'onglet #3", diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index 1e071c535..e599ce1c9 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -1,4 +1,6 @@ { + "accountSupport1": "到目前為止,我們對思源筆記進行了 5000 多項改進,我們堅持不懈的努力完全源於用戶對思源筆記的認可和支持。", + "accountSupport2": "思源筆記的發展離不開你的支持,我們會繼續用心做好產品,為你提供更好的知識管理體驗。", "goToTab1": "跳到第一個頁籤", "goToTab2": "跳到第二個頁籤", "goToTab3": "跳到第三個頁籤", diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index 8037e746f..a568870fb 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -1,4 +1,6 @@ { + "accountSupport1": "到目前为止,我们对思源笔记进行了 5000 多项改进,我们坚持不懈的努力完全源于用户对思源笔记的认可和支持。", + "accountSupport2": "思源笔记的发展离不开你的支持,我们会继续用心做好产品,为你提供更好的知识管理体验。", "goToTab1": "跳转到第一个页签", "goToTab2": "跳转到第二个页签", "goToTab3": "跳转到第三个页签", diff --git a/app/src/config/account.ts b/app/src/config/account.ts index 91f2754da..0e2f2eca8 100644 --- a/app/src/config/account.ts +++ b/app/src/config/account.ts @@ -15,8 +15,7 @@ import {getCloudURL} from "./util/about"; export const account = { element: undefined as Element, genHTML: (onlyPayHTML = false) => { - const payHTML = `
${window.siyuan.languages.account2}
-
+ const payHTML = ` ${window.siyuan.languages.account1} @@ -29,7 +28,16 @@ export const account = { ${window.siyuan.languages.sponsor} -`; + +
+
+${window.siyuan.languages.accountSupport1} +
+
+
+${window.siyuan.languages.accountSupport2} +
+
`; if (onlyPayHTML) { return `
${payHTML}
`; } From eb8023277196b320dbfe9299de9fb6c03e51f2da Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 27 Oct 2023 21:16:54 +0800 Subject: [PATCH 3/3] :art: Add specific time switch to database date field https://github.com/siyuan-note/siyuan/issues/9486 --- kernel/av/av.go | 19 ++++++++++++++++--- kernel/av/table.go | 13 ++++++++++--- kernel/model/export.go | 2 +- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/kernel/av/av.go b/kernel/av/av.go index a07ab4b50..0b87967ae 100644 --- a/kernel/av/av.go +++ b/kernel/av/av.go @@ -364,6 +364,7 @@ type ValueDate struct { Content int64 `json:"content"` IsNotEmpty bool `json:"isNotEmpty"` HasEndDate bool `json:"hasEndDate"` + IsNotTime bool `json:"isNotTime"` Content2 int64 `json:"content2"` IsNotEmpty2 bool `json:"isNotEmpty2"` FormattedContent string `json:"formattedContent"` @@ -376,10 +377,21 @@ const ( DateFormatDuration DateFormat = "duration" ) -func NewFormattedValueDate(content, content2 int64, format DateFormat) (ret *ValueDate) { - formatted := time.UnixMilli(content).Format("2006-01-02 15:04") +func NewFormattedValueDate(content, content2 int64, format DateFormat, isNotTime bool) (ret *ValueDate) { + var formatted string + if isNotTime { + formatted = time.UnixMilli(content).Format("2006-01-02") + } else { + formatted = time.UnixMilli(content).Format("2006-01-02 15:04") + } if 0 < content2 { - formatted += " → " + time.UnixMilli(content2).Format("2006-01-02 15:04") + var formattedContent2 string + if isNotTime { + formattedContent2 = time.UnixMilli(content2).Format("2006-01-02") + } else { + formattedContent2 = time.UnixMilli(content2).Format("2006-01-02 15:04") + } + formatted += " → " + formattedContent2 } switch format { case DateFormatNone: @@ -392,6 +404,7 @@ func NewFormattedValueDate(content, content2 int64, format DateFormat) (ret *Val Content: content, Content2: content2, HasEndDate: false, + IsNotTime: true, FormattedContent: formatted, } return diff --git a/kernel/av/table.go b/kernel/av/table.go index 0c0963c73..53c4fe78a 100644 --- a/kernel/av/table.go +++ b/kernel/av/table.go @@ -1123,43 +1123,50 @@ func (table *Table) calcColDate(col *TableColumn, colIndex int) { } case CalcOperatorEarliest: earliest := int64(0) + var isNotTime bool for _, row := range table.Rows { if nil != row.Cells[colIndex] && nil != row.Cells[colIndex].Value && nil != row.Cells[colIndex].Value.Date && row.Cells[colIndex].Value.Date.IsNotEmpty { if 0 == earliest || earliest > row.Cells[colIndex].Value.Date.Content { earliest = row.Cells[colIndex].Value.Date.Content + isNotTime = row.Cells[colIndex].Value.Date.IsNotTime } } } if 0 != earliest { - col.Calc.Result = &Value{Date: NewFormattedValueDate(earliest, 0, DateFormatNone)} + col.Calc.Result = &Value{Date: NewFormattedValueDate(earliest, 0, DateFormatNone, isNotTime)} } case CalcOperatorLatest: latest := int64(0) + var isNotTime bool for _, row := range table.Rows { if nil != row.Cells[colIndex] && nil != row.Cells[colIndex].Value && nil != row.Cells[colIndex].Value.Date && row.Cells[colIndex].Value.Date.IsNotEmpty { if 0 == latest || latest < row.Cells[colIndex].Value.Date.Content { latest = row.Cells[colIndex].Value.Date.Content + isNotTime = row.Cells[colIndex].Value.Date.IsNotTime } } } if 0 != latest { - col.Calc.Result = &Value{Date: NewFormattedValueDate(latest, 0, DateFormatNone)} + col.Calc.Result = &Value{Date: NewFormattedValueDate(latest, 0, DateFormatNone, isNotTime)} } case CalcOperatorRange: earliest := int64(0) latest := int64(0) + var isNotTime bool for _, row := range table.Rows { if nil != row.Cells[colIndex] && nil != row.Cells[colIndex].Value && nil != row.Cells[colIndex].Value.Date && row.Cells[colIndex].Value.Date.IsNotEmpty { if 0 == earliest || earliest > row.Cells[colIndex].Value.Date.Content { earliest = row.Cells[colIndex].Value.Date.Content + isNotTime = row.Cells[colIndex].Value.Date.IsNotTime } if 0 == latest || latest < row.Cells[colIndex].Value.Date.Content { latest = row.Cells[colIndex].Value.Date.Content + isNotTime = row.Cells[colIndex].Value.Date.IsNotTime } } } if 0 != earliest && 0 != latest { - col.Calc.Result = &Value{Date: NewFormattedValueDate(earliest, latest, DateFormatDuration)} + col.Calc.Result = &Value{Date: NewFormattedValueDate(earliest, latest, DateFormatDuration, isNotTime)} } } } diff --git a/kernel/model/export.go b/kernel/model/export.go index b17c6b3de..c104dab11 100644 --- a/kernel/model/export.go +++ b/kernel/model/export.go @@ -1946,7 +1946,7 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool, if nil != cell.Value { if av.KeyTypeDate == cell.Value.Type { if nil != cell.Value.Date { - cell.Value.Date = av.NewFormattedValueDate(cell.Value.Date.Content, cell.Value.Date.Content2, av.DateFormatNone) + cell.Value.Date = av.NewFormattedValueDate(cell.Value.Date.Content, cell.Value.Date.Content2, av.DateFormatNone, cell.Value.Date.IsNotTime) } } else if av.KeyTypeCreated == cell.Value.Type { if nil != cell.Value.Created {