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
e45d09d6
Commit
e45d09d6
authored
Jan 07, 2019
by
Medicean
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into v2.0.x
parents
8692ee55
b134d3e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
encoders.js
source/modules/settings/encoders.js
+5
-6
No files found.
source/modules/settings/encoders.js
View file @
e45d09d6
...
...
@@ -101,7 +101,7 @@ class Encoders {
toastr
.
error
(
LANG
[
'message'
][
'ename_duplicate'
],
LANG_T
[
'error'
]);
return
;
}
fs
.
renameSync
(
oepath
,
path
.
join
(
process
.
env
.
AS_WORKDIR
,
`antData/encoders/
${
oetype
}
/encoder/
${
nValue
}
.js`
));
fs
.
renameSync
(
oepath
,
path
.
join
(
remote
.
process
.
env
.
AS_WORKDIR
,
`antData/encoders/
${
oetype
}
/encoder/
${
nValue
}
.js`
));
toastr
.
success
(
LANG
[
'message'
][
"rename_success"
],
LANG_T
[
"success"
]);
break
case
2
:
...
...
@@ -114,7 +114,7 @@ class Encoders {
toastr
.
error
(
LANG
[
'message'
][
'ename_duplicate'
],
LANG_T
[
'error'
]);
return
;
}
fs
.
renameSync
(
oepath
,
path
.
join
(
process
.
env
.
AS_WORKDIR
,
`antData/encoders/
${
nValue
}
/encoder/
${
oename
}
.js`
));
fs
.
renameSync
(
oepath
,
path
.
join
(
remote
.
process
.
env
.
AS_WORKDIR
,
`antData/encoders/
${
nValue
}
/encoder/
${
oename
}
.js`
));
toastr
.
success
(
LANG
[
'message'
][
"retype_success"
],
LANG_T
[
"success"
]);
break
}
...
...
@@ -145,7 +145,7 @@ class Encoders {
layer
.
close
(
i
);
return
}
let
savePath
=
path
.
join
(
process
.
env
.
AS_WORKDIR
,
`antData/encoders/
${
t
}
/encoder/
${
value
}
.js`
);
let
savePath
=
path
.
join
(
remote
.
process
.
env
.
AS_WORKDIR
,
`antData/encoders/
${
t
}
/encoder/
${
value
}
.js`
);
fs
.
writeFileSync
(
savePath
,
self
.
default_template
);
...
...
@@ -320,7 +320,7 @@ module.exports = (pwd, data) => {
data
.
push
({
id
:
_id
,
ename
:
_
,
epath
:
path
.
join
(
process
.
env
.
AS_WORKDIR
,
`antData/encoders/
${
t
}
/encoder/
${
_
}
`
),
epath
:
path
.
join
(
remote
.
process
.
env
.
AS_WORKDIR
,
`antData/encoders/
${
t
}
/encoder/
${
_
}
`
),
etype
:
t
,
data
:
[
`<i class="fa fa-file-code-o"></i>`
,
...
...
@@ -343,7 +343,7 @@ module.exports = (pwd, data) => {
antSword
[
'encoders'
]
=
(
function
(){
var
encoders
=
{
asp
:[],
aspx
:[],
php
:[],
custom
:[]};
var
encoders_path
=
{
asp
:[],
aspx
:[],
php
:[],
custom
:[]};
let
userencoder_path
=
path
.
join
(
process
.
env
.
AS_WORKDIR
,
'antData/encoders'
);
let
userencoder_path
=
path
.
join
(
remote
.
process
.
env
.
AS_WORKDIR
,
'antData/encoders'
);
// 初始化
!
fs
.
existsSync
(
userencoder_path
)
?
fs
.
mkdirSync
(
userencoder_path
)
:
null
;
[
'asp'
,
'aspx'
,
'php'
,
'custom'
].
map
((
t
)
=>
{
...
...
@@ -369,5 +369,4 @@ module.exports = (pwd, data) => {
this
.
parseData
();
}
}
module
.
exports
=
Encoders
;
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