Browse Source

Merge remote-tracking branch 'origin/dev' into dev

Vanessa 2 years ago
parent
commit
5c61061db0

+ 1 - 1
app/appearance/langs/en_US.json

@@ -876,7 +876,7 @@
     "99": "Data cleaning is complete",
     "100": "Cleaning data...",
     "101": "Done setting reminder [%s]",
-    "102": "TODO",
+    "102": "Processing completed",
     "103": "TODO",
     "104": "TODO",
     "105": "TODO",

+ 1 - 1
app/appearance/langs/es_ES.json

@@ -876,7 +876,7 @@
     "99": "La limpieza de datos ha finalizado",
     "100": "Limpieza de datos...",
     "101": "El recordatorio de configuración [%s] se ha completado",
-    "102": "TODO",
+    "102": "Procesamiento completado",
     "103": "TODO",
     "104": "TODO",
     "105": "TODO",

+ 1 - 1
app/appearance/langs/fr_FR.json

@@ -876,7 +876,7 @@
     "99": "Le nettoyage des données est terminé",
     "100": "Nettoyage des données...",
     "101": "Rappel de réglage terminé [%s]",
-    "102": "TODO",
+    "102": "Traitement terminé",
     "103": "TODO",
     "104": "TODO",
     "105": "TODO",

+ 1 - 1
app/appearance/langs/zh_CHT.json

@@ -876,7 +876,7 @@
     "99": "清理數據完成",
     "100": "正在清理數據...",
     "101": "設置提醒完畢 [%s]",
-    "102": "TODO",
+    "102": "處理完畢",
     "103": "TODO",
     "104": "TODO",
     "105": "TODO",

+ 1 - 1
app/appearance/langs/zh_CN.json

@@ -877,7 +877,7 @@
     "99": "清理数据完成",
     "100": "正在清理数据...",
     "101": "设置提醒完毕 [%s]",
-    "102": "TODO",
+    "102": "处理完毕",
     "103": "TODO",
     "104": "TODO",
     "105": "TODO",

+ 71 - 1
app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-v9awwp0/20210721112206-mhr9wxi.sy

@@ -4,7 +4,7 @@
 	"Properties": {
 		"id": "20210721112206-mhr9wxi",
 		"title": "Data sync",
-		"updated": "20220821170709"
+		"updated": "20220831004508"
 	},
 	"Children": [
 		{
@@ -241,6 +241,76 @@
 				}
 			]
 		},
+		{
+			"ID": "20220831004158-x62olku",
+			"Type": "NodeParagraph",
+			"Properties": {
+				"id": "20220831004158-x62olku",
+				"updated": "20220831004508"
+			},
+			"Children": [
+				{
+					"Type": "NodeTag",
+					"Data": "span",
+					"Children": [
+						{
+							"Type": "NodeTagOpenMarker"
+						},
+						{
+							"Type": "NodeText",
+							"Data": "Note"
+						},
+						{
+							"Type": "NodeTagCloseMarker"
+						}
+					]
+				},
+				{
+					"Type": "NodeText",
+					"Data": ": If the amount of data is large, it is recommended to export the data package through "
+				},
+				{
+					"Type": "NodeKbd",
+					"Data": "kbd",
+					"Children": [
+						{
+							"Type": "NodeKbdOpenMarker"
+						},
+						{
+							"Type": "NodeText",
+							"Data": "Export-Data"
+						},
+						{
+							"Type": "NodeKbdCloseMarker"
+						}
+					]
+				},
+				{
+					"Type": "NodeText",
+					"Data": " in the settings, and then send the data package to the new device by manual copying or other methods, and export the data package on the new device. Go to "
+				},
+				{
+					"Type": "NodeKbd",
+					"Data": "kbd",
+					"Children": [
+						{
+							"Type": "NodeKbdOpenMarker"
+						},
+						{
+							"Type": "NodeText",
+							"Data": "Import - Data"
+						},
+						{
+							"Type": "NodeKbdCloseMarker"
+						}
+					]
+				},
+				{
+					"Type": "NodeText",
+					"Data": ", and finally configure synchronization."
+				}
+			]
+		},
 		{
 			"ID": "20210721112403-v7hwt54",
 			"Type": "NodeHeading",

+ 71 - 1
app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-m0ztypq/20210721103420-vn6g2yy.sy

@@ -4,7 +4,7 @@
 	"Properties": {
 		"id": "20210721103420-vn6g2yy",
 		"title": "数据同步",
-		"updated": "20220821170632"
+		"updated": "20220831004438"
 	},
 	"Children": [
 		{
@@ -278,6 +278,76 @@
 				}
 			]
 		},
+		{
+			"ID": "20220831003823-4om5qoo",
+			"Type": "NodeParagraph",
+			"Properties": {
+				"id": "20220831003823-4om5qoo",
+				"updated": "20220831004438"
+			},
+			"Children": [
+				{
+					"Type": "NodeTag",
+					"Data": "span",
+					"Children": [
+						{
+							"Type": "NodeTagOpenMarker"
+						},
+						{
+							"Type": "NodeText",
+							"Data": "注意"
+						},
+						{
+							"Type": "NodeTagCloseMarker"
+						}
+					]
+				},
+				{
+					"Type": "NodeText",
+					"Data": ":如果数据量较大,建议通过设置中的 "
+				},
+				{
+					"Type": "NodeKbd",
+					"Data": "kbd",
+					"Children": [
+						{
+							"Type": "NodeKbdOpenMarker"
+						},
+						{
+							"Type": "NodeText",
+							"Data": "导出 - Data"
+						},
+						{
+							"Type": "NodeKbdCloseMarker"
+						}
+					]
+				},
+				{
+					"Type": "NodeText",
+					"Data": " 导出数据包,然后将该数据包通过手动拷贝或者其他方式发送到新设备上,并在新设备上 "
+				},
+				{
+					"Type": "NodeKbd",
+					"Data": "kbd",
+					"Children": [
+						{
+							"Type": "NodeKbdOpenMarker"
+						},
+						{
+							"Type": "NodeText",
+							"Data": "导入 - Data"
+						},
+						{
+							"Type": "NodeKbdCloseMarker"
+						}
+					]
+				},
+				{
+					"Type": "NodeText",
+					"Data": ",最后再配置同步。"
+				}
+			]
+		},
 		{
 			"ID": "20210721103656-afjj0tm",
 			"Type": "NodeHeading",

+ 71 - 1
app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121232-23s79xr/20211226121438-xaafdo8.sy

@@ -4,7 +4,7 @@
 	"Properties": {
 		"id": "20211226121438-xaafdo8",
 		"title": "資料同步",
-		"updated": "20220821170702"
+		"updated": "20220831004450"
 	},
 	"Children": [
 		{
@@ -262,6 +262,76 @@
 				}
 			]
 		},
+		{
+			"ID": "20220831004246-flqtcf2",
+			"Type": "NodeParagraph",
+			"Properties": {
+				"id": "20220831004246-flqtcf2",
+				"updated": "20220831004450"
+			},
+			"Children": [
+				{
+					"Type": "NodeTag",
+					"Data": "span",
+					"Children": [
+						{
+							"Type": "NodeTagOpenMarker"
+						},
+						{
+							"Type": "NodeText",
+							"Data": "注意"
+						},
+						{
+							"Type": "NodeTagCloseMarker"
+						}
+					]
+				},
+				{
+					"Type": "NodeText",
+					"Data": ":如果數據量較大,建議通過設置中的 "
+				},
+				{
+					"Type": "NodeKbd",
+					"Data": "kbd",
+					"Children": [
+						{
+							"Type": "NodeKbdOpenMarker"
+						},
+						{
+							"Type": "NodeText",
+							"Data": "導出 - Data"
+						},
+						{
+							"Type": "NodeKbdCloseMarker"
+						}
+					]
+				},
+				{
+					"Type": "NodeText",
+					"Data": " 導出數據包,然後將該數據包通過手動拷貝或者其他方式發送到新設備上,並在新設備上 "
+				},
+				{
+					"Type": "NodeKbd",
+					"Data": "kbd",
+					"Children": [
+						{
+							"Type": "NodeKbdOpenMarker"
+						},
+						{
+							"Type": "NodeText",
+							"Data": "導入 - Data"
+						},
+						{
+							"Type": "NodeKbdCloseMarker"
+						}
+					]
+				},
+				{
+					"Type": "NodeText",
+					"Data": ",最後再配置同步。"
+				}
+			]
+		},
 		{
 			"ID": "20211226121454-i5h1wl1",
 			"Type": "NodeHeading",

+ 2 - 0
kernel/cache/asset.go

@@ -37,6 +37,8 @@ var Assets = map[string]*Asset{}
 var assetsLock = sync.Mutex{}
 
 func LoadAssets() {
+	defer logging.Recover()
+
 	start := time.Now()
 	assetsLock.Lock()
 	defer assetsLock.Unlock()

+ 1 - 1
kernel/model/assets_watcher.go

@@ -84,7 +84,7 @@ func watchAssets() {
 				}
 
 				// 重新缓存资源文件,以便使用 /资源 搜索
-				cache.LoadAssets()
+				go cache.LoadAssets()
 			}
 		}
 	}()

+ 1 - 1
kernel/model/assets_watcher_darwin.go

@@ -58,7 +58,7 @@ func watchAssets() {
 				}
 
 				// 重新缓存资源文件,以便使用 /资源 搜索
-				cache.LoadAssets()
+				go cache.LoadAssets()
 			case err, ok := <-assetsWatcher.Error:
 				if !ok {
 					return

+ 4 - 3
kernel/model/history.go

@@ -231,6 +231,7 @@ func RollbackAssetsHistory(historyPath string) (err error) {
 		return
 	}
 	IncSync()
+	util.PushMsg(Conf.Language(102), 3000)
 	return nil
 }
 
@@ -279,11 +280,11 @@ func FullTextSearchHistory(query, box, op string, typ, page int) (ret []*History
 	} else {
 		stmt += "1=1"
 	}
-	if "all" != op {
-		stmt += " AND op = '" + op + "'"
-	}
 
 	if HistoryTypeDoc == typ {
+		if "all" != op {
+			stmt += " AND op = '" + op + "'"
+		}
 		stmt += " AND path LIKE '%/" + box + "/%' AND path LIKE '%.sy'"
 	} else if HistoryTypeAsset == typ {
 		stmt += " AND path LIKE '%/assets/%'"