Commit cea2919f authored by Medicean's avatar Medicean

(Fix:UI) 处理二次转义的问题

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