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
ba3e29a4
Commit
ba3e29a4
authored
Sep 10, 2020
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Enhancement: Plugin) 插件支持的脚本类型支持通配符 *
parent
e06ab07f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
20 deletions
+21
-20
contextmenu.js
source/modules/shellmanager/list/contextmenu.js
+21
-20
No files found.
source/modules/shellmanager/list/contextmenu.js
View file @
ba3e29a4
...
@@ -50,8 +50,8 @@ class ContextMenu {
...
@@ -50,8 +50,8 @@ class ContextMenu {
[
[
'copyurl'
,
'copy'
,
selectedData
,
'copyurl'
,
'copy'
,
selectedData
,
this
this
.
copyUrl
.
copyUrl
.
bind
(
this
,
data
[
0
])
.
bind
(
this
,
data
[
0
])
],
],
false
,
false
,
[
[
...
@@ -60,27 +60,27 @@ class ContextMenu {
...
@@ -60,27 +60,27 @@ class ContextMenu {
[
[
'pluginStore'
,
'cart-arrow-down'
,
false
,
'pluginStore'
,
'cart-arrow-down'
,
false
,
antSword
[
'menubar'
]
antSword
[
'menubar'
]
.
run
.
run
.
bind
(
antSword
[
'menubar'
],
'plugin-store'
)
.
bind
(
antSword
[
'menubar'
],
'plugin-store'
)
],
],
false
,
false
,
[
[
'add'
,
'plus-circle'
,
false
,
'add'
,
'plus-circle'
,
false
,
this
this
.
addData
.
addData
.
bind
(
this
)
.
bind
(
this
)
],
],
[
[
'edit'
,
'edit'
,
selectedData
,
'edit'
,
'edit'
,
selectedData
,
this
this
.
editData
.
editData
.
bind
(
this
,
data
[
0
])
.
bind
(
this
,
data
[
0
])
],
],
[
[
'delete'
,
'remove'
,
selectedMultiData
,
'delete'
,
'remove'
,
selectedMultiData
,
this
this
.
delData
.
delData
.
bind
(
this
,
ids
)
.
bind
(
this
,
ids
)
],
],
false
,
false
,
[
[
...
@@ -89,27 +89,27 @@ class ContextMenu {
...
@@ -89,27 +89,27 @@ class ContextMenu {
[
[
'copy'
,
'copy'
,
selectedData
,
'copy'
,
'copy'
,
selectedData
,
this
this
.
copyData
.
copyData
.
bind
(
this
,
data
[
0
])
.
bind
(
this
,
data
[
0
])
],
],
[
[
'search'
,
'search'
,
false
,
'search'
,
'search'
,
false
,
this
this
.
searchData
.
searchData
.
bind
(
this
,
event
)
.
bind
(
this
,
event
)
],
],
false
,
false
,
[
[
'clearCache'
,
'trash-o'
,
selectedData
,
'clearCache'
,
'trash-o'
,
selectedData
,
this
this
.
clearCache
.
clearCache
.
bind
(
this
,
id
)
.
bind
(
this
,
id
)
],
],
[
[
'clearAllCache'
,
'trash'
,
false
,
'clearAllCache'
,
'trash'
,
false
,
this
this
.
clearAllCache
.
clearAllCache
.
bind
(
this
)
.
bind
(
this
)
]
]
].
map
((
menu
)
=>
{
].
map
((
menu
)
=>
{
// 分隔符号
// 分隔符号
...
@@ -177,7 +177,8 @@ class ContextMenu {
...
@@ -177,7 +177,8 @@ class ContextMenu {
// 判断脚本是否支持,不支持则禁止
// 判断脚本是否支持,不支持则禁止
if
(
p
[
'info'
][
'scripts'
]
&&
p
[
'info'
][
'scripts'
].
length
>
0
)
{
if
(
p
[
'info'
][
'scripts'
]
&&
p
[
'info'
][
'scripts'
].
length
>
0
)
{
infos
.
map
((
_info
)
=>
{
infos
.
map
((
_info
)
=>
{
if
(
p
[
'info'
][
'scripts'
].
indexOf
(
_info
[
'type'
])
===
-
1
)
{
console
.
log
(
p
[
'info'
][
'scripts'
])
if
(
p
[
'info'
][
'scripts'
].
indexOf
(
"*"
)
===
-
1
&&
p
[
'info'
][
'scripts'
].
indexOf
(
_info
[
'type'
])
===
-
1
)
{
// 如果检测到不支持的脚本,则禁止
// 如果检测到不支持的脚本,则禁止
ret
=
true
;
ret
=
true
;
}
}
...
@@ -185,7 +186,7 @@ class ContextMenu {
...
@@ -185,7 +186,7 @@ class ContextMenu {
}
}
// 判断是否支持多目标执行
// 判断是否支持多目标执行
return
ret
||
!
p
[
'info'
][
'multiple'
];
return
ret
||
!
p
[
'info'
][
'multiple'
];
})()
:
info
&&
(
p
[
'info'
][
'scripts'
]
||
[]).
indexOf
(
info
[
'type'
])
===
-
1
,
})()
:
info
&&
(
p
[
'info'
][
'scripts'
]
||
[]).
indexOf
(
"*"
)
===
-
1
&&
(
p
[
'info'
][
'scripts'
]
||
[]).
indexOf
(
info
[
'type'
])
===
-
1
,
action
:
((
plug
)
=>
()
=>
{
action
:
((
plug
)
=>
()
=>
{
// 如果没有加载到内存,则加载
// 如果没有加载到内存,则加载
if
(
!
antSword
[
'plugins'
][
plug
[
'_id'
]][
'module'
])
{
if
(
!
antSword
[
'plugins'
][
plug
[
'_id'
]][
'module'
])
{
...
...
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