Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
2b77ed1b
Commit
2b77ed1b
authored
May 11, 2016
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化一些细节
parent
16239843
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
database.js
modules/database.js
+2
-3
en.js
source/language/en.js
+2
-1
zh.js
source/language/zh.js
+2
-1
index.js
source/modules/database/php/index.js
+4
-4
No files found.
modules/database.js
View file @
2b77ed1b
...
...
@@ -265,17 +265,16 @@ class Database {
/**
* 修改数据库配置
* @param {Object} event ipcMain对象
* @param {Object} opts 配置(_id,data
* @param {Object} opts 配置(_id,
id,
data
*/
editDataConf
(
event
,
opts
)
{
logger
.
info
(
'
shell-
editDataConf'
,
opts
);
logger
.
info
(
'editDataConf'
,
opts
);
// 1. 获取原配置列表
this
.
cursor
.
findOne
({
_id
:
opts
[
'_id'
]
},
(
err
,
ret
)
=>
{
let
confs
=
ret
[
'database'
]
||
{};
// 添加到配置
logger
.
info
(
'shell-editDataConf-opts["id"]'
,
opts
[
'id'
]);
confs
[
opts
[
'id'
]]
=
opts
[
'data'
];
// 更新数据库
this
.
cursor
.
update
({
...
...
source/language/en.js
View file @
2b77ed1b
...
...
@@ -366,7 +366,8 @@ module.exports = {
title
:
'Add conf'
,
toolbar
:
{
add
:
'Add'
,
clear
:
'Clear'
clear
:
'Clear'
,
edit
:
'Edit'
},
type
:
'Database type'
,
encode
:
'Database encode'
,
...
...
source/language/zh.js
View file @
2b77ed1b
...
...
@@ -367,7 +367,8 @@ module.exports = {
title
:
'添加配置'
,
toolbar
:
{
add
:
'添加'
,
clear
:
'清空'
clear
:
'清空'
,
edit
:
'编辑'
},
type
:
'数据库类型'
,
encode
:
'数据库编码'
,
...
...
source/modules/database/php/index.js
View file @
2b77ed1b
...
...
@@ -279,10 +279,10 @@ class PHP {
// 工具栏
const
toolbar
=
win
.
attachToolbar
();
toolbar
.
loadStruct
([{
id
:
'
add
'
,
id
:
'
edit
'
,
type
:
'button'
,
icon
:
'
plus-circle
'
,
text
:
LANG
[
'form'
][
'toolbar'
][
'
add
'
]
icon
:
'
edit
'
,
text
:
LANG
[
'form'
][
'toolbar'
][
'
edit
'
]
},
{
type
:
'separator'
},
{
...
...
@@ -371,7 +371,7 @@ class PHP {
case
'clear'
:
form
.
clear
();
break
;
case
'
add
'
:
case
'
edit
'
:
if
(
!
form
.
validate
())
{
return
toastr
.
warning
(
LANG
[
'form'
][
'warning'
],
LANG_T
[
'warning'
]);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment