-
+
+
+
+
+
+
+
diff --git a/frontend/src/langs/en.json b/frontend/src/langs/en.json
index 0b4be84..5baaa51 100644
--- a/frontend/src/langs/en.json
+++ b/frontend/src/langs/en.json
@@ -48,8 +48,6 @@
"disconnect_all": "Disconnect all",
"status": "Status",
"filter": "Filter",
- "tree_view": "Tree View",
- "list_view": "List View",
"sort_conn": "Sort Connections",
"new_conn_title": "New Connection",
"open_db": "Open Database",
@@ -151,6 +149,9 @@
"dbfilter_hide_title": "Select the Databases to Hide",
"dbfilter_input": "Input Database Index",
"dbfilter_input_tip": "Press Enter to confirm",
+ "key_view": "Default Key View",
+ "key_view_tree": "Tree View",
+ "key_view_list": "List View",
"load_size": "Size of Keys Per Load",
"mark_color": "Mark Color"
},
diff --git a/frontend/src/langs/zh-cn.json b/frontend/src/langs/zh-cn.json
index f6b7d10..f86e3be 100644
--- a/frontend/src/langs/zh-cn.json
+++ b/frontend/src/langs/zh-cn.json
@@ -48,8 +48,6 @@
"disconnect_all": "断开所有连接",
"status": "状态",
"filter": "筛选",
- "tree_view": "树视图",
- "list_view": "列表视图",
"sort_conn": "调整连接顺序",
"new_conn_title": "新建连接",
"open_db": "打开数据库",
@@ -151,6 +149,9 @@
"dbfilter_hide_title": "需要隐藏的数据库",
"dbfilter_input": "输入数据库索引",
"dbfilter_input_tip": "按回车确认",
+ "key_view": "默认键视图",
+ "key_view_tree": "树形列表",
+ "key_view_list": "平铺列表",
"load_size": "单次加载键数量",
"mark_color": "标记颜色"
},
diff --git a/frontend/src/stores/connections.js b/frontend/src/stores/connections.js
index f2d3ed1..5b90fcd 100644
--- a/frontend/src/stores/connections.js
+++ b/frontend/src/stores/connections.js
@@ -236,6 +236,7 @@ const useConnectionStore = defineStore('connections', {
execTimeout: 60,
dbFilterType: 'none',
dbFilterList: [],
+ keyView: KeyViewType.Tree,
loadSize: 10000,
markColor: '',
ssl: {
@@ -435,7 +436,7 @@ const useConnectionStore = defineStore('connections', {
// if (connNode == null) {
// throw new Error('no such connection')
// }
- const { db } = data
+ const { db, view = KeyViewType.Tree } = data
if (isEmpty(db)) {
throw new Error('no db loaded')
}
@@ -456,6 +457,7 @@ const useConnectionStore = defineStore('connections', {
})
}
this.databases[name] = dbs
+ this.viewType[name] = view
},
/**