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

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

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