diff --git a/README.md b/README.md
index 1ccc1ce89..e7daf86de 100644
--- a/README.md
+++ b/README.md
@@ -223,7 +223,7 @@ For more details, please refer to [Development Guide](https://github.com/siyuan-
* If it is installed through the installation package on the desktop, you can open the option of Settings - About - Automatically download update installation package, so that SiYuan will automatically download The latest version of the installation package and prompts to install
* If it is installed by manual installation package, please download the installation package again to install
-You can Check update in Settings - About - Current Version, or by following [GitHub Releases](https ://github.com/siyuan-note/siyuan/releases) or [SiYuan Announcement](https://ld246.com/tag/siyuan-announcement) to get the new version.
+You can Check update in Settings - About - Current Version, or by following [GitHub Releases](https://github.com/siyuan-note/siyuan/releases) or [SiYuan Announcement](https://ld246.com/tag/siyuan-announcement) to get the new version.
**Note**: Do not place the workspace in the installation directory, because the updated version will clear all files in the installation directory
@@ -260,9 +260,13 @@ The first sub-block under the list item is the block icon omitted. You can move
### Do I need to pay for it?
-Local functions are completely free to use, [Cloud services](https://b3log.org/siyuan/en/pricing.html) requires annual subscription.
+All local features are free, even for commercial use.
-Currently, only users in mainland China are supported to subscribe, and users who are not in mainland China should not subscribe.
+[Cloud Service](https://b3log.org/siyuan/pricing.html) requires an annual subscription. At present, only users in mainland China are supported to subscribe, and users outside of mainland China are not allowed to subscribe.
+
+If you don't need a subscription but would like to support development, you are welcome to make a donation:
+
+* [B3log - Open Collective](https://opencollective.com/b3log)
## 🙏 Acknowledgement
diff --git a/README_zh_CN.md b/README_zh_CN.md
index 4c6541894..13949b0fa 100644
--- a/README_zh_CN.md
+++ b/README_zh_CN.md
@@ -271,9 +271,14 @@
### 使用需要付费吗?
-本地功能完全免费使用,[云端服务](https://b3log.org/siyuan/pricing.html)需要年付订阅。
+所有本地功能都是免费的,即使是在商业环境下使用。
-目前仅支持中国大陆地区用户订阅,非中国大陆地区用户请勿订阅。
+[云端服务](https://b3log.org/siyuan/pricing.html)需要年付订阅。目前仅支持中国大陆地区用户订阅,非中国大陆地区用户请勿订阅。
+
+如果你没有订阅需求但又想支持开发,欢迎进行捐赠:
+
+* [靠爱发电 - 链滴](https://ld246.com/sponsor)
+* [B3log - Open Collective](https://opencollective.com/b3log)
## 🙏 鸣谢
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234731-h3zkwm2.sy b/app/guide/20210808180117-6v0mkxr/20200923234731-h3zkwm2.sy
index db95d89ab..c69a1ea76 100644
--- a/app/guide/20210808180117-6v0mkxr/20200923234731-h3zkwm2.sy
+++ b/app/guide/20210808180117-6v0mkxr/20200923234731-h3zkwm2.sy
@@ -7,7 +7,7 @@
"id": "20200923234731-h3zkwm2",
"title": "FAQ",
"type": "doc",
- "updated": "20230112002556"
+ "updated": "20230406112010"
},
"Children": [
{
@@ -1978,10 +1978,6 @@
"id": "20201224120448-0rqote3"
},
"Children": [
- {
- "Type": "NodeHeadingC8hMarker",
- "Data": "## "
- },
{
"Type": "NodeText",
"Data": "Do I need to pay for it?"
@@ -1989,40 +1985,91 @@
]
},
{
- "ID": "20201224120448-20hmjfc",
+ "ID": "20230406111519-ro0o3iv",
"Type": "NodeParagraph",
"Properties": {
- "id": "20201224120448-20hmjfc",
- "updated": "20220703000708"
+ "id": "20230406111519-ro0o3iv",
+ "updated": "20230406111521"
},
"Children": [
{
"Type": "NodeText",
- "Data": "Local functions are completely free to use, "
- },
- {
- "Type": "NodeTextMark",
- "TextMarkType": "a",
- "TextMarkAHref": "https://b3log.org/siyuan/en/pricing.html",
- "TextMarkTextContent": "Cloud services"
- },
- {
- "Type": "NodeText",
- "Data": " requires annual subscription."
+ "Data": "All local features are free, even for commercial use."
}
]
},
{
- "ID": "20220703000434-rpabrb5",
+ "ID": "20230406111508-0lt5im7",
"Type": "NodeParagraph",
"Properties": {
- "id": "20220703000434-rpabrb5",
- "updated": "20221112210752"
+ "id": "20230406111508-0lt5im7",
+ "updated": "20230406111508"
+ },
+ "Children": [
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "a",
+ "TextMarkAHref": "https://b3log.org/siyuan/pricing.html",
+ "TextMarkTextContent": "Cloud Service"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " requires an annual subscription. At present, only users in mainland China are supported to subscribe, and users outside of mainland China are not allowed to subscribe."
+ }
+ ]
+ },
+ {
+ "ID": "20230406112010-97r5e5d",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20230406112010-97r5e5d",
+ "updated": "20230406112010"
},
"Children": [
{
"Type": "NodeText",
- "Data": "Currently, only users in mainland China are supported to subscribe, and users who are not in mainland China should not subscribe."
+ "Data": "If you don't need a subscription but would like to support development, you are welcome to make a donation:"
+ }
+ ]
+ },
+ {
+ "ID": "20230406112010-my4qnoy",
+ "Type": "NodeList",
+ "ListData": {},
+ "Properties": {
+ "id": "20230406112010-my4qnoy",
+ "updated": "20230406112010"
+ },
+ "Children": [
+ {
+ "ID": "20230406112010-cmr795u",
+ "Type": "NodeListItem",
+ "ListData": {
+ "BulletChar": 42,
+ "Marker": "Kg=="
+ },
+ "Properties": {
+ "id": "20230406112010-cmr795u",
+ "updated": "20230406112010"
+ },
+ "Children": [
+ {
+ "ID": "20230406112010-j8z0apy",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20230406112010-j8z0apy",
+ "updated": "20230406112010"
+ },
+ "Children": [
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "a",
+ "TextMarkAHref": "https://opencollective.com/b3log",
+ "TextMarkTextContent": "B3log - Open Collective"
+ }
+ ]
+ }
+ ]
}
]
}
diff --git a/app/guide/20210808180117-czj9bvb/20200813093015-u6bopdt.sy b/app/guide/20210808180117-czj9bvb/20200813093015-u6bopdt.sy
index 670ba381f..58e368c16 100644
--- a/app/guide/20210808180117-czj9bvb/20200813093015-u6bopdt.sy
+++ b/app/guide/20210808180117-czj9bvb/20200813093015-u6bopdt.sy
@@ -7,7 +7,7 @@
"id": "20200813093015-u6bopdt",
"title": "常见问题",
"type": "doc",
- "updated": "20230112002504"
+ "updated": "20230406111942"
},
"Children": [
{
@@ -2079,13 +2079,23 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20201224120447-xj9cd10",
- "updated": "20220820000331"
+ "updated": "20230406111412"
},
"Children": [
{
"Type": "NodeText",
- "Data": "本地功能完全免费使用,"
- },
+ "Data": "所有本地功能都是免费的,即使是在商业环境下使用。"
+ }
+ ]
+ },
+ {
+ "ID": "20230406111417-9705mvn",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20230406111417-9705mvn",
+ "updated": "20230406111421"
+ },
+ "Children": [
{
"Type": "NodeTextMark",
"TextMarkType": "a",
@@ -2094,21 +2104,92 @@
},
{
"Type": "NodeText",
- "Data": "需要年付订阅。"
+ "Data": "需要年付订阅。目前仅支持中国大陆地区用户订阅,非中国大陆地区用户请勿订阅。"
}
]
},
{
- "ID": "20220820000332-5y9gknk",
+ "ID": "20230406111610-s0vr122",
"Type": "NodeParagraph",
"Properties": {
- "id": "20220820000332-5y9gknk",
- "updated": "20221112210731"
+ "id": "20230406111610-s0vr122",
+ "updated": "20230406111942"
},
"Children": [
{
"Type": "NodeText",
- "Data": "目前仅支持中国大陆地区用户订阅,非中国大陆地区用户请勿订阅。"
+ "Data": "如果你没有订阅需求但又想支持开发,欢迎进行捐赠:"
+ }
+ ]
+ },
+ {
+ "ID": "20230406111846-ph7umq6",
+ "Type": "NodeList",
+ "ListData": {},
+ "Properties": {
+ "id": "20230406111846-ph7umq6",
+ "updated": "20230406111934"
+ },
+ "Children": [
+ {
+ "ID": "20230406111855-v2fuz94",
+ "Type": "NodeListItem",
+ "ListData": {
+ "BulletChar": 42,
+ "Marker": "Kg=="
+ },
+ "Properties": {
+ "id": "20230406111855-v2fuz94",
+ "updated": "20230406111909"
+ },
+ "Children": [
+ {
+ "ID": "20230406111855-uuos149",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20230406111855-uuos149",
+ "updated": "20230406111909"
+ },
+ "Children": [
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "a",
+ "TextMarkAHref": "https://ld246.com/sponsor",
+ "TextMarkTextContent": "靠爱发电 - 链滴"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "ID": "20230406111847-hszqryy",
+ "Type": "NodeListItem",
+ "ListData": {
+ "BulletChar": 42,
+ "Marker": "Kg=="
+ },
+ "Properties": {
+ "id": "20230406111847-hszqryy",
+ "updated": "20230406111934"
+ },
+ "Children": [
+ {
+ "ID": "20230406111847-qe9lvb0",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20230406111847-qe9lvb0",
+ "updated": "20230406111934"
+ },
+ "Children": [
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "a",
+ "TextMarkAHref": "https://opencollective.com/b3log",
+ "TextMarkTextContent": "B3log - Open Collective"
+ }
+ ]
+ }
+ ]
}
]
}
diff --git a/app/guide/20211226090932-5lcq56f/20211226115227-r1rty9v.sy b/app/guide/20211226090932-5lcq56f/20211226115227-r1rty9v.sy
index 5e499e796..d4688c501 100644
--- a/app/guide/20211226090932-5lcq56f/20211226115227-r1rty9v.sy
+++ b/app/guide/20211226090932-5lcq56f/20211226115227-r1rty9v.sy
@@ -6,7 +6,7 @@
"icon": "2753",
"id": "20211226115227-r1rty9v",
"title": "常見問題",
- "updated": "20230112002617"
+ "updated": "20230406111957"
},
"Children": [
{
@@ -1976,40 +1976,91 @@
]
},
{
- "ID": "20211226115356-flfljlv",
+ "ID": "20230406111448-cuahrpa",
"Type": "NodeParagraph",
"Properties": {
- "id": "20211226115356-flfljlv",
- "updated": "20211225214824"
+ "id": "20230406111448-cuahrpa",
+ "updated": "20230406111448"
},
"Children": [
{
"Type": "NodeText",
- "Data": "本地功能完全免費使用,"
- },
- {
- "Type": "NodeTextMark",
- "TextMarkType": "a",
- "TextMarkAHref": "https://b3log.org/siyuan/en/pricing.html",
- "TextMarkTextContent": "雲端服務"
- },
- {
- "Type": "NodeText",
- "Data": "需要年付訂閱。"
+ "Data": "所有本地功能都是免費的,即使是在商業環境下使用。"
}
]
},
{
- "ID": "20211226115356-zk19o1w",
+ "ID": "20230406111448-rqncida",
"Type": "NodeParagraph",
"Properties": {
- "id": "20211226115356-zk19o1w",
- "updated": "20221112210745"
+ "id": "20230406111448-rqncida",
+ "updated": "20230406111448"
+ },
+ "Children": [
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "a",
+ "TextMarkAHref": "https://b3log.org/siyuan/pricing.html",
+ "TextMarkTextContent": "雲端服務"
+ },
+ {
+ "Type": "NodeText",
+ "Data": "需要年付訂閱。目前僅支持中國大陸地區用戶訂閱,非中國大陸地區用戶請勿訂閱。"
+ }
+ ]
+ },
+ {
+ "ID": "20230406111957-2x6i7jd",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20230406111957-2x6i7jd",
+ "updated": "20230406111957"
},
"Children": [
{
"Type": "NodeText",
- "Data": "目前僅支持中國大陸地區用戶訂閱,非中國大陸地區用戶請勿訂閱。"
+ "Data": "如果你沒有訂閱需求但又想支持開發,歡迎進行捐贈:"
+ }
+ ]
+ },
+ {
+ "ID": "20230406111957-oashpwx",
+ "Type": "NodeList",
+ "ListData": {},
+ "Properties": {
+ "id": "20230406111957-oashpwx",
+ "updated": "20230406111957"
+ },
+ "Children": [
+ {
+ "ID": "20230406111957-9ufzoez",
+ "Type": "NodeListItem",
+ "ListData": {
+ "BulletChar": 42,
+ "Marker": "Kg=="
+ },
+ "Properties": {
+ "id": "20230406111957-9ufzoez",
+ "updated": "20230406111957"
+ },
+ "Children": [
+ {
+ "ID": "20230406111957-veoua0c",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20230406111957-veoua0c",
+ "updated": "20230406111957"
+ },
+ "Children": [
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "a",
+ "TextMarkAHref": "https://opencollective.com/b3log",
+ "TextMarkTextContent": "B3log - Open Collective"
+ }
+ ]
+ }
+ ]
}
]
}
diff --git a/kernel/conf/sync.go b/kernel/conf/sync.go
index 910bb1721..686b2d448 100644
--- a/kernel/conf/sync.go
+++ b/kernel/conf/sync.go
@@ -63,6 +63,14 @@ const (
ProviderWebDAV = 3 // ProviderWebDAV 为 WebDAV 协议提供的云端存储服务
)
-func NewSyncProviderCheckURL() string {
- return "https://www.baidu.com"
+func ProviderToStr(provider int) string {
+ switch provider {
+ case ProviderSiYuan:
+ return "SiYuan"
+ case ProviderS3:
+ return "S3"
+ case ProviderWebDAV:
+ return "WebDAV"
+ }
+ return "Unknown"
}
diff --git a/kernel/model/export.go b/kernel/model/export.go
index 82573e9fc..98237f737 100644
--- a/kernel/model/export.go
+++ b/kernel/model/export.go
@@ -288,7 +288,7 @@ func exportData(exportFolder string) (zipPath string, err error) {
data := filepath.Join(util.WorkspaceDir, "data")
if err = filelock.RoboCopy(data, exportFolder); nil != err {
logging.LogErrorf("copy data dir from [%s] to [%s] failed: %s", data, baseFolderName, err)
- err = errors.New(fmt.Sprintf(Conf.Language(14), formatErrorMsg(err)))
+ err = errors.New(fmt.Sprintf(Conf.Language(14), err.Error()))
return
}
diff --git a/kernel/model/repository.go b/kernel/model/repository.go
index 03d21b8ef..226c57cf9 100644
--- a/kernel/model/repository.go
+++ b/kernel/model/repository.go
@@ -594,7 +594,7 @@ func UploadCloudSnapshot(tag, id string) (err error) {
err = fmt.Errorf(Conf.Language(84), Conf.Language(154))
return
}
- err = errors.New(fmt.Sprintf(Conf.Language(84), formatErrorMsg(err)))
+ err = errors.New(fmt.Sprintf(Conf.Language(84), formatRepoErrorMsg(err)))
return
}
msg := fmt.Sprintf(Conf.Language(152), uploadFileCount, uploadChunkCount, humanize.Bytes(uint64(uploadBytes)))
@@ -827,7 +827,7 @@ func syncRepoDownload() (err error) {
planSyncAfter(fixSyncInterval)
logging.LogErrorf("sync data repo download failed: %s", err)
- msg := fmt.Sprintf(Conf.Language(80), formatErrorMsg(err))
+ msg := fmt.Sprintf(Conf.Language(80), formatRepoErrorMsg(err))
if errors.Is(err, dejavu.ErrCloudStorageSizeExceeded) {
msg = fmt.Sprintf(Conf.Language(43), humanize.Bytes(uint64(Conf.User.UserSiYuanRepoSize)))
if 2 == Conf.User.UserSiYuanSubscriptionPlan {
@@ -894,7 +894,7 @@ func syncRepoUpload() (err error) {
planSyncAfter(fixSyncInterval)
logging.LogErrorf("sync data repo upload failed: %s", err)
- msg := fmt.Sprintf(Conf.Language(80), formatErrorMsg(err))
+ msg := fmt.Sprintf(Conf.Language(80), formatRepoErrorMsg(err))
if errors.Is(err, dejavu.ErrCloudStorageSizeExceeded) {
msg = fmt.Sprintf(Conf.Language(43), humanize.Bytes(uint64(Conf.User.UserSiYuanRepoSize)))
if 2 == Conf.User.UserSiYuanSubscriptionPlan {
@@ -978,7 +978,7 @@ func bootSyncRepo() (err error) {
planSyncAfter(fixSyncInterval)
logging.LogErrorf("sync data repo failed: %s", err)
- msg := fmt.Sprintf(Conf.Language(80), formatErrorMsg(err))
+ msg := fmt.Sprintf(Conf.Language(80), formatRepoErrorMsg(err))
if errors.Is(err, dejavu.ErrCloudStorageSizeExceeded) {
msg = fmt.Sprintf(Conf.Language(43), humanize.Bytes(uint64(Conf.User.UserSiYuanRepoSize)))
if 2 == Conf.User.UserSiYuanSubscriptionPlan {
@@ -1053,7 +1053,7 @@ func syncRepo(exit, byHand bool) (err error) {
planSyncAfter(fixSyncInterval)
logging.LogErrorf("sync data repo failed: %s", err)
- msg := fmt.Sprintf(Conf.Language(80), formatErrorMsg(err))
+ msg := fmt.Sprintf(Conf.Language(80), formatRepoErrorMsg(err))
if errors.Is(err, dejavu.ErrCloudStorageSizeExceeded) {
msg = fmt.Sprintf(Conf.Language(43), humanize.Bytes(uint64(Conf.User.UserSiYuanRepoSize)))
if 2 == Conf.User.UserSiYuanSubscriptionPlan {
@@ -1267,7 +1267,7 @@ func indexRepoBeforeCloudSync(repo *dejavu.Repo) (err error) {
}
if nil != err {
- msg := fmt.Sprintf(Conf.Language(140), formatErrorMsg(err))
+ msg := fmt.Sprintf(Conf.Language(140), formatRepoErrorMsg(err))
util.PushStatusBar(msg)
util.PushErrMsg(msg, 12000)
logging.LogErrorf("index data repo before cloud sync failed: %s", err)
diff --git a/kernel/model/sync.go b/kernel/model/sync.go
index 97eb788b5..78f1187af 100644
--- a/kernel/model/sync.go
+++ b/kernel/model/sync.go
@@ -62,7 +62,7 @@ func SyncDataDownload() {
if nil == err {
synced += Conf.Sync.Stat
} else {
- synced += fmt.Sprintf(Conf.Language(80), formatErrorMsg(err))
+ synced += fmt.Sprintf(Conf.Language(80), formatRepoErrorMsg(err))
}
msg := fmt.Sprintf(Conf.Language(82), synced)
Conf.Sync.Stat = msg
@@ -98,7 +98,7 @@ func SyncDataUpload() {
if nil == err {
synced += Conf.Sync.Stat
} else {
- synced += fmt.Sprintf(Conf.Language(80), formatErrorMsg(err))
+ synced += fmt.Sprintf(Conf.Language(80), formatRepoErrorMsg(err))
}
msg := fmt.Sprintf(Conf.Language(82), synced)
Conf.Sync.Stat = msg
@@ -157,7 +157,7 @@ func BootSyncData() {
if nil == err {
synced += Conf.Sync.Stat
} else {
- synced += fmt.Sprintf(Conf.Language(80), formatErrorMsg(err))
+ synced += fmt.Sprintf(Conf.Language(80), formatRepoErrorMsg(err))
}
msg := fmt.Sprintf(Conf.Language(82), synced)
Conf.Sync.Stat = msg
@@ -204,7 +204,7 @@ func syncData(exit, byHand bool) {
if nil == err {
synced += Conf.Sync.Stat
} else {
- synced += fmt.Sprintf(Conf.Language(80), formatErrorMsg(err))
+ synced += fmt.Sprintf(Conf.Language(80), formatRepoErrorMsg(err))
}
msg := fmt.Sprintf(Conf.Language(82), synced)
Conf.Sync.Stat = msg
@@ -406,7 +406,7 @@ func CreateCloudSyncDir(name string) (err error) {
err = repo.CreateCloudRepo(name)
if nil != err {
- err = errors.New(formatErrorMsg(err))
+ err = errors.New(formatRepoErrorMsg(err))
return
}
return
@@ -431,7 +431,7 @@ func RemoveCloudSyncDir(name string) (err error) {
err = repo.RemoveCloudRepo(name)
if nil != err {
- err = errors.New(formatErrorMsg(err))
+ err = errors.New(formatRepoErrorMsg(err))
return
}
@@ -457,7 +457,7 @@ func ListCloudSyncDir() (syncDirs []*Sync, hSize string, err error) {
dirs, size, err = repo.GetCloudRepos()
if nil != err {
- err = errors.New(formatErrorMsg(err))
+ err = errors.New(formatRepoErrorMsg(err))
return
}
if 1 > len(dirs) {
@@ -488,7 +488,7 @@ func ListCloudSyncDir() (syncDirs []*Sync, hSize string, err error) {
return
}
-func formatErrorMsg(err error) string {
+func formatRepoErrorMsg(err error) string {
msg := err.Error()
if errors.Is(err, cloud.ErrCloudAuthFailed) {
msg = Conf.Language(31)
@@ -518,7 +518,7 @@ func formatErrorMsg(err error) string {
msg = Conf.Language(28)
}
}
- msg = msg + " v" + util.Ver
+ msg += " (Provider: " + conf.ProviderToStr(Conf.Sync.Provider) + ")"
return msg
}
diff --git a/kernel/util/websocket.go b/kernel/util/websocket.go
index 8892f2bb7..9bcf48e8b 100644
--- a/kernel/util/websocket.go
+++ b/kernel/util/websocket.go
@@ -142,6 +142,7 @@ func PushMsg(msg string, timeout int) (msgId string) {
func PushErrMsg(msg string, timeout int) (msgId string) {
msgId = gulu.Rand.String(7)
+ msg += msg + " v" + Ver // Add version info at the end of message in all error notifications https://github.com/siyuan-note/siyuan/issues/7899
BroadcastByType("main", "msg", -1, msg, map[string]interface{}{"id": msgId, "closeTimeout": timeout})
return
}