✨ 数据同步支持接入第三方云端存储 https://github.com/siyuan-note/siyuan/issues/6446 https://github.com/siyuan-note/siyuan/issues/6426
This commit is contained in:
parent
b71874d744
commit
91a9ebf1fb
6 changed files with 19 additions and 5 deletions
|
@ -954,7 +954,7 @@
|
|||
"128": "Subscription has expired, cloud data will be completely deleted after expiration. To renew, please visit <a target='_blank' href='https://ld246.com/subscribe/siyuan'>here</a> , if you don't need to renew, please log out of your account to close the reminder",
|
||||
"129": "Cloud data has been corrupted, please refer to <a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">here</a> to resolve the issue",
|
||||
"130": "Starting new version installer...",
|
||||
"131": "TODO",
|
||||
"131": "This operation is not supported, please go to the cloud storage provider management console to operate",
|
||||
"132": "TODO",
|
||||
"133": "TODO",
|
||||
"134": "In order to prevent the newly restored data from being overwritten by synchronization, the data synchronization function has been automatically suspended",
|
||||
|
|
|
@ -954,7 +954,7 @@
|
|||
"128": "La suscripción ha caducado, los datos de la nube se eliminarán completamente después de la expiración. Para renovar, visite <a target='_blank' href='https://ld246.com/subscribe/siyuan'>Aquí</a>, si no necesita renovar, salga de su cuenta para cerrar el recordatorio",
|
||||
"129": "Los datos de la nube se han dañado, consulte <a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">aquí</a> para resolver el problema",
|
||||
"130": "Iniciando instalador de nueva versión...",
|
||||
"131": "TODO",
|
||||
"131": "Esta solicitud no es compatible, vaya a la consola de administración del proveedor de almacenamiento en la nube para operar",
|
||||
"132": "TODO",
|
||||
"133": "TODO",
|
||||
"134": "Para evitar que los datos recién restaurados sean sobrescritos por la sincronización, se ha suspendido automáticamente la función de sincronización de datos",
|
||||
|
|
|
@ -954,7 +954,7 @@
|
|||
"128": "L'abonnement a expiré, les données cloud seront complètement supprimées après l'expiration. Pour renouveler, veuillez visiter <a target='_blank' href='https://ld246.com/subscribe/siyuan'>ici</a > , si vous n'avez pas besoin de renouveler, veuillez vous déconnecter de votre compte pour fermer le rappel",
|
||||
"129": "Les données cloud ont été corrompues, veuillez vous référer à <a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">ici</a> pour résoudre le problème",
|
||||
"130": "Démarrage du programme d'installation de la nouvelle version...",
|
||||
"131": "TODO",
|
||||
"131": "Cette opération n'est pas prise en charge, veuillez vous rendre sur la console de gestion du fournisseur de stockage cloud pour opérer",
|
||||
"132": "TODO",
|
||||
"133": "TODO",
|
||||
"134": "Afin d'éviter que les données nouvellement restaurées ne soient écrasées par la synchronisation, la fonction de synchronisation des données a été automatiquement suspendue",
|
||||
|
|
|
@ -954,7 +954,7 @@
|
|||
"128": "訂閱已經過期,過期後雲端數據會被徹底刪除。續訂請訪問<a target='_blank' href='https://ld246.com/subscribe/siyuan'>這裡</a>,如果不需要續訂,請登出賬號關閉該提醒",
|
||||
"129": "雲端數據已經損壞,請參考<a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">這裡</a>解決該問題",
|
||||
"130": "正在啟動新版本安裝程序...",
|
||||
"131": "TODO",
|
||||
"131": "不支持該操作,請到雲端存儲提供商管理控制台進行操作",
|
||||
"132": "TODO",
|
||||
"133": "TODO",
|
||||
"134": "為避免剛恢復的數據被同步覆蓋,數據同步功能已被自動暫停",
|
||||
|
|
|
@ -954,7 +954,7 @@
|
|||
"128": "订阅已经过期,过期后云端数据会被彻底删除。续订请访问<a target='_blank' href='https://ld246.com/subscribe/siyuan'>这里</a>,如果不需要续订,请登出账号关闭该提醒",
|
||||
"129": "云端数据已经损坏,请参考<a href=\"https://ld246.com/article/1658499492287\" target=\"_blank\">这里</a>解决该问题",
|
||||
"130": "正在启动新版本安装程序...",
|
||||
"131": "TODO",
|
||||
"131": "不支持该操作,请到云端存储提供商管理控制台进行操作",
|
||||
"132": "TODO",
|
||||
"133": "TODO",
|
||||
"134": "为避免刚恢复的数据被同步覆盖,数据同步功能已被自动暂停",
|
||||
|
|
|
@ -331,6 +331,11 @@ func SetSyncProviderWebDAV(webdav *conf.WebDAV) (err error) {
|
|||
var syncLock = sync.Mutex{}
|
||||
|
||||
func CreateCloudSyncDir(name string) (err error) {
|
||||
if conf.ProviderSiYuan != Conf.Sync.Provider {
|
||||
err = errors.New(Conf.Language(131))
|
||||
return
|
||||
}
|
||||
|
||||
syncLock.Lock()
|
||||
defer syncLock.Unlock()
|
||||
|
||||
|
@ -346,10 +351,19 @@ func CreateCloudSyncDir(name string) (err error) {
|
|||
}
|
||||
|
||||
err = repo.CreateCloudRepo(name)
|
||||
if nil != err {
|
||||
err = errors.New(formatErrorMsg(err))
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func RemoveCloudSyncDir(name string) (err error) {
|
||||
if conf.ProviderSiYuan != Conf.Sync.Provider {
|
||||
err = errors.New(Conf.Language(131))
|
||||
return
|
||||
}
|
||||
|
||||
msgId := util.PushMsg(Conf.Language(116), 15000)
|
||||
|
||||
syncLock.Lock()
|
||||
|
|
Loading…
Add table
Reference in a new issue