🎨 Improve cloud sync error report text https://github.com/siyuan-note/siyuan/issues/8675

This commit is contained in:
Daniel 2023-07-04 19:16:35 +08:00
parent 4d9807c8bb
commit 943e155203
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
8 changed files with 22 additions and 8 deletions

View file

@ -45,7 +45,7 @@ require (
github.com/radovskyb/watcher v1.0.7
github.com/sashabaranov/go-openai v1.12.0
github.com/shirou/gopsutil/v3 v3.23.5
github.com/siyuan-note/dejavu v0.0.0-20230703042337-1a642a48e663
github.com/siyuan-note/dejavu v0.0.0-20230704110643-d6a4b98d2d6c
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75
github.com/siyuan-note/eventbus v0.0.0-20230702081350-6dde667e7112
github.com/siyuan-note/filelock v0.0.0-20230615140405-d05a21d49524

View file

@ -287,8 +287,8 @@ github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5g
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=
github.com/siyuan-note/dejavu v0.0.0-20230703042337-1a642a48e663 h1:dKz6pHllXsmKXRf06wznJDT0F602wDK7GIffiPCyRoc=
github.com/siyuan-note/dejavu v0.0.0-20230703042337-1a642a48e663/go.mod h1:SRJIJt0yhMD2Yfs49bFEgcWUZ80okiA/oTFRT7/PL28=
github.com/siyuan-note/dejavu v0.0.0-20230704110643-d6a4b98d2d6c h1:SuJTliwQGq2mlw+SNQJsunSrQBChlSjyvWv0ntK9PFQ=
github.com/siyuan-note/dejavu v0.0.0-20230704110643-d6a4b98d2d6c/go.mod h1:SRJIJt0yhMD2Yfs49bFEgcWUZ80okiA/oTFRT7/PL28=
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE=
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw=
github.com/siyuan-note/eventbus v0.0.0-20230702081350-6dde667e7112 h1:lb+8C+XEEEn/lcBtoXlrf5mZEoe0y0KlqiIGG93Gozc=

View file

@ -513,6 +513,10 @@ func formatRepoErrorMsg(err error) string {
msg = Conf.Language(23)
} else if errors.Is(err, cloud.ErrSystemTimeIncorrect) {
msg = Conf.Language(195)
} else if errors.Is(err, cloud.ErrDeprecatedVersion) {
msg = Conf.Language(212)
} else if errors.Is(err, cloud.ErrCloudCheckFailed) {
msg = Conf.Language(213)
} else {
msgLowerCase := strings.ToLower(msg)
if strings.Contains(msgLowerCase, "permission denied") || strings.Contains(msg, "access is denied") {