Commit 5e0fa998 authored by Medicean's avatar Medicean

Merge branch 'v2.0.x' into v2.1.x

parents 7fa790d5 cea2919f
......@@ -84,8 +84,8 @@ module.exports = {
del: {
title: 'Delete category',
confirm: 'Are you sure to delete this category?',
success: (category) => antSword.noxss(`Delete category(${category}) success!`),
error: (category, err) => antSword.noxss(`Delete category(${category}failed!\n${err}`)
success: (category) => `Delete category(${category}) success!`,
error: (category, err) => `Delete category(${category}failed!\n${err}`
},
rename: {
title: 'Rename category',
......@@ -125,7 +125,7 @@ module.exports = {
test_warning: 'Response is null!',
warning: 'Please enter the full!',
success: 'Add shell success!',
error: (err) => antSword.noxss(`Add shell failed!\n${err}`)
error: (err) => `Add shell failed!\n${err}`
},
edit: {
title: (url) => antSword.noxss(`Edit shell(${url})`),
......@@ -143,29 +143,29 @@ module.exports = {
},
warning: 'Please enter the full!',
success: 'Update shell success!',
error: (err) => antSword.noxss(`Update shell failed!\n${err}`)
error: (err) => `Update shell failed!\n${err}`
},
del: {
title: 'Delete shell',
confirm: (len) => antSword.noxss(`Are you sure to delete ${len} shells?`),
success: (len) => antSword.noxss(`Delete ${len} shells success!`),
error: (err) => antSword.noxss(`Delete failed!\n${err}`)
success: (len) => `Delete ${len} shells success!`,
error: (err) => `Delete failed!\n${err}`
},
move: {
success: (num) => antSword.noxss(`Move ${num}datas success!`),
error: (err) => antSword.noxss(`Move data failed!\n${err}`)
success: (num) => `Move ${num}datas success!`,
error: (err) => `Move data failed!\n${err}`
},
clearCache: {
title: 'Clear cache',
confirm: 'Are you sure to clear this cache?',
success: 'Clear cache success!',
error: (err) => antSword.noxss(`Clear cache failed!\n${err}`)
error: (err) => `Clear cache failed!\n${err}`
},
clearAllCache: {
title: 'Clear all cache',
confirm: 'Are you sure to clear all the cache?',
success: 'Clear all cache success!',
error: (err) => antSword.noxss(`Clear all cache failed!\n${err}`)
error: (err) => `Clear all cache failed!\n${err}`
},
accordion: {
base: 'Base',
......@@ -236,40 +236,40 @@ Hot Keys:
delete: {
title: 'Delete',
confirm: (num) => antSword.noxss(`Are you sure to delete ${typeof(num) === 'number' ? num + ' files' : num} ?`),
success: (path) => antSword.noxss(`Delete file [${path}] success!`),
error: (path, err) => antSword.noxss(`Delete file [${path}] failed!${err ? '\n' + err : ''}`)
success: (path) => `Delete file [${path}] success!`,
error: (path, err) => `Delete file [${path}] failed!${err ? '\n' + err : ''}`
},
paste: {
success: (path) => antSword.noxss(`Paste file success!\n${path}`),
error: (path, err) => antSword.noxss(`Paste file [${path}] failed!${err ? '\n' + err : ''}`)
success: (path) => `Paste file success!\n${path}`,
error: (path, err) => `Paste file [${path}] failed!${err ? '\n' + err : ''}`
},
rename: {
title: 'Rename',
success: 'Rename success!',
error: (err) => antSword.noxss(`Rename failed!${err ? '\n' + err : ''}`)
error: (err) => `Rename failed!${err ? '\n' + err : ''}`
},
createFolder: {
title: 'Create Folder',
value: 'New Folder',
success: (path) => antSword.noxss(`Create folder success!\n${path}`),
error: (path, err) => antSword.noxss(`Create folder [${path}] failed!${err ? '\n' + err : ''}`)
success: (path) => `Create folder success!\n${path}`,
error: (path, err) => `Create folder [${path}] failed!${err ? '\n' + err : ''}`
},
createFile: {
title: 'Create File',
value: 'New File.txt',
success: (path) => antSword.noxss(`Create file success!\n${path}`),
error: (path, err) => antSword.noxss(`Create file [${path}] failed!${err ? '\n' + err : ''}`)
success: (path) => `Create file success!\n${path}`,
error: (path, err) => `Create file [${path}] failed!${err ? '\n' + err : ''}`
},
retime: {
title: 'Retime File',
success: (path) => antSword.noxss(`Retime file success!\n${path}`),
error: (path, err) => antSword.noxss(`Retime file [${path}] failed!${err ? '\n' + err : ''}`)
success: (path) => `Retime file success!\n${path}`,
error: (path, err) => `Retime file [${path}] failed!${err ? '\n' + err : ''}`
},
chmod: {
title: 'Chmod File',
check: 'Input should be octal numbers, eg: 0644',
success: (path) => antSword.noxss(`Chmod file success!\n${path}`),
error: (path, err) => antSword.noxss(`Chmod file [${path}] failed!${err ? '\n' + err : ''}`)
success: (path) => `Chmod file success!\n${path}`,
error: (path, err) => `Chmod file [${path}] failed!${err ? '\n' + err : ''}`
},
wget: {
title: 'Wget File',
......@@ -278,8 +278,8 @@ Hot Keys:
name: 'WGET',
start: 'Start to wget file..',
success: 'Wget success!',
failed: (ret) => antSword.noxss(`Failed:${ret}`),
error: (err) => antSword.noxss(`Error:${err}`)
failed: (ret) => `Failed:${ret}`,
error: (err) => `Error:${err}`
}
},
upload: {
......@@ -289,11 +289,11 @@ Hot Keys:
httperr_413: 'Please lower the upload file shard size setting.',
httperr_etime: 'Request timeout, please increase the timeout period.',
httperr_econnrefused: 'Connection refused, check target or proxy is enabled.',
failed: (err) => antSword.noxss(`Failed:${err}`),
error: (err) => antSword.noxss(`Error:${err}`)
failed: (err) => `Failed:${err}`,
error: (err) => `Error:${err}`
},
success: (path) => antSword.noxss(`Upload file success!\n${path}`),
error: (path, err) => antSword.noxss(`Upload file [${path}] failed!${err}`),
success: (path) => `Upload file success!\n${path}`,
error: (path, err) => `Upload file [${path}] failed!${err}`,
},
folder: {
title: 'Folders'
......@@ -320,7 +320,7 @@ Hot Keys:
prompt: {
add: {
title: 'Add to bookmark',
success: (path) => antSword.noxss(`Add to bookmark success!\n${path}`),
success: (path) => `Add to bookmark success!\n${path}`,
},
remove: {
title: 'Remove bookmark',
......@@ -369,8 +369,8 @@ Hot Keys:
copypath: 'Copy FilePath',
copysuccess: 'Copy to clipboard successfully!',
copyfail: 'Copy to clipboard failed!',
warning: (id) => antSword.noxss(`Already add to clipboard!\n${id}`),
info: (id) => antSword.noxss(`Add file to the clipboard.\n${id}`)
warning: (id) => `Already add to clipboard!\n${id}`,
info: (id) => `Add file to the clipboard.\n${id}`
},
create: {
title: 'Create',
......@@ -388,9 +388,9 @@ Hot Keys:
mode: 'Mode',
encode: 'Open with Encoding'
},
loadErr: (err) => antSword.noxss(`Load file error!\n${err}`),
success: (path) => antSword.noxss(`Save the file success!\n${path}`),
error: (path, err) => antSword.noxss(`Save the file [${path}] failed!${err}`)
loadErr: (err) => `Load file error!\n${err}`,
success: (path) => `Save the file success!\n${path}`,
error: (path, err) => `Save the file [${path}] failed!${err}`
},
tasks: {
title: 'Tasks',
......@@ -412,10 +412,10 @@ Hot Keys:
cancel: 'Cancel download',
start: 'Start to download',
success: 'Download success!',
error: (err) => antSword.noxss(`Error:${err}`)
error: (err) => `Error:${err}`
},
error: (name, err) => antSword.noxss(`Download file [${name}]error!\n${err}`),
success: (name) => antSword.noxss(`Download file [${name}] success!`)
error: (name, err) => `Download file [${name}]error!\n${err}`,
success: (name) => `Download file [${name}] success!`
}
},
database: {
......@@ -451,10 +451,10 @@ Hot Keys:
title: 'Result',
warning: 'Execution is completed, but no results return!',
error: {
database: (err) => antSword.noxss(`Failed to obtain a list of databases!\n${err}`),
table: (err) => antSword.noxss(`Get table data failed!\n${err}`),
column: (err) => antSword.noxss(`Failed to obtain field list!\n${err}`),
query: (err) => antSword.noxss(`Failure to execute SQL!\n${err}`),
database: (err) => `Failed to obtain a list of databases!\n${err}`,
table: (err) => `Get table data failed!\n${err}`,
column: (err) => `Failed to obtain field list!\n${err}`,
query: (err) => `Failure to execute SQL!\n${err}`,
parse: 'Return data format is incorrect!',
noresult: 'No query results!'
},
......@@ -486,7 +486,7 @@ Hot Keys:
title: 'Delete configuration',
confirm: 'Determine delete this configuration?',
success: 'Delete configuration success!',
error: (err) => antSword.noxss(`Delete configuration failed!\n${err}`)
error: (err) => `Delete configuration failed!\n${err}`
},
adddb: {
title: 'New Database',
......@@ -772,7 +772,7 @@ Hot Keys:
}
},
plugin: {
error: (err) => antSword.noxss(`Load Plugin Store failed!\n${err}`)
error: (err) => `Load Plugin Store failed!\n${err}`
},
update: {
title: 'Found updates',
......
......@@ -85,8 +85,8 @@ module.exports = {
del: {
title: '删除分类',
confirm: '确定删除此分类吗?(数据将清空)',
success: (category) => antSword.noxss(`成功删除分类(${category})!`),
error: (category, err) => antSword.noxss(`删除分类(${category})失败!\n${err}`)
success: (category) => `成功删除分类(${category})!`,
error: (category, err) => `删除分类(${category})失败!\n${err}`
},
rename: {
title: '重命名分类',
......@@ -126,7 +126,7 @@ module.exports = {
test_warning: '返回数据为空',
warning: '请输入完整!',
success: '添加数据成功!',
error: (err) => antSword.noxss(`添加数据失败!\n${err}`)
error: (err) => `添加数据失败!\n${err}`
},
edit: {
title: (url) => antSword.noxss(`编辑数据(${url})`),
......@@ -144,29 +144,29 @@ module.exports = {
},
warning: '请输入完整!',
success: '更新数据成功!',
error: (err) => antSword.noxss(`更新数据失败!\n${err}`)
error: (err) => `更新数据失败!\n${err}`
},
del: {
title: '删除数据',
confirm: (len) => antSword.noxss(`确定删除选中的${len}条数据吗?`),
success: (len) => antSword.noxss(`成功删除${len}条数据!`),
error: (err) => antSword.noxss(`删除失败!\n${err}`)
success: (len) => `成功删除${len}条数据!`,
error: (err) => `删除失败!\n${err}`
},
move: {
success: (num) => antSword.noxss(`成功移动${num}条数据!`),
error: (err) => antSword.noxss(`移动数据失败!\n${err}`)
success: (num) => `成功移动${num}条数据!`,
error: (err) => `移动数据失败!\n${err}`
},
clearCache: {
title: '清空缓存',
confirm: '确定清空此缓存吗?',
success: '清空缓存完毕!',
error: (err) => antSword.noxss(`清空缓存失败!\n${err}`)
error: (err) => `清空缓存失败!\n${err}`
},
clearAllCache: {
title: '清空缓存',
confirm: '确定清空所有缓存数据吗?',
success: '清空全部缓存完毕!',
error: (err) => antSword.noxss(`清空全部缓存失败!\n${err}`)
error: (err) => `清空全部缓存失败!\n${err}`
},
accordion: {
base: '基础配置',
......@@ -237,40 +237,40 @@ module.exports = {
delete: {
title: '删除文件',
confirm: (num) => antSword.noxss(`你确定要删除 ${typeof(num) === 'number' ? num + ' 个文件' : num} 吗?`),
success: (path) => antSword.noxss(`删除文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`删除文件 [${path}] 失败!${err ? '\n' + err : ''}`)
success: (path) => `删除文件成功!\n${path}`,
error: (path, err) => `删除文件 [${path}] 失败!${err ? '\n' + err : ''}`
},
paste: {
success: (path) => antSword.noxss(`粘贴文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`粘贴文件 [${path}] 失败!${err ? '\n' + err : ''}`)
success: (path) => `粘贴文件成功!\n${path}`,
error: (path, err) => `粘贴文件 [${path}] 失败!${err ? '\n' + err : ''}`
},
rename: {
title: '重命名',
success: '重命名文件成功!',
error: (err) => antSword.noxss(`重命名文件失败!${err ? '\n' + err : ''}`)
error: (err) => `重命名文件失败!${err ? '\n' + err : ''}`
},
createFolder: {
title: '新建目录',
value: '新目录',
success: (path) => antSword.noxss(`新建目录成功!\n${path}`),
error: (path, err) => antSword.noxss(`新建目录 [${path}] 失败!${err ? '\n' + err : ''}`)
success: (path) => `新建目录成功!\n${path}`,
error: (path, err) => `新建目录 [${path}] 失败!${err ? '\n' + err : ''}`
},
createFile: {
title: '新建文件',
value: '新文件.txt',
success: (path) => antSword.noxss(`新建文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`新建文件 [${path}] 失败!${err ? '\n' + err : ''}`)
success: (path) => `新建文件成功!\n${path}`,
error: (path, err) => `新建文件 [${path}] 失败!${err ? '\n' + err : ''}`
},
retime: {
title: '更改时间',
success: (path) => antSword.noxss(`更改文件时间成功!\n${path}`),
error: (path, err) => antSword.noxss(`更改文件时间 [${path}] 失败!${err ? '\n' + err : ''}`)
success: (path) => `更改文件时间成功!\n${path}`,
error: (path, err) => `更改文件时间 [${path}] 失败!${err ? '\n' + err : ''}`
},
chmod: {
title: '更改权限',
check: "输入应为八进制数表示的权限, eg: 0644",
success: (path) => antSword.noxss(`更改文件权限成功!\n${path}`),
error: (path, err) => antSword.noxss(`更改文件权限 [${path}] 失败!${err ? '\n' + err : ''}`)
success: (path) => `更改文件权限成功!\n${path}`,
error: (path, err) => `更改文件权限 [${path}] 失败!${err ? '\n' + err : ''}`
},
wget: {
title: 'Wget下载文件',
......@@ -279,8 +279,8 @@ module.exports = {
name: 'WGET下载',
start: '开始下载..',
success: '下载成功!',
failed: (ret) => antSword.noxss(`失败:${ret}`),
error: (err) => antSword.noxss(`错误:${err}`)
failed: (ret) => `失败:${ret}`,
error: (err) => `错误:${err}`
}
},
upload: {
......@@ -290,11 +290,11 @@ module.exports = {
httperr_413: '请将上传文件分片大小设置调低',
httperr_etime: '请求超时,请将超时时间调大',
httperr_econnrefused: '连接被拒绝,检查目标或代理是否开启',
failed: (err) => antSword.noxss(`失败:${err}`),
error: (err) => antSword.noxss(`出错:${err}`)
failed: (err) => `失败:${err}`,
error: (err) => `出错:${err}`
},
success: (path) => antSword.noxss(`上传文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`上传文件 [${path}] 失败!${err}`),
success: (path) => `上传文件成功!\n${path}`,
error: (path, err) => `上传文件 [${path}] 失败!${err}`,
},
folder: {
title: '目录列表'
......@@ -321,7 +321,7 @@ module.exports = {
prompt: {
add: {
title: '添加到书签',
success: (path) => antSword.noxss(`添加书签成功!\n${path}`),
success: (path) => `添加书签成功!\n${path}`,
},
remove: {
title: '移除书签',
......@@ -370,8 +370,8 @@ module.exports = {
copypath: '复制文件路径',
copysuccess: '复制到剪贴板成功!',
copyfail: '复制到剪贴板失败!',
warning: (id) => antSword.noxss(`已经添加到剪贴板!\n${id}`),
info: (id) => antSword.noxss(`添加文件到剪贴板\n${id}`)
warning: (id) => `已经添加到剪贴板!\n${id}`,
info: (id) => `添加文件到剪贴板\n${id}`
},
create: {
title: '新建',
......@@ -383,15 +383,15 @@ module.exports = {
}
},
editor: {
title: (path) => antSword.noxss(`编辑: ${path}`),
title: (path) => `编辑: ${path}`,
toolbar: {
save: '保存',
mode: '高亮',
encode: '用此编码打开'
},
loadErr: (err) => antSword.noxss(`加载文件出错!\n${err}`),
success: (path) => antSword.noxss(`保存文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`保存文件 [${path}] 失败!${err}`)
loadErr: (err) => `加载文件出错!\n${err}`,
success: (path) => `保存文件成功!\n${path}`,
error: (path, err) => `保存文件 [${path}] 失败!${err}`
},
tasks: {
title: '任务列表',
......@@ -413,10 +413,10 @@ module.exports = {
cancel: '取消下载',
start: '开始下载',
success: '下载成功',
error: (err) => antSword.noxss(`出错:${err}`)
error: (err) => `出错:${err}`
},
error: (name, err) => antSword.noxss(`下载文件[${name}]出错!\n${err}`),
success: (name) => antSword.noxss(`下载文件[${name}]成功!`)
error: (name, err) => `下载文件[${name}]出错!\n${err}`,
success: (name) => `下载文件[${name}]成功!`
}
},
database: {
......@@ -452,10 +452,10 @@ module.exports = {
title: '执行结果',
warning: '操作完毕,但没有结果返回!',
error: {
database: (err) => antSword.noxss(`获取数据库列表失败!\n${err}`),
table: (err) => antSword.noxss(`获取表数据失败!\n${err}`),
column: (err) => antSword.noxss(`获取字段列表失败!\n${err}`),
query: (err) => antSword.noxss(`执行SQL失败!\n${err}`),
database: (err) => `获取数据库列表失败!\n${err}`,
table: (err) => `获取表数据失败!\n${err}`,
column: (err) => `获取字段列表失败!\n${err}`,
query: (err) => `执行SQL失败!\n${err}`,
parse: '返回数据格式不正确!',
noresult: '没有查询结果!'
},
......@@ -487,7 +487,7 @@ module.exports = {
title: '删除配置',
confirm: '确定删除此配置吗?',
success: '删除配置成功!',
error: (err) => antSword.noxss(`删除配置失败!\n${err}`)
error: (err) => `删除配置失败!\n${err}`
},
adddb: {
title: '新建数据库',
......@@ -773,7 +773,7 @@ module.exports = {
}
},
plugin: {
error: (err) => antSword.noxss(`加载插件中心失败!\n${err}`)
error: (err) => `加载插件中心失败!\n${err}`
},
update: {
title: '发现更新',
......
//
// language::zh_hk
// language::zh
//
module.exports = {
title: '中國蟻劍',
......@@ -85,8 +85,8 @@ module.exports = {
del: {
title: '刪除分類',
confirm: '確定刪除此分類嗎?(數據將清空)',
success: (category) => antSword.noxss(`成功刪除分類(${category})!`),
error: (category, err) => antSword.noxss(`刪除分類(${category})失敗!\n${err}`)
success: (category) => `成功刪除分類(${category})!`,
error: (category, err) => `刪除分類(${category})失敗!\n${err}`
},
rename: {
title: '重命名分類',
......@@ -126,7 +126,7 @@ module.exports = {
test_warning: '返回數據為空',
warning: '請輸入完整!',
success: '添加數據成功!',
error: (err) => antSword.noxss(`添加數據失敗!\n${err}`)
error: (err) => `添加數據失敗!\n${err}`
},
edit: {
title: (url) => antSword.noxss(`編輯數據(${url})`),
......@@ -144,29 +144,29 @@ module.exports = {
},
warning: '請輸入完整!',
success: '更新數據成功!',
error: (err) => antSword.noxss(`更新數據失敗!\n${err}`)
error: (err) => `更新數據失敗!\n${err}`
},
del: {
title: '刪除數據',
confirm: (len) => antSword.noxss(`確定刪除選中的${len}條數據嗎?`),
success: (len) => antSword.noxss(`成功刪除${len}條數據!`),
error: (err) => antSword.noxss(`刪除失敗!\n${err}`)
success: (len) => `成功刪除${len}條數據!`,
error: (err) => `刪除失敗!\n${err}`
},
move: {
success: (num) => antSword.noxss(`成功移動${num}條數據!`),
error: (err) => antSword.noxss(`移動數據失敗!\n${err}`)
success: (num) => `成功移動${num}條數據!`,
error: (err) => `移動數據失敗!\n${err}`
},
clearCache: {
title: '清空緩存',
confirm: '確定清空此緩存嗎?',
success: '清空緩存完畢!',
error: (err) => antSword.noxss(`清空緩存失敗!\n${err}`)
error: (err) => `清空緩存失敗!\n${err}`
},
clearAllCache: {
title: '清空緩存',
confirm: '確定清空所有緩存數據嗎?',
success: '清空全部緩存完畢!',
error: (err) => antSword.noxss(`清空全部緩存失敗!\n${err}`)
error: (err) => `清空全部緩存失敗!\n${err}`
},
accordion: {
base: '基礎配置',
......@@ -237,40 +237,40 @@ module.exports = {
delete: {
title: '刪除文件',
confirm: (num) => antSword.noxss(`你確定要刪除 ${typeof(num) === 'number' ? num + ' 個文件' : num} 嗎?`),
success: (path) => antSword.noxss(`刪除文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`刪除文件 [${path}] 失敗!${err ? '\n' + err : ''}`)
success: (path) => `刪除文件成功!\n${path}`,
error: (path, err) => `刪除文件 [${path}] 失敗!${err ? '\n' + err : ''}`
},
paste: {
success: (path) => antSword.noxss(`粘貼文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`粘貼文件 [${path}] 失敗!${err ? '\n' + err : ''}`)
success: (path) => `粘貼文件成功!\n${path}`,
error: (path, err) => `粘貼文件 [${path}] 失敗!${err ? '\n' + err : ''}`
},
rename: {
title: '重命名',
success: '重命名文件成功!',
error: (err) => antSword.noxss(`重命名文件失敗!${err ? '\n' + err : ''}`)
error: (err) => `重命名文件失敗!${err ? '\n' + err : ''}`
},
createFolder: {
title: '新建目錄',
value: '新目錄',
success: (path) => antSword.noxss(`新建目錄成功!\n${path}`),
error: (path, err) => antSword.noxss(`新建目錄 [${path}] 失敗!${err ? '\n' + err : ''}`)
success: (path) => `新建目錄成功!\n${path}`,
error: (path, err) => `新建目錄 [${path}] 失敗!${err ? '\n' + err : ''}`
},
createFile: {
title: '新建文件',
value: '新文件.txt',
success: (path) => antSword.noxss(`新建文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`新建文件 [${path}] 失敗!${err ? '\n' + err : ''}`)
success: (path) => `新建文件成功!\n${path}`,
error: (path, err) => `新建文件 [${path}] 失敗!${err ? '\n' + err : ''}`
},
retime: {
title: '更改時間',
success: (path) => antSword.noxss(`更改文件時間成功!\n${path}`),
error: (path, err) => antSword.noxss(`更改文件時間 [${path}] 失敗!${err ? '\n' + err : ''}`)
success: (path) => `更改文件時間成功!\n${path}`,
error: (path, err) => `更改文件時間 [${path}] 失敗!${err ? '\n' + err : ''}`
},
chmod: {
title: '更改權限',
check: "輸入應為八進制數表示的權限, eg: 0644",
success: (path) => antSword.noxss(`更改文件權限成功!\n${path}`),
error: (path, err) => antSword.noxss(`更改文件權限 [${path}] 失敗!${err ? '\n' + err : ''}`)
success: (path) => `更改文件權限成功!\n${path}`,
error: (path, err) => `更改文件權限 [${path}] 失敗!${err ? '\n' + err : ''}`
},
wget: {
title: 'Wget下載文件',
......@@ -279,8 +279,8 @@ module.exports = {
name: 'WGET下載',
start: '開始下載..',
success: '下載成功!',
failed: (ret) => antSword.noxss(`失敗:${ret}`),
error: (err) => antSword.noxss(`錯誤:${err}`)
failed: (ret) => `失敗:${ret}`,
error: (err) => `錯誤:${err}`
}
},
upload: {
......@@ -290,11 +290,11 @@ module.exports = {
httperr_413: '請將上傳文件分片大小設置調低',
httperr_etime: '請求超時,請將超時時間調大',
httperr_econnrefused: '連接被拒絕,檢查目標或代理是否開啟',
failed: (err) => antSword.noxss(`失敗:${err}`),
error: (err) => antSword.noxss(`出錯:${err}`)
failed: (err) => `失敗:${err}`,
error: (err) => `出錯:${err}`
},
success: (path) => antSword.noxss(`上傳文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`上傳文件 [${path}] 失敗!${err}`),
success: (path) => `上傳文件成功!\n${path}`,
error: (path, err) => `上傳文件 [${path}] 失敗!${err}`,
},
folder: {
title: '目錄列表'
......@@ -321,7 +321,7 @@ module.exports = {
prompt: {
add: {
title: '添加到書籤',
success: (path) => antSword.noxss(`添加書籤成功!\n${path}`),
success: (path) => `添加書籤成功!\n${path}`,
},
remove: {
title: '移除書籤',
......@@ -370,8 +370,8 @@ module.exports = {
copypath: '複製文件路徑',
copysuccess: '複製到剪貼板成功!',
copyfail: '複製到剪貼板失敗!',
warning: (id) => antSword.noxss(`已經添加到剪貼板!\n${id}`),
info: (id) => antSword.noxss(`添加文件到剪貼板\n${id}`)
warning: (id) => `已經添加到剪貼板!\n${id}`,
info: (id) => `添加文件到剪貼板\n${id}`
},
create: {
title: '新建',
......@@ -383,15 +383,15 @@ module.exports = {
}
},
editor: {
title: (path) => antSword.noxss(`編輯: ${path}`),
title: (path) => `編輯: ${path}`,
toolbar: {
save: '保存',
mode: '高亮',
encode: '用此編碼打開'
},
loadErr: (err) => antSword.noxss(`加載文件出錯!\n${err}`),
success: (path) => antSword.noxss(`保存文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`保存文件 [${path}] 失敗!${err}`)
loadErr: (err) => `加載文件出錯!\n${err}`,
success: (path) => `保存文件成功!\n${path}`,
error: (path, err) => `保存文件 [${path}] 失敗!${err}`
},
tasks: {
title: '任務列表',
......@@ -413,10 +413,10 @@ module.exports = {
cancel: '取消下載',
start: '開始下載',
success: '下載成功',
error: (err) => antSword.noxss(`出錯:${err}`)
error: (err) => `出錯:${err}`
},
error: (name, err) => antSword.noxss(`下載文件[${name}]出錯!\n${err}`),
success: (name) => antSword.noxss(`下載文件[${name}]成功!`)
error: (name, err) => `下載文件[${name}]出錯!\n${err}`,
success: (name) => `下載文件[${name}]成功!`
}
},
database: {
......@@ -452,10 +452,10 @@ module.exports = {
title: '執行結果',
warning: '操作完畢,但沒有結果返回!',
error: {
database: (err) => antSword.noxss(`獲取數據庫列表失敗!\n${err}`),
table: (err) => antSword.noxss(`獲取表數據失敗!\n${err}`),
column: (err) => antSword.noxss(`獲取字段列表失敗!\n${err}`),
query: (err) => antSword.noxss(`執行SQL失敗!\n${err}`),
database: (err) => `獲取數據庫列表失敗!\n${err}`,
table: (err) => `獲取表數據失敗!\n${err}`,
column: (err) => `獲取字段列表失敗!\n${err}`,
query: (err) => `執行SQL失敗!\n${err}`,
parse: '返回數據格式不正確!',
noresult: '沒有查詢結果!'
},
......@@ -487,7 +487,7 @@ module.exports = {
title: '刪除配置',
confirm: '確定刪除此配置嗎?',
success: '刪除配置成功!',
error: (err) => antSword.noxss(`刪除配置失敗!\n${err}`)
error: (err) => `刪除配置失敗!\n${err}`
},
adddb: {
title: '新建數據庫',
......@@ -773,7 +773,7 @@ module.exports = {
}
},
plugin: {
error: (err) => antSword.noxss(`加載插件中心失敗!\n${err}`)
error: (err) => `加載插件中心失敗!\n${err}`
},
update: {
title: '發現更新',
......
//
// language::zh_tw
// language::zh
//
module.exports = {
title: '中國蟻劍',
......@@ -85,8 +85,8 @@ module.exports = {
del: {
title: '刪除分類',
confirm: '確定刪除此分類嗎?(數據將清空)',
success: (category) => antSword.noxss(`成功刪除分類(${category})!`),
error: (category, err) => antSword.noxss(`刪除分類(${category})失敗!\n${err}`)
success: (category) => `成功刪除分類(${category})!`,
error: (category, err) => `刪除分類(${category})失敗!\n${err}`
},
rename: {
title: '重命名分類',
......@@ -126,7 +126,7 @@ module.exports = {
test_warning: '返回數據為空',
warning: '請輸入完整!',
success: '添加數據成功!',
error: (err) => antSword.noxss(`添加數據失敗!\n${err}`)
error: (err) => `添加數據失敗!\n${err}`
},
edit: {
title: (url) => antSword.noxss(`編輯數據(${url})`),
......@@ -144,29 +144,29 @@ module.exports = {
},
warning: '請輸入完整!',
success: '更新數據成功!',
error: (err) => antSword.noxss(`更新數據失敗!\n${err}`)
error: (err) => `更新數據失敗!\n${err}`
},
del: {
title: '刪除數據',
confirm: (len) => antSword.noxss(`確定刪除選中的${len}條數據嗎?`),
success: (len) => antSword.noxss(`成功刪除${len}條數據!`),
error: (err) => antSword.noxss(`刪除失敗!\n${err}`)
success: (len) => `成功刪除${len}條數據!`,
error: (err) => `刪除失敗!\n${err}`
},
move: {
success: (num) => antSword.noxss(`成功移動${num}條數據!`),
error: (err) => antSword.noxss(`移動數據失敗!\n${err}`)
success: (num) => `成功移動${num}條數據!`,
error: (err) => `移動數據失敗!\n${err}`
},
clearCache: {
title: '清空緩存',
confirm: '確定清空此緩存嗎?',
success: '清空緩存完畢!',
error: (err) => antSword.noxss(`清空緩存失敗!\n${err}`)
error: (err) => `清空緩存失敗!\n${err}`
},
clearAllCache: {
title: '清空緩存',
confirm: '確定清空所有緩存數據嗎?',
success: '清空全部緩存完畢!',
error: (err) => antSword.noxss(`清空全部緩存失敗!\n${err}`)
error: (err) => `清空全部緩存失敗!\n${err}`
},
accordion: {
base: '基礎配置',
......@@ -237,40 +237,40 @@ module.exports = {
delete: {
title: '刪除文件',
confirm: (num) => antSword.noxss(`你確定要刪除 ${typeof(num) === 'number' ? num + ' 個文件' : num} 嗎?`),
success: (path) => antSword.noxss(`刪除文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`刪除文件 [${path}] 失敗!${err ? '\n' + err : ''}`)
success: (path) => `刪除文件成功!\n${path}`,
error: (path, err) => `刪除文件 [${path}] 失敗!${err ? '\n' + err : ''}`
},
paste: {
success: (path) => antSword.noxss(`粘貼文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`粘貼文件 [${path}] 失敗!${err ? '\n' + err : ''}`)
success: (path) => `粘貼文件成功!\n${path}`,
error: (path, err) => `粘貼文件 [${path}] 失敗!${err ? '\n' + err : ''}`
},
rename: {
title: '重命名',
success: '重命名文件成功!',
error: (err) => antSword.noxss(`重命名文件失敗!${err ? '\n' + err : ''}`)
error: (err) => `重命名文件失敗!${err ? '\n' + err : ''}`
},
createFolder: {
title: '新建目錄',
value: '新目錄',
success: (path) => antSword.noxss(`新建目錄成功!\n${path}`),
error: (path, err) => antSword.noxss(`新建目錄 [${path}] 失敗!${err ? '\n' + err : ''}`)
success: (path) => `新建目錄成功!\n${path}`,
error: (path, err) => `新建目錄 [${path}] 失敗!${err ? '\n' + err : ''}`
},
createFile: {
title: '新建文件',
value: '新文件.txt',
success: (path) => antSword.noxss(`新建文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`新建文件 [${path}] 失敗!${err ? '\n' + err : ''}`)
success: (path) => `新建文件成功!\n${path}`,
error: (path, err) => `新建文件 [${path}] 失敗!${err ? '\n' + err : ''}`
},
retime: {
title: '更改時間',
success: (path) => antSword.noxss(`更改文件時間成功!\n${path}`),
error: (path, err) => antSword.noxss(`更改文件時間 [${path}] 失敗!${err ? '\n' + err : ''}`)
success: (path) => `更改文件時間成功!\n${path}`,
error: (path, err) => `更改文件時間 [${path}] 失敗!${err ? '\n' + err : ''}`
},
chmod: {
title: '更改權限',
check: "輸入應為八進制數表示的權限, eg: 0644",
success: (path) => antSword.noxss(`更改文件權限成功!\n${path}`),
error: (path, err) => antSword.noxss(`更改文件權限 [${path}] 失敗!${err ? '\n' + err : ''}`)
success: (path) => `更改文件權限成功!\n${path}`,
error: (path, err) => `更改文件權限 [${path}] 失敗!${err ? '\n' + err : ''}`
},
wget: {
title: 'Wget下載文件',
......@@ -279,8 +279,8 @@ module.exports = {
name: 'WGET下載',
start: '開始下載..',
success: '下載成功!',
failed: (ret) => antSword.noxss(`失敗:${ret}`),
error: (err) => antSword.noxss(`錯誤:${err}`)
failed: (ret) => `失敗:${ret}`,
error: (err) => `錯誤:${err}`
}
},
upload: {
......@@ -290,11 +290,11 @@ module.exports = {
httperr_413: '請將上傳文件分片大小設置調低',
httperr_etime: '請求超時,請將超時時間調大',
httperr_econnrefused: '連接被拒絕,檢查目標或代理是否開啟',
failed: (err) => antSword.noxss(`失敗:${err}`),
error: (err) => antSword.noxss(`出錯:${err}`)
failed: (err) => `失敗:${err}`,
error: (err) => `出錯:${err}`
},
success: (path) => antSword.noxss(`上傳文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`上傳文件 [${path}] 失敗!${err}`),
success: (path) => `上傳文件成功!\n${path}`,
error: (path, err) => `上傳文件 [${path}] 失敗!${err}`,
},
folder: {
title: '目錄列表'
......@@ -321,7 +321,7 @@ module.exports = {
prompt: {
add: {
title: '添加到書籤',
success: (path) => antSword.noxss(`添加書籤成功!\n${path}`),
success: (path) => `添加書籤成功!\n${path}`,
},
remove: {
title: '移除書籤',
......@@ -370,8 +370,8 @@ module.exports = {
copypath: '複製文件路徑',
copysuccess: '複製到剪貼板成功!',
copyfail: '複製到剪貼板失敗!',
warning: (id) => antSword.noxss(`已經添加到剪貼板!\n${id}`),
info: (id) => antSword.noxss(`添加文件到剪貼板\n${id}`)
warning: (id) => `已經添加到剪貼板!\n${id}`,
info: (id) => `添加文件到剪貼板\n${id}`
},
create: {
title: '新建',
......@@ -383,15 +383,15 @@ module.exports = {
}
},
editor: {
title: (path) => antSword.noxss(`編輯: ${path}`),
title: (path) => `編輯: ${path}`,
toolbar: {
save: '保存',
mode: '高亮',
encode: '用此編碼打開'
},
loadErr: (err) => antSword.noxss(`加載文件出錯!\n${err}`),
success: (path) => antSword.noxss(`保存文件成功!\n${path}`),
error: (path, err) => antSword.noxss(`保存文件 [${path}] 失敗!${err}`)
loadErr: (err) => `加載文件出錯!\n${err}`,
success: (path) => `保存文件成功!\n${path}`,
error: (path, err) => `保存文件 [${path}] 失敗!${err}`
},
tasks: {
title: '任務列表',
......@@ -413,10 +413,10 @@ module.exports = {
cancel: '取消下載',
start: '開始下載',
success: '下載成功',
error: (err) => antSword.noxss(`出錯:${err}`)
error: (err) => `出錯:${err}`
},
error: (name, err) => antSword.noxss(`下載文件[${name}]出錯!\n${err}`),
success: (name) => antSword.noxss(`下載文件[${name}]成功!`)
error: (name, err) => `下載文件[${name}]出錯!\n${err}`,
success: (name) => `下載文件[${name}]成功!`
}
},
database: {
......@@ -452,10 +452,10 @@ module.exports = {
title: '執行結果',
warning: '操作完畢,但沒有結果返回!',
error: {
database: (err) => antSword.noxss(`獲取數據庫列表失敗!\n${err}`),
table: (err) => antSword.noxss(`獲取表數據失敗!\n${err}`),
column: (err) => antSword.noxss(`獲取字段列表失敗!\n${err}`),
query: (err) => antSword.noxss(`執行SQL失敗!\n${err}`),
database: (err) => `獲取數據庫列表失敗!\n${err}`,
table: (err) => `獲取表數據失敗!\n${err}`,
column: (err) => `獲取字段列表失敗!\n${err}`,
query: (err) => `執行SQL失敗!\n${err}`,
parse: '返回數據格式不正確!',
noresult: '沒有查詢結果!'
},
......@@ -487,7 +487,7 @@ module.exports = {
title: '刪除配置',
confirm: '確定刪除此配置嗎?',
success: '刪除配置成功!',
error: (err) => antSword.noxss(`刪除配置失敗!\n${err}`)
error: (err) => `刪除配置失敗!\n${err}`
},
adddb: {
title: '新建數據庫',
......@@ -773,7 +773,7 @@ module.exports = {
}
},
plugin: {
error: (err) => antSword.noxss(`加載插件中心失敗!\n${err}`)
error: (err) => `加載插件中心失敗!\n${err}`
},
update: {
title: '發現更新',
......
......@@ -451,7 +451,7 @@ class ASP {
this.tree.insertNewItem(
`conn::${id}`,
`database::${id}:${_db}`,
_, null,
antSword.noxss(_), null,
this.manager.list.imgs[1],
this.manager.list.imgs[1],
this.manager.list.imgs[1]);
......@@ -494,7 +494,7 @@ class ASP {
this.tree.insertNewItem(
`database::${id}:${_db}`,
`table::${id}:${_db}:${_table}`,
_,
antSword.noxss(_),
null,
this.manager.list.imgs[2],
this.manager.list.imgs[2],
......@@ -553,11 +553,11 @@ class ASP {
// 添加子节点
arr.map((_) => {
if (!_) { return };
const _column = Buffer.from(_.split(' ')[0]).toString('base64');
const _column = Buffer.from(_.substr(_, _.lastIndexOf(' '))).toString('base64');
this.tree.insertNewItem(
`table::${id}:${_db}:${_table}`,
`column::${id}:${_db}:${_table}:${_column}`,
_, null,
antSword.noxss(_), null,
this.manager.list.imgs[3],
this.manager.list.imgs[3],
this.manager.list.imgs[3]
......@@ -622,7 +622,7 @@ class ASP {
return toastr.error(LANG['result']['error']['parse'], LANG_T['error']);
};
// 3.行头
let header_arr = arr[0].split('\t|\t');
let header_arr = antSword.noxss(arr[0]).split('\t|\t');
if (header_arr.length === 1) {
return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']);
};
......
......@@ -433,7 +433,7 @@ class CUSTOM {
this.tree.insertNewItem(
`conn::${id}`,
`database::${id}:${_db}`,
_, null,
antSword.noxss(_), null,
this.manager.list.imgs[1],
this.manager.list.imgs[1],
this.manager.list.imgs[1]);
......@@ -474,7 +474,7 @@ class CUSTOM {
this.tree.insertNewItem(
`database::${id}:${_db}`,
`table::${id}:${_db}:${_table}`,
_,
antSword.noxss(_),
null,
this.manager.list.imgs[2],
this.manager.list.imgs[2],
......@@ -515,11 +515,11 @@ class CUSTOM {
// 添加子节点
arr.map((_) => {
if (!_) { return };
const _column = Buffer.from(_.split(' ')[0]).toString('base64');
const _column = Buffer.from(_.substr(_, _.lastIndexOf(' '))).toString('base64');
this.tree.insertNewItem(
`table::${id}:${_db}:${_table}`,
`column::${id}:${_db}:${_table}:${_column}`,
_, null,
antSword.noxss(_), null,
this.manager.list.imgs[3],
this.manager.list.imgs[3],
this.manager.list.imgs[3]
......@@ -572,7 +572,7 @@ class CUSTOM {
return toastr.error(LANG['result']['error']['parse'], LANG_T['error']);
};
// 3.行头
let header_arr = arr[0].split('\t|\t');
let header_arr = antSword.noxss(arr[0]).split('\t|\t');
if (header_arr.length === 1) {
return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']);
};
......
......@@ -1385,7 +1385,7 @@ class PHP {
this.tree.insertNewItem(
`conn::${id}`,
`database::${id}:${_db}`,
_, null,
antSword.noxss(_), null,
this.manager.list.imgs[1],
this.manager.list.imgs[1],
this.manager.list.imgs[1]);
......@@ -1429,7 +1429,7 @@ class PHP {
this.tree.insertNewItem(
`database::${id}:${_db}`,
`table::${id}:${_db}:${_table}`,
_,
antSword.noxss(_),
null,
this.manager.list.imgs[2],
this.manager.list.imgs[2],
......@@ -1473,11 +1473,11 @@ class PHP {
// 添加子节点
arr.map((_) => {
if (!_) { return };
const _column = Buffer.from(_.split(' ')[0]).toString('base64');
const _column = Buffer.from(_.substr(_, _.lastIndexOf(' '))).toString('base64');
this.tree.insertNewItem(
`table::${id}:${_db}:${_table}`,
`column::${id}:${_db}:${_table}:${_column}`,
_, null,
antSword.noxss(_), null,
this.manager.list.imgs[3],
this.manager.list.imgs[3],
this.manager.list.imgs[3]
......@@ -1560,7 +1560,7 @@ class PHP {
return toastr.error(LANG['result']['error']['parse'], LANG_T['error']);
};
// 3.行头
let header_arr = arr[0].split('\t|\t');
let header_arr = antSword.noxss(arr[0]).split('\t|\t');
if (header_arr.length === 1) {
return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']);
};
......@@ -1621,7 +1621,7 @@ class PHP {
return toastr.error(LANG['result']['error']['parse'], LANG_T['error']);
};
// 3.行头
let header_arr = arr[0].split('\t|\t');
let header_arr = antSword.noxss(arr[0]).split('\t|\t');
if (header_arr.length === 1) {
return toastr.warning(LANG['result']['error']['noresult'], LANG_T['warning']);
};
......
......@@ -286,7 +286,7 @@ class FileManager {
let self = this;
layer.confirm(
LANG['delete']['confirm'](files.length > 1 ? files.length : antSword.noxss(files[0])),
LANG['delete']['confirm'](files.length > 1 ? files.length : files[0]),
{
icon: 2,
shift: 6,
......@@ -813,7 +813,7 @@ class FileManager {
let hinttext = '';
if (openfileintab == false){
win = this.createWin({
title: LANG['editor']['title'](path),
title: LANG['editor']['title'](antSword.noxss(path)),
width: 800
});
win.maximize();
......
......@@ -47,7 +47,7 @@ class Tabbar {
* @return {Object} this
*/
setTitle(title = 'New Title') {
this.cell.setText(`<i class="fa fa-puzzle-piece"></i> ${title}`);
this.cell.setText(`<i class="fa fa-puzzle-piece"></i> ${antSword.noxss(title)}`);
return this;
}
......@@ -57,10 +57,12 @@ class Tabbar {
* @param {String} html = "" [description]
* @return {Object} this
*/
safeHTML(html = "") {
safeHTML(html = "", sandbox = "") {
let _html = Buffer.from(html).toString('base64');
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox
let _iframe = `
<iframe
sandbox="${sandbox}"
src="data:text/html;base64,${_html}"
style="width:100%;height:100%;border:0;padding:0;margin:0;">
</iframe>
......
......@@ -34,7 +34,7 @@ class Window {
id, 0, 0,
opt['width'], opt['height']
);
win.setText(opt['title']);
win.setText(antSword.noxss(opt['title']));
win.centerOnScreen();
win.button('minmax').show();
win.button('minmax').enable();
......@@ -55,7 +55,7 @@ class Window {
* @param {String} title = 'New Title' 新标题
*/
setTitle(title = 'New Title') {
this.win.setText(title);
this.win.setText(antSword.noxss(title));
}
}
......
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