Commit 3352585f authored by Virink's avatar Virink Committed by undefined

新增网站备注功能 (#87) thx @virink 👍

parent e7725160
......@@ -121,6 +121,7 @@ class Database {
category: opts.base['category'] || 'default',
url: opts.base['url'],
pwd: opts.base['pwd'],
note: opts.base['note'],
type: opts.base['type'],
ip: ret['ip'],
addr: ret['addr'],
......@@ -161,6 +162,7 @@ class Database {
addr: ret['addr'],
url: _new.base['url'],
pwd: _new.base['pwd'],
note: _new.base['note'],
type: _new.base['type'],
encode: _new.base['encode'],
encoder: _new.base['encoder'],
......
......@@ -97,6 +97,7 @@ module.exports = {
url: 'URL',
ip: 'IP',
addr: 'ADDR',
note: 'NOTE',
ctime: 'CTIME',
utime: 'UTIME'
},
......@@ -109,6 +110,7 @@ module.exports = {
form: {
url: 'Shell url',
pwd: 'Shell pwd',
note: 'Note',
encode: 'Encode',
type: 'Shell type',
encoder: 'Encoder'
......@@ -126,6 +128,7 @@ module.exports = {
form: {
url: 'Shell url',
pwd: 'Shell pwd',
note: 'Note',
encode: 'Encode',
type: 'Shell type',
encoder: 'Encoder'
......
......@@ -98,6 +98,7 @@ module.exports = {
url: 'URL地址',
ip: 'IP地址',
addr: '物理位置',
note: '网站备注',
ctime: '创建时间',
utime: '更新时间'
},
......@@ -110,6 +111,7 @@ module.exports = {
form: {
url: 'URL地址',
pwd: '连接密码',
note: '网站备注',
encode: '编码设置',
type: '连接类型',
encoder: '编码器'
......@@ -127,6 +129,7 @@ module.exports = {
form: {
url: 'URL地址',
pwd: '连接密码',
note: '网站备注',
encode: '编码设置',
type: '连接类型',
encoder: '编码器'
......
......@@ -26,7 +26,7 @@ module.exports = {
data.push({
id: _['_id'],
data: [
_['url'], _['ip'], _['addr'],
_['url'], _['ip'], _['addr'], _['note'],
new Date(_['ctime']).format('yyyy/MM/dd hh:mm:ss'),
new Date(_['utime']).format('yyyy/MM/dd hh:mm:ss')
]
......
......@@ -142,6 +142,7 @@ class Form {
const opt = Object.assign({}, {
url: '',
pwd: '',
note: '',
type: 'php',
encode: 'utf8',
encoder: 'default'
......@@ -155,9 +156,12 @@ class Form {
}, {
type: 'input', label: LANG['list']['add']['form']['pwd'],
name: 'pwd', required: true, value: opt.pwd
}, {
},{
type: 'input', label: LANG['list']['add']['form']['note'],
name: 'note', value: opt.note
}, {
type: 'combo', label: LANG['list']['add']['form']['encode'],
readonly: true, name: 'encode', options: this._parseEncodes(opt.encode)
name: 'encode', readonly: true, options: this._parseEncodes(opt.encode)
}, {
type: 'combo', label: LANG['list']['add']['form']['type'],
name: 'type', readonly: true, options: this._parseTypes(opt.type, opt.encoder)
......@@ -234,6 +238,7 @@ class Form {
let _baseData = {
url: base['url'],
pwd: base['pwd'],
note: base['note'],
type: base['type'],
encode: base['encode'],
encoder: base[`encoder_${base['type']}`]
......
......@@ -22,13 +22,14 @@ class Grid {
${LANG['url']},
${LANG['ip']},
${LANG['addr']},
${LANG['note']},
${LANG['ctime']},
${LANG['utime']}
`);
grid.setColTypes("ro,ro,ro,ro,ro");
grid.setColSorting('str,str,str,str,str');
grid.setInitWidths("200,120,*,140,140");
grid.setColAlign("left,left,left,center,center");
grid.setColTypes("ro,ro,ro,ro,ro,ro");
grid.setColSorting('str,str,str,str,str,str');
grid.setInitWidths("200,120,*,*,140,140");
grid.setColAlign("left,left,left,left,center,center");
grid.enableMultiselect(true);
// 隐藏右键菜单
......
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