Commit 733136c4 authored by Medicean's avatar Medicean

(Enhance:ShellManager) 新增「创建副本」菜单, 复制所选择的 Shell 并在相同分类下创建一个副本

parent 93799340
......@@ -38,12 +38,16 @@
![](https://i.loli.net/2019/03/13/5c891b2cc1c30.png)
### 数据管理
* shell 配置页面提示不推荐使用 default、random 编码器, 明文传输 Payload 容易受到转义等影响,未来版本将会考虑移除
* 新增「创建副本」菜单, 复制所选择的 Shell 并在相同分类下创建一个副本
### 其它
* 新增 「JSP Custom Shell For Oracle」
* 新增 Decodes 自动猜解编码,在中文少量的情况下,成功率会降低
* 系统托盘新增「重启应用」菜单
* shell 配置页面提示不推荐使用 default、random 编码器, 明文传输 Payload 容易受到转义等影响,未来版本将会考虑移除
### BugFix
......
......@@ -60,6 +60,7 @@ module.exports = {
edit: 'Edit',
delete: 'Delete',
move: 'Move',
copy: 'Copy',
search: 'Search',
plugin: 'Plugins',
pluginDefault: 'Default',
......
......@@ -61,6 +61,7 @@ module.exports = {
edit: '编辑数据',
delete: '删除数据',
move: '移动数据',
copy: '创建副本',
search: '搜索数据',
plugin: '加载插件',
pluginDefault: '默认分类',
......
......@@ -50,6 +50,7 @@ class ContextMenu {
['delete', 'remove', selectedMultiData, this.delData.bind(this, ids)],
false,
['move', 'share-square', selectedMultiData, null, this.parseMoveCategoryMenu(ids)],
['copy', 'copy', selectedData, this.copyData.bind(this, data[0])],
['search', 'search', true],
false,
['clearCache', 'trash-o', selectedData, this.clearCache.bind(this, id)],
......@@ -265,6 +266,37 @@ class ContextMenu {
});
}
/**
* 创建副本
* @param {Object} info 当前选中的数据
* @return {[type]} [description]
*/
copyData(info) {
let data = {
base: {
category: info['category'],
url: info['url'],
pwd: info['pwd'],
note: info['note'],
type: info['type'],
encode: info['encode'],
encoder: info['encoder']
},
http: info['httpConf'] || {},
other: info['otherConf'] || {},
}
const ret = antSword.ipcRenderer.sendSync('shell-add', data);
if (ret instanceof Object) {
// 重新加载数据
antSword.modules.shellmanager.reloadData({
category: data['base']['category']
});
toastr.success(LANG['list']['add']['success']);
} else {
toastr.error(LANG['list']['add']['error'](ret.toString()), LANG_T['error']);
}
}
/**
* 搜索数据
* @return {[type]} [description]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment