Skip to content

Commit 8814a61

Browse files
Merge pull request #7 from quick123official/master
merge
2 parents 601642c + e3ffe86 commit 8814a61

File tree

7 files changed

+68
-46
lines changed

7 files changed

+68
-46
lines changed

README.en.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ Windows & Mac OS X & Linux : [https://gitee.com/quick123official/quick_redis_blo
3838

3939
## Software screenshot
4040

41+
-The keys are displayed in the form of a directory
42+
![The keys are displayed in the form of a directory](https://quick123.net/images/introduction/show_keys_by_tree.jpg "The keys are displayed in the form of a directory")
43+
4144
-Home page
4245
![Home page](https://quick123.net/images/introduction/key-zset-value.png "Home page")
4346

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ Windows & Mac OS X & Linux : [https://gitee.com/quick123official/quick_redis_blo
3838

3939
## Software screenshot
4040

41+
-The keys are displayed in the form of a directory
42+
![The keys are displayed in the form of a directory](https://quick123.net/images/introduction/show_keys_by_tree.jpg "The keys are displayed in the form of a directory")
43+
4144
-Home page
4245
![Home page](https://quick123.net/images/introduction/key-zset-value.png "Home page")
4346

public/modules/ElectronIntlUniversal.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,17 @@ const ElectronIntlUniversal = {
124124
* @memberof ElectronIntlUniversal
125125
*/
126126
readSystemConfig: () => {
127-
let filePath = ElectronIntlUniversal.getSystemConfigFilePath();
128127
let systemConfigData = undefined;
128+
let filePath = undefined;
129129
try {
130+
filePath = ElectronIntlUniversal.getSystemConfigFilePath();
130131
systemConfigData = fs.readFileSync(filePath, "utf-8");
131132
} catch (e) {
132-
Log.error("[cmd=ElectronIntlUniversal] readSystemConfig error", langPath, e);
133+
Log.error(
134+
"[cmd=ElectronIntlUniversal] readSystemConfig error",
135+
filePath,
136+
e
137+
);
133138
}
134139
if (systemConfigData !== undefined) {
135140
systemConfigData = JSON.parse(systemConfigData);
@@ -144,7 +149,7 @@ const ElectronIntlUniversal = {
144149
if (locale === undefined) {
145150
locale = "en";
146151
}
147-
systemConfigData = { lang: locale };
152+
systemConfigData = { lang: locale, splitSign: ":" };
148153
}
149154
return systemConfigData;
150155
},

src/components/SystemConfig/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class SystemConfig extends React.Component {
8888
<Select
8989
key={this.state.config.lang}
9090
defaultValue={this.state.config.lang}
91-
style={{ width: 200 }}
91+
style={{ width: 300 }}
9292
onChange={this.handleLangChange.bind(this)}
9393
>
9494
{options}
@@ -98,16 +98,15 @@ class SystemConfig extends React.Component {
9898
{intl.get("SystemConfig.tree.split")}
9999
</Col>
100100
<Col span={18}>
101-
<Tooltip title="Will use the 'keys' command">
101+
<Tooltip title="When you set this value, the keys will be displayed in the form of a directory.">
102102
<Input
103-
style={{ width: 200 }}
103+
style={{ width: 300 }}
104104
placeholder="Input Delimiter"
105105
defaultValue={this.state.config.splitSign}
106106
value={this.state.config.splitSign}
107107
onChange={this.handleSplitSignChange}
108-
/>{" "}
108+
/>
109109
</Tooltip>
110-
{/* , */}
111110
</Col>
112111
</Row>
113112
</Modal>

src/pages/HostKeyTree/index.js

Lines changed: 48 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { Component } from "react";
22
import {
3-
Space,
43
Input,
54
Button,
65
Modal,
@@ -10,6 +9,8 @@ import {
109
Tree,
1110
Dropdown,
1211
Menu,
12+
Row,
13+
Col,
1314
} from "antd";
1415
import { DeleteTwoTone } from "@ant-design/icons";
1516
import { message } from "antd";
@@ -50,7 +51,7 @@ class HostKeyTree extends Component {
5051
*
5152
* @memberof HostKeyTree
5253
*/
53-
splitSign = ":";
54+
splitSign = "";
5455
/**
5556
* 选中的key
5657
*
@@ -330,7 +331,7 @@ class HostKeyTree extends Component {
330331
}
331332
);
332333
}
333-
this.searchKey(this.searchInput.current.input.value);
334+
this.searchKey(this.searchInput.current.input.state.value);
334335
}
335336
});
336337
};
@@ -456,39 +457,50 @@ class HostKeyTree extends Component {
456457
render() {
457458
return (
458459
<div>
459-
<Space size="small" direction="vertical">
460-
<Button block onClick={this.openCreateKeyMadal.bind(this)}>
461-
{intl.get("HostKey.create.key")}
462-
</Button>
463-
<Tooltip
464-
placement="right"
465-
title={intl.get("common.search.tooltip.limit")}
466-
>
467-
<Search
468-
ref={this.searchInput}
469-
onSearch={this.searchKey.bind(this)}
470-
enterButton={
471-
<Button icon={<SearchOutlined />}></Button>
472-
}
473-
disabled={this.state.searchDisable}
474-
/>
475-
</Tooltip>
476-
<Dropdown
477-
overlay={this.showTreeRightClickMenu.bind(this)}
478-
trigger={["contextMenu"]}
479-
>
480-
<div>
481-
<DirectoryTree
482-
treeData={this.state.treeData}
483-
onSelect={this.onDirectoryTreeSelect.bind(this)}
484-
onDoubleClick={this.handleDoubleClick.bind(
485-
this
486-
)}
487-
height={750}
488-
></DirectoryTree>
489-
</div>
490-
</Dropdown>
491-
</Space>
460+
<Row gutter={[16, 6]}>
461+
<Col span={24}>
462+
<Button
463+
block
464+
onClick={this.openCreateKeyMadal.bind(this)}
465+
>
466+
{intl.get("HostKey.create.key")}
467+
</Button>
468+
</Col>
469+
<Col span={24}>
470+
<Tooltip
471+
placement="right"
472+
title={intl.get("common.search.tooltip.limit")}
473+
>
474+
<Search
475+
ref={this.searchInput}
476+
onSearch={this.searchKey.bind(this)}
477+
enterButton={
478+
<Button icon={<SearchOutlined />}></Button>
479+
}
480+
disabled={this.state.searchDisable}
481+
/>
482+
</Tooltip>
483+
</Col>
484+
<Col span={24}>
485+
<Dropdown
486+
overlay={this.showTreeRightClickMenu.bind(this)}
487+
trigger={["contextMenu"]}
488+
>
489+
<div>
490+
<DirectoryTree
491+
treeData={this.state.treeData}
492+
onSelect={this.onDirectoryTreeSelect.bind(
493+
this
494+
)}
495+
onDoubleClick={this.handleDoubleClick.bind(
496+
this
497+
)}
498+
height={750}
499+
></DirectoryTree>
500+
</div>
501+
</Dropdown>
502+
</Col>
503+
</Row>
492504
<div>
493505
<Modal
494506
title={intl.get("HostKey.create.key")}

src/services/RedisService.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export default class RedisService {
9595
*/
9696
static redisEvent(node, dispatch, callback, redis) {
9797
redis.once("connect", function () {
98-
Log.info("[cmd=RedisService] connectRedis connect.", node);
9998
RedisService.dispatchSuccess(node, redis, dispatch);
10099
message.success(
101100
intl.get("RedisService.info.connection.established.success")

src/utils/LocaleUtils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ export default class LocaleUtils {
119119
if (locale === undefined) {
120120
locale = "en";
121121
}
122-
systemConfigData = { lang: locale, splitSign: "" };
122+
// splitSign 默认设置为 :
123+
systemConfigData = { lang: locale, splitSign: ":" };
123124
this.saveSystemConfig(systemConfigData);
124125
}
125126
return systemConfigData;

0 commit comments

Comments
 (0)