mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 15:28:49 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
7964d2e48f
5 changed files with 65 additions and 30 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "SiYuan",
|
||||
"version": "2.0.26-alpha3",
|
||||
"version": "2.0.26-alpha4",
|
||||
"description": "A local-first personal knowledge management system, supports fine-grained block-level reference, and Markdown WYSIWYG.",
|
||||
"homepage": "https://b3log.org/siyuan",
|
||||
"main": "./electron/main.js",
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ require (
|
|||
github.com/qiniu/go-sdk/v7 v7.13.0
|
||||
github.com/radovskyb/watcher v1.0.7
|
||||
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
|
||||
github.com/siyuan-note/dejavu v0.0.0-20220709030539-d73a81b0ae9b
|
||||
github.com/siyuan-note/dejavu v0.0.0-20220709102942-5f25f8253474
|
||||
github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676
|
||||
github.com/siyuan-note/eventbus v0.0.0-20220624162334-ca7c06dc771f
|
||||
github.com/siyuan-note/filelock v0.0.0-20220704090116-54dfb035283f
|
||||
|
|
|
|||
|
|
@ -424,8 +424,8 @@ github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJ
|
|||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
|
||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20220709030539-d73a81b0ae9b h1:dAicoPtCjujSYNz2OcOrq423DklGZXg3ZnTHRWPBgDA=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20220709030539-d73a81b0ae9b/go.mod h1:cri+XyZAqmK5fJ98En9aOHB+YkuU8+XQcJdQ31EUhis=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20220709102942-5f25f8253474 h1:cFdtB2NHdAQ47/kUdIpw2IzG3VDydAHWhMFTDZHnEsE=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20220709102942-5f25f8253474/go.mod h1:cri+XyZAqmK5fJ98En9aOHB+YkuU8+XQcJdQ31EUhis=
|
||||
github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676 h1:QB9TjJQFhXhZ6dAtPpY02DlzHAQm1C+WqZq6OadG8mI=
|
||||
github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw=
|
||||
github.com/siyuan-note/eventbus v0.0.0-20220624162334-ca7c06dc771f h1:JMobMNZ7AqaKKyEK+WeWFhix/2TDQXgPZDajU00IybU=
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import (
|
|||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/siyuan-note/dejavu"
|
||||
"github.com/siyuan-note/dejavu/entity"
|
||||
"github.com/siyuan-note/encryption"
|
||||
"github.com/siyuan-note/eventbus"
|
||||
"github.com/siyuan-note/filelock"
|
||||
|
|
@ -557,31 +558,51 @@ func newRepository() (ret *dejavu.Repo, err error) {
|
|||
}
|
||||
|
||||
func subscribeEvents() {
|
||||
eventbus.Subscribe(dejavu.EvtIndexWalkData, func(context map[string]interface{}, path string) {
|
||||
eventbus.Subscribe(dejavu.EvtIndexBeforeWalkData, func(context map[string]interface{}, path string) {
|
||||
msg := "Indexing data repo [walk data " + path + "]"
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtIndexWalkData, func(context map[string]interface{}, path string) {
|
||||
//msg := "Indexing data repo [walk data " + path + "]"
|
||||
//util.SetBootDetails(msg)
|
||||
//contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtIndexBeforeGetLatestFiles, func(context map[string]interface{}, files []string) {
|
||||
msg := fmt.Sprintf("Indexing data repo [get latest files %d]", len(files))
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtIndexGetLatestFile, func(context map[string]interface{}, path string) {
|
||||
msg := "Indexing data repo [get latest file " + path + "]"
|
||||
//msg := "Indexing data repo [get latest file " + path + "]"
|
||||
//util.SetBootDetails(msg)
|
||||
//contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtIndexUpsertFiles, func(context map[string]interface{}, files []*entity.File) {
|
||||
msg := fmt.Sprintf("Indexing data repo [upsert files %d]", len(files))
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtIndexUpsertFile, func(context map[string]interface{}, path string) {
|
||||
msg := "Indexing data repo [upsert file " + path + "]"
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
//msg := "Indexing data repo [upsert file " + path + "]"
|
||||
//util.SetBootDetails(msg)
|
||||
//contextPushMsg(context, msg)
|
||||
})
|
||||
|
||||
eventbus.Subscribe(dejavu.EvtCheckoutWalkData, func(context map[string]interface{}, path string) {
|
||||
eventbus.Subscribe(dejavu.EvtCheckoutBeforeWalkData, func(context map[string]interface{}, path string) {
|
||||
msg := "Checkout data repo [walk data " + path + "]"
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtCheckoutWalkData, func(context map[string]interface{}, path string) {
|
||||
//msg := "Checkout data repo [walk data " + path + "]"
|
||||
//util.SetBootDetails(msg)
|
||||
//contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtCheckoutUpsertFile, func(context map[string]interface{}, path string) {
|
||||
msg := "Checkout data repo [upsert file " + path + "]"
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
//msg := "Checkout data repo [upsert file " + path + "]"
|
||||
//util.SetBootDetails(msg)
|
||||
//contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtCheckoutRemoveFile, func(context map[string]interface{}, path string) {
|
||||
msg := "Checkout data repo [remove file " + path + "]"
|
||||
|
|
@ -590,47 +611,61 @@ func subscribeEvents() {
|
|||
})
|
||||
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeDownloadIndex, func(context map[string]interface{}, id string) {
|
||||
msg := "Downloading data repo index [" + id + "]"
|
||||
msg := "Downloading data repo index [" + id[:7] + "]"
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeDownloadFiles, func(context map[string]interface{}, ids []string) {
|
||||
msg := fmt.Sprintf("Downloading data repo files %d", len(ids))
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeDownloadFile, func(context map[string]interface{}, id string) {
|
||||
msg := "Downloading data repo file [" + id + "]"
|
||||
//msg := "Downloading data repo file [" + id[:7] + "]"
|
||||
//util.SetBootDetails(msg)
|
||||
//contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeDownloadChunks, func(context map[string]interface{}, ids []string) {
|
||||
msg := fmt.Sprintf("Downloading data repo chunks %d", len(ids))
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeDownloadChunk, func(context map[string]interface{}, id string) {
|
||||
msg := "Downloading data repo chunk [" + id + "]"
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
//msg := "Downloading data repo chunk [" + id[:7] + "]"
|
||||
//util.SetBootDetails(msg)
|
||||
//contextPushMsg(context, msg)
|
||||
})
|
||||
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeDownloadRef, func(context map[string]interface{}, ref string) {
|
||||
msg := "Downloading data repo ref [" + ref + "]"
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeUploadIndex, func(context map[string]interface{}, id string) {
|
||||
msg := "Uploading data repo index [" + id + "]"
|
||||
msg := "Uploading data repo index [" + id[:7] + "]"
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeUploadFiles, func(context map[string]interface{}, files []*entity.File) {
|
||||
msg := fmt.Sprintf("Uploading data repo files %d", len(files))
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeUploadFile, func(context map[string]interface{}, id string) {
|
||||
msg := "Uploading data repo file [" + id + "]"
|
||||
//msg := "Uploading data repo file [" + id[:7] + "]"
|
||||
//util.SetBootDetails(msg)
|
||||
//contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeUploadChunks, func(context map[string]interface{}, ids []string) {
|
||||
msg := fmt.Sprintf("Uploading data repo chunks %d", len(ids))
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeUploadChunk, func(context map[string]interface{}, id string) {
|
||||
msg := "Uploading data repo chunk [" + id + "]"
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
//msg := "Uploading data repo chunk [" + id[:7] + "]"
|
||||
//util.SetBootDetails(msg)
|
||||
//contextPushMsg(context, msg)
|
||||
})
|
||||
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeUploadRef, func(context map[string]interface{}, ref string) {
|
||||
msg := "Uploading data repo ref [" + ref + "]"
|
||||
util.SetBootDetails(msg)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import (
|
|||
var Mode = "prod"
|
||||
|
||||
const (
|
||||
Ver = "2.0.26-alpha3"
|
||||
Ver = "2.0.26-alpha4"
|
||||
IsInsider = true
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue