mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 10:46:09 +01:00
✨ 云端支持多个数据仓库目录 Fix https://github.com/siyuan-note/siyuan/issues/5335
This commit is contained in:
parent
ce516e41fb
commit
114d85431f
4 changed files with 62 additions and 15 deletions
|
|
@ -272,13 +272,9 @@ func syncRepo(boot, exit, byHand bool) {
|
|||
}
|
||||
|
||||
start := time.Now()
|
||||
cloudInfo := &dejavu.CloudInfo{
|
||||
Dir: "main",
|
||||
UserID: Conf.User.UserId,
|
||||
Token: Conf.User.UserToken,
|
||||
LimitSize: int64(Conf.User.UserSiYuanRepoSize - Conf.User.UserSiYuanAssetSize),
|
||||
ProxyURL: Conf.System.NetworkProxy.String(),
|
||||
Server: util.AliyunServer,
|
||||
cloudInfo, err := buildCloudInfo()
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
syncContext := map[string]interface{}{CtxPushMsg: CtxPushMsgToStatusBar}
|
||||
|
||||
|
|
@ -471,3 +467,20 @@ func contextPushMsg(context map[string]interface{}, msg string) {
|
|||
util.PushEndlessProgress(msg)
|
||||
}
|
||||
}
|
||||
|
||||
func buildCloudInfo() (ret *dejavu.CloudInfo, err error) {
|
||||
if nil == Conf.User || "" == Conf.Sync.CloudName {
|
||||
err = errors.New("invalid cloud info")
|
||||
return
|
||||
}
|
||||
|
||||
ret = &dejavu.CloudInfo{
|
||||
Dir: Conf.Sync.CloudName,
|
||||
UserID: Conf.User.UserId,
|
||||
Token: Conf.User.UserToken,
|
||||
LimitSize: int64(Conf.User.UserSiYuanRepoSize - Conf.User.UserSiYuanAssetSize),
|
||||
ProxyURL: Conf.System.NetworkProxy.String(),
|
||||
Server: util.AliyunServer,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue