efront 4.21.4 → 4.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/#/345/233/275/351/231/205/345/214/226.yml +24 -0
- package/apps/blank/index.html +1 -1
- package/apps/index.jsp +76 -27
- package/apps/pay/alipay-query.jsp +1 -1
- package/apps/pay/alipay.jsp +1 -1
- package/apps/pivot/auth/login.js +2 -2
- package/apps/pivot/cert/main.xht +18 -5
- package/apps/pivot/db/act.xht +53 -0
- package/apps/pivot/db/config.xht +56 -16
- package/apps/pivot/home/welcome.html +12 -13
- package/apps/pivot/home/welcome.js +6 -6
- package/apps/pivot/home/welcome.less +12 -3
- package/apps/pivot/link/room.js +1 -1
- package/apps/pivot/main.js +3 -2
- package/apps/pivot/task/invoke.js +3 -3
- package/apps/pivot/task/rsync.js +2 -2
- package/apps/pivot/wow/root.js +8 -8
- package/coms/basic/#loader.js +9 -8
- package/coms/basic/Item.js +2 -2
- package/coms/basic/Tree.js +14 -2
- package/coms/basic/crc.js +5 -1
- package/coms/basic/cross_.js +2 -2
- package/coms/basic/decode62S.js +44 -0
- package/coms/basic/encode62S.js +40 -0
- package/coms/basic/encode62S_test.js +18 -0
- package/coms/basic/enrich.js +6 -1
- package/coms/basic/refilm_decode.js +40 -20
- package/coms/basic/refilm_decode_test.js +4 -0
- package/coms/basic/valid.js +4 -0
- package/coms/basic_/&Array.js +64 -49
- package/coms/basic_/&extends.js +9 -2
- package/coms/compile/Javascript.js +1 -1
- package/coms/compile/audit.js +23 -1
- package/coms/compile/cloneNode.js +3 -1
- package/coms/compile/downLevel.js +21 -11
- package/coms/compile/downLevel_test.js +52 -14
- package/coms/compile/rescan.js +8 -2
- package/coms/compile/unstruct.js +9 -9
- package/coms/crypt/encode62.js +36 -6
- package/coms/crypt/encode62_test.js +8 -48
- package/coms/explorer/main.less +1 -5
- package/coms/frame/chat.js +2 -2
- package/coms/frame/left.html +5 -4
- package/coms/frame/left.js +1 -0
- package/coms/frame/left.less +5 -3
- package/coms/frame/payment.js +2 -2
- package/coms/pivot/acme2.js +7 -4
- package/coms/pivot/left-footer.xht +25 -0
- package/coms/pivot/pedit.js +3 -3
- package/coms/pivot/plist.js +2 -2
- package/coms/pivot/qrcode.xht +3 -0
- package/coms/zimoli/XMLHttpRequest.js +2 -2
- package/coms/zimoli/container.js +34 -34
- package/coms/zimoli/design.html +6 -13
- package/coms/zimoli/design.js +49 -13
- package/coms/zimoli/design.less +62 -25
- package/coms/zimoli/drag.js +8 -3
- package/coms/zimoli/encode62.js +40 -12
- package/coms/zimoli/lattice.js +0 -1
- package/coms/zimoli/list.js +0 -8
- package/coms/zimoli/menu.js +29 -5
- package/coms/zimoli/model.js +150 -195
- package/coms/zimoli/model.less +4 -8
- package/coms/zimoli/on.js +14 -12
- package/coms/zimoli/padding.less +1 -0
- package/coms/zimoli/progbar.xht +9 -8
- package/coms/zimoli/prompt.less +0 -3
- package/coms/zimoli/render.js +210 -125
- package/coms/zimoli/select.js +9 -4
- package/coms/zimoli/select.less +3 -14
- package/coms/zimoli/selectList.js +5 -1
- package/coms/zimoli/selectList.less +3 -0
- package/coms/zimoli/table.html +7 -7
- package/coms/zimoli/table.js +12 -9
- package/coms/zimoli/table.less +5 -0
- package/coms/zimoli/user.js +2 -2
- package/coms/zimoli/view.js +3 -4
- package/coms/zimoli/watch.js +3 -1
- package/coms/zimoli/zimoli.js +6 -2
- package/coms//350/214/250/350/217/260/tab.js +26 -2
- package/coms//350/214/250/350/217/260//346/240/207/347/255/276/345/214/226.js +1 -1
- package/coms//350/214/250/350/217/260//347/274/226/350/276/221/346/241/206.xht +183 -20
- package/docs//345/267/245/345/205/267//345/233/275/351/231/205/345/214/226.xht +1 -0
- package/package.json +1 -1
- package/public/efront.js +1 -1
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
- zh-CN: 退出登录
|
|
2
|
+
en: Log Out
|
|
3
|
+
|
|
4
|
+
- zh-CN: 选择类型
|
|
5
|
+
en: Select type
|
|
6
|
+
|
|
7
|
+
- zh-CN: 已存在$1为$2的项
|
|
8
|
+
en: An item with a value of $1 to $2 already exists
|
|
9
|
+
|
|
10
|
+
- zh-CN: 展示时机
|
|
11
|
+
en: Display timing
|
|
12
|
+
|
|
13
|
+
- zh-CN: 数据配置
|
|
14
|
+
en: data configuration
|
|
15
|
+
|
|
16
|
+
- zh-CN: 权限管理
|
|
17
|
+
en: Rights Management
|
|
18
|
+
|
|
19
|
+
- zh-CN: 字段管理
|
|
20
|
+
en: Field management
|
|
21
|
+
|
|
22
|
+
- zh-CN: 动作管理
|
|
23
|
+
en: Action Management
|
|
24
|
+
|
|
1
25
|
- zh-CN: 正在联网验证,请耐心等待..
|
|
2
26
|
en: "Network verification in progress, please be patient"
|
|
3
27
|
|
package/apps/blank/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
11
11
|
<link rel="Shortcut Icon" href="http://efront.cc/favicon.ico" type="image/x-icon" />
|
|
12
12
|
<meta name="viewport" content="initial-scale=1,maximum-scale=1,width=device-width" />
|
|
13
|
-
<title>
|
|
13
|
+
<title>efront 空项目</title>
|
|
14
14
|
<script deleteoncompile efrontloader>
|
|
15
15
|
// 若要在开发环境使用内置组件,请保留此script标签中的代码,在编译发布时,这里的代码会自动删除
|
|
16
16
|
</script>
|
package/apps/index.jsp
CHANGED
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
<script serverside>
|
|
2
2
|
var fs = require("fs");
|
|
3
3
|
var path = require("path");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
4
|
+
var fsp = fs.promises;
|
|
5
|
+
if (!fsp) throw new Error('当前服务器nodejs版本过低,无法使用!');
|
|
6
|
+
var names = await fsp.readdir(__dirname, { withFileTypes: true });
|
|
7
|
+
names = names.filter(a => a.isDirectory()).map(a => a.name);
|
|
8
|
+
var indexList = context.indexList = [];
|
|
9
|
+
for (var n of names) {
|
|
10
|
+
if (fs.existsSync(path.join(__dirname, n, '主页.html'))) indexList.push([n, '主页.html']);
|
|
11
|
+
else if (fs.existsSync(path.join(__dirname, n, '主页.jsp'))) indexList.push([n, '主页.jsp']);
|
|
12
|
+
else if (fs.existsSync(path.join(__dirname, n, 'index.html'))) indexList.push([n, 'index.html']);
|
|
13
|
+
else if (fs.existsSync(path.join(__dirname, n, 'index.jsp'))) indexList.push([n, 'index.jsp']);
|
|
14
|
+
};
|
|
15
|
+
for (var o of indexList) {
|
|
16
|
+
var [p, n] = o;
|
|
17
|
+
var p = path.join(__dirname, p, n);
|
|
18
|
+
var stats = await fsp.stat(p);
|
|
19
|
+
if (!stats.isFile()) continue;
|
|
20
|
+
o.push(stats);
|
|
21
|
+
var data = await fsp.readFile(p);
|
|
22
|
+
var title = /<title>([\s\S]*?)<\/title>/i.exec(String(data));
|
|
23
|
+
if (title) o.push(title[1]);
|
|
24
|
+
}
|
|
25
|
+
// throw new Error;
|
|
15
26
|
</script>
|
|
16
27
|
<!DOCTYPE html>
|
|
17
28
|
<!--
|
|
@@ -69,58 +80,96 @@
|
|
|
69
80
|
|
|
70
81
|
a {
|
|
71
82
|
display: inline-block;
|
|
72
|
-
width:
|
|
83
|
+
width: 180px;
|
|
84
|
+
height: 60px;
|
|
85
|
+
vertical-align: top;
|
|
73
86
|
text-decoration: none;
|
|
74
87
|
line-height: 1.2;
|
|
75
88
|
margin: 0 12px 12px 0;
|
|
76
89
|
padding: 4px 6px;
|
|
77
|
-
border: 1px solid #
|
|
90
|
+
border: 1px solid #0003;
|
|
78
91
|
background: #fff9;
|
|
92
|
+
border-radius: 4px;
|
|
93
|
+
color: #16c;
|
|
94
|
+
position: relative;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
a:visited {
|
|
98
|
+
color: #36a;
|
|
79
99
|
}
|
|
80
100
|
|
|
101
|
+
|
|
81
102
|
a:hover {
|
|
82
|
-
|
|
103
|
+
color: #39c;
|
|
104
|
+
border-color: #39c;
|
|
83
105
|
}
|
|
84
106
|
|
|
107
|
+
a:active {
|
|
108
|
+
color: #c24;
|
|
109
|
+
border-color: #c24;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
85
113
|
a>[name] {
|
|
86
|
-
|
|
114
|
+
padding: 3px;
|
|
115
|
+
color: #333;
|
|
116
|
+
font-size: 14px;
|
|
117
|
+
font-family: 楷体, sans-serif;
|
|
87
118
|
}
|
|
88
119
|
|
|
89
120
|
a>[time] {
|
|
90
|
-
font-size:
|
|
121
|
+
font-size: 8px;
|
|
122
|
+
position: absolute;
|
|
123
|
+
right: 6px;
|
|
124
|
+
bottom: 4px;
|
|
91
125
|
color: #999;
|
|
92
126
|
}
|
|
93
127
|
|
|
94
|
-
a
|
|
128
|
+
a>b {
|
|
129
|
+
font-family: 'Times New Roman', Times, sans-serif;
|
|
130
|
+
font-style: italic;
|
|
131
|
+
font-size: 12px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
a:hover>b {
|
|
95
135
|
text-decoration: underline;
|
|
96
136
|
}
|
|
97
137
|
|
|
138
|
+
[npm] {
|
|
139
|
+
color: #fba;
|
|
140
|
+
text-shadow: 1px -1px 0 #c24;
|
|
141
|
+
}
|
|
142
|
+
|
|
98
143
|
[name] {
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
overflow: hidden;
|
|
146
|
+
text-overflow: ellipsis;
|
|
99
147
|
display: block;
|
|
100
148
|
}
|
|
149
|
+
|
|
150
|
+
[note] {
|
|
151
|
+
font-size: 14px;
|
|
152
|
+
font-family: 仿宋, sans-serif;
|
|
153
|
+
padding: 10px 16px 0 16px;
|
|
154
|
+
}
|
|
101
155
|
</style>
|
|
102
156
|
</head>
|
|
103
157
|
|
|
104
158
|
<body scroll=no max-render=1440>
|
|
159
|
+
<div note>选择任意项目查看,开发环境加载有些慢.. </div>
|
|
105
160
|
<div content>
|
|
106
161
|
<script serverside>
|
|
107
162
|
var rows = [];
|
|
108
163
|
var fs = require("fs");
|
|
109
164
|
var path = require("path");
|
|
110
|
-
for (var n of context.
|
|
111
|
-
|
|
112
|
-
fs.stat(path.join(__dirname, n), function (error, stats) {
|
|
113
|
-
if (error) return oh(error);
|
|
114
|
-
ok(stats);
|
|
115
|
-
})
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
rows.push(`<a href="${n}?${stats.mtime.toLocaleDateString()}" ><b name>${n}</b><span time>${stats.mtime.toLocaleDateString()}</span></a>`);
|
|
165
|
+
for (var [p, n, stats, t = p] of context.indexList) {
|
|
166
|
+
rows.push(`<a href="${p}" target=_blank><b >${p}</b><span name>${t}</span><span time>${stats.mtime.toLocaleDateString()}</span></a>`);
|
|
119
167
|
}
|
|
120
168
|
return rows.join('')
|
|
121
169
|
</script>
|
|
122
170
|
<a href="https://www.npmjs.com/package/efront" target="_blank">
|
|
123
|
-
<b
|
|
171
|
+
<b npm>npm</b>
|
|
172
|
+
<span name>efront</span>
|
|
124
173
|
<span time> </span>
|
|
125
174
|
</a>
|
|
126
175
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script serverside>
|
|
2
2
|
var time = +new Date;
|
|
3
|
-
var out_trade_no = encode62.
|
|
3
|
+
var out_trade_no = encode62.packdecode(request.id);
|
|
4
4
|
var payed = /^(TRADE_FINISHED|TRADE_SUCCESS)$/i;
|
|
5
5
|
for (var cx = 0, dx = 10; cx < dx; cx++) {
|
|
6
6
|
if (+new Date - time > 30000) return;
|
package/apps/pay/alipay.jsp
CHANGED
|
@@ -51,7 +51,7 @@ ACQ.MERCHANT_PERM_RECEIPT_DAY_LIMIT 超过单日累计收款额度 联系支付
|
|
|
51
51
|
return a;
|
|
52
52
|
}
|
|
53
53
|
var amount = request.id;
|
|
54
|
-
if (!/^(\d+)(\.\d+)?$/.test(amount)) amount = encode62.
|
|
54
|
+
if (!/^(\d+)(\.\d+)?$/.test(amount)) amount = encode62.packdecode(request.id);
|
|
55
55
|
var [amount, subject = '网页扫码支付'] = amount.split(',');
|
|
56
56
|
var trade_no = createId();
|
|
57
57
|
if (!+amount) return forbidden("参数异常");
|
package/apps/pivot/auth/login.js
CHANGED
|
@@ -28,9 +28,9 @@ function main(host) {
|
|
|
28
28
|
var api = Object.assign({}, await data.getApi("login"));
|
|
29
29
|
api.base = base;
|
|
30
30
|
var info = await data.from(api, {
|
|
31
|
-
a: encode62.
|
|
31
|
+
a: encode62.packencode(encode62.geta(password))
|
|
32
32
|
}).loading_promise;
|
|
33
|
-
info = encode62.
|
|
33
|
+
info = encode62.packupdate(info);
|
|
34
34
|
data.setSource(base, info);
|
|
35
35
|
if (host) {
|
|
36
36
|
cast(page, 'login', info);
|
package/apps/pivot/cert/main.xht
CHANGED
|
@@ -100,9 +100,7 @@
|
|
|
100
100
|
var finished = false;
|
|
101
101
|
var publicKey, privateKey;
|
|
102
102
|
loadUnique().then(render.digest).then(lazy(async function () {
|
|
103
|
-
|
|
104
|
-
bar.reshape();
|
|
105
|
-
var certlist = await plist.load('cert');
|
|
103
|
+
var certlist = await plist.load('cert', 'hostname');
|
|
106
104
|
acme2.domain = formdata.domain = certlist.map(c => c.hostname).join("\r\n");
|
|
107
105
|
}));
|
|
108
106
|
var a = button;
|
|
@@ -131,13 +129,20 @@
|
|
|
131
129
|
fields: refilm`
|
|
132
130
|
$公钥/public_key/单击生成 ${function (elem) {
|
|
133
131
|
var { data, field } = elem;
|
|
134
|
-
elem.innerHTML = `<a @click="gen()" -if="!data[field.key]">单击生成</a><span -else -bind="data[field.key]"></span>`;
|
|
132
|
+
elem.innerHTML = `<a @click=ipt()>手动输入</a>  <a @click="gen()" -if="!data[field.key]">单击生成</a><span -else -bind="data[field.key]"></span>`;
|
|
135
133
|
render(elem, {
|
|
136
134
|
data, field, async gen() {
|
|
137
135
|
await acme2.initUnique();
|
|
138
136
|
formdata.public_key = acme2.public_key;
|
|
139
137
|
await saveUnique();
|
|
140
|
-
}
|
|
138
|
+
},
|
|
139
|
+
async ipt() {
|
|
140
|
+
var data = await prompt('请输入完整密钥对,以英文逗号分割', {
|
|
141
|
+
value: acme2.pickUnique()
|
|
142
|
+
});
|
|
143
|
+
acme2.makeUnique(data);
|
|
144
|
+
console.log(data);
|
|
145
|
+
},
|
|
141
146
|
})
|
|
142
147
|
}}
|
|
143
148
|
*邮箱/email email
|
|
@@ -151,6 +156,14 @@
|
|
|
151
156
|
get message() {
|
|
152
157
|
return formdata.kid ? i18n`已创建账户` : '';
|
|
153
158
|
},
|
|
159
|
+
options: {
|
|
160
|
+
async 检查账户(actived) {
|
|
161
|
+
var params = submit(actived.fields, formdata);
|
|
162
|
+
await saveUnique(params);
|
|
163
|
+
formdata.kid = await acme2.getAccount(params);
|
|
164
|
+
await saveUnique();
|
|
165
|
+
},
|
|
166
|
+
},
|
|
154
167
|
actions: {
|
|
155
168
|
async 创建账户(actived) {
|
|
156
169
|
if (formdata.kid) {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
[field=method] {
|
|
3
|
+
jscode {
|
|
4
|
+
height: 160px;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
</style>
|
|
8
|
+
<div head>编辑动作</div>
|
|
9
|
+
<div body>
|
|
10
|
+
<field -repeat="f in fields" -src="[f,o]"></field>
|
|
11
|
+
</div>
|
|
12
|
+
<div foot>
|
|
13
|
+
<button @click="cancel" .white>取消</button>
|
|
14
|
+
<button @click="save">确定</button>
|
|
15
|
+
</div>
|
|
16
|
+
<script>
|
|
17
|
+
var [db, a] = arguments[0];
|
|
18
|
+
var o = Object.assign({}, a);
|
|
19
|
+
view(this);
|
|
20
|
+
var code = function (elem) {
|
|
21
|
+
var elem = document.createElement('jscode');
|
|
22
|
+
elem.type = 'js';
|
|
23
|
+
elem.contentEditable = true;
|
|
24
|
+
茨菰$编辑框(elem);
|
|
25
|
+
return elem;
|
|
26
|
+
};
|
|
27
|
+
var actionsExist = db.actions?.filter(o => o !== a) || [];
|
|
28
|
+
actionsExist.push.apply(actionsExist, db.fields);
|
|
29
|
+
var fields = refilm`
|
|
30
|
+
*键名/key input ^${actionsExist}
|
|
31
|
+
显示名/name input ^${actionsExist}
|
|
32
|
+
展示时机/when ${code}
|
|
33
|
+
动作/method ${code}
|
|
34
|
+
备注/disc text
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
var box = this;
|
|
38
|
+
var save = function () {
|
|
39
|
+
var b = submit(fields, o);
|
|
40
|
+
var actions = db.actions;
|
|
41
|
+
if (!actions) actions = db.actions = [];
|
|
42
|
+
if (!a) actions.push(b);
|
|
43
|
+
else Object.assign(a, b);
|
|
44
|
+
remove(box);
|
|
45
|
+
};
|
|
46
|
+
resize.on(this);
|
|
47
|
+
var cancel = function () {
|
|
48
|
+
remove(box);
|
|
49
|
+
}
|
|
50
|
+
once('mounted')(this, function () {
|
|
51
|
+
drag.on(this, this.children[0]);
|
|
52
|
+
});
|
|
53
|
+
</script>
|
package/apps/pivot/db/config.xht
CHANGED
|
@@ -4,40 +4,80 @@
|
|
|
4
4
|
height: 100%;
|
|
5
5
|
display: block;
|
|
6
6
|
position: relative;
|
|
7
|
-
padding-right: 0 !important;
|
|
8
7
|
overflow: hidden;
|
|
8
|
+
border-right: 10px solid transparent;
|
|
9
|
+
padding-right: 0 !important;
|
|
10
|
+
background: #f2f4f6;
|
|
9
11
|
}
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
13
|
+
>[head] {
|
|
14
|
+
background: #fff;
|
|
15
|
+
}
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
design {
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
btn {
|
|
22
|
+
padding: 0 20px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[act] {
|
|
26
|
+
display: block;
|
|
27
|
+
border-radius: 6px;
|
|
28
|
+
border: 1px solid #999;
|
|
29
|
+
padding: 4px 10px;
|
|
30
|
+
height: 60px;
|
|
31
|
+
[a-key] {
|
|
32
|
+
font-family: 20px;
|
|
33
|
+
font-style: italic;
|
|
21
34
|
}
|
|
22
35
|
}
|
|
23
36
|
</style>
|
|
24
|
-
|
|
25
|
-
<div head>
|
|
26
|
-
数据配置 - <span -bind="db.name"></span>
|
|
27
|
-
</div>
|
|
37
|
+
<xmenu tag head -src="m in menus"></xmenu>
|
|
28
38
|
<div body>
|
|
29
|
-
<
|
|
39
|
+
<div config -if="menus[0].actived">
|
|
40
|
+
<field -repeat="f in fields" -src="[f,db]"></field>
|
|
41
|
+
</div>
|
|
42
|
+
<design fields -if="menus[1].actived" _avoid="db.actions" -src="db.fields"></design>
|
|
43
|
+
<lattice actions -src="a in db.actions" -if="menus[2].actived">
|
|
44
|
+
<padding>
|
|
45
|
+
<div act @click="editAction(a)">
|
|
46
|
+
<div a.key?></div>
|
|
47
|
+
<div a.name?></div>
|
|
48
|
+
</div>
|
|
49
|
+
</padding>
|
|
50
|
+
<a insert @click="editAction(null)">添加动作</a>
|
|
51
|
+
</lattice>
|
|
30
52
|
</div>
|
|
31
53
|
<div foot>
|
|
32
|
-
<
|
|
54
|
+
<div style="float: left;">
|
|
55
|
+
${i18n`数据配置`} - <span -bind="db.name"></span>
|
|
56
|
+
</div>
|
|
57
|
+
<button @click="save">${i18n`保存`}</button>
|
|
33
58
|
</div>
|
|
34
59
|
<script>
|
|
60
|
+
view(this);
|
|
61
|
+
var xmenu = menu;
|
|
62
|
+
var btn = button;
|
|
63
|
+
var a = button;
|
|
64
|
+
var menus = refilm`
|
|
65
|
+
权限管理
|
|
66
|
+
字段管理
|
|
67
|
+
动作管理
|
|
68
|
+
`;
|
|
35
69
|
var fields = refilm`
|
|
36
70
|
是否公开/open swap`;
|
|
37
71
|
var [db] = arguments;
|
|
72
|
+
if (!db.fields) {
|
|
73
|
+
var [da1] = await data.from('dbfind', { dbid: db.name, size: 1 });
|
|
74
|
+
db.fields = da1 ? Object.keys(da1).map(k => ({ key: k })) : [];
|
|
75
|
+
}
|
|
76
|
+
var editAction = function (a) {
|
|
77
|
+
popup('#/db/act', [db, a]);
|
|
78
|
+
};
|
|
38
79
|
var save = async function () {
|
|
39
80
|
await data.from('dbset', db);
|
|
40
81
|
history.back();
|
|
41
82
|
};
|
|
42
|
-
console.log(db)
|
|
43
83
|
</script>
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
<div>
|
|
2
|
-
已登录到服务器,您可以进行如下操作
|
|
3
|
-
</div>
|
|
4
1
|
<block>
|
|
5
|
-
<padding>
|
|
6
|
-
清理服务器缓存 <btn @click="run('clear-cache',this)">清理</btn>
|
|
7
|
-
</padding>
|
|
8
2
|
</block>
|
|
9
3
|
<block>
|
|
10
4
|
<padding>
|
|
11
|
-
|
|
5
|
+
服务器版本 <span -text="String(version)"></span>
|
|
6
|
+
</padding>
|
|
7
|
+
<padding>
|
|
8
|
+
nodejs版本 <span -text="String(nodeVersion)"></span>
|
|
12
9
|
</padding>
|
|
13
|
-
</block>
|
|
14
|
-
<block>
|
|
15
10
|
<padding>
|
|
16
|
-
|
|
11
|
+
操作系统 <span -text="String(platform)"></span>
|
|
12
|
+
</padding>
|
|
13
|
+
<padding>
|
|
14
|
+
处理器 <span -text="String(arch)"></span>
|
|
17
15
|
</padding>
|
|
18
16
|
</block>
|
|
19
17
|
<block>
|
|
20
18
|
<padding>
|
|
21
|
-
|
|
19
|
+
清理服务器缓存 <btn @click="run('clear-cache',this)">清理</btn>
|
|
20
|
+
</padding>
|
|
21
|
+
<padding>
|
|
22
|
+
重启服务器 <btn @click="run('rehost',this)" confirm type="danger">重启</btn>
|
|
22
23
|
</padding>
|
|
23
24
|
</block>
|
|
24
25
|
<block>
|
|
25
26
|
<padding>
|
|
26
27
|
启动时间 <span -text="filterTime(hrtime)"></span>
|
|
27
28
|
</padding>
|
|
28
|
-
</block>
|
|
29
|
-
<block>
|
|
30
29
|
<padding>
|
|
31
30
|
内存 <progbar danger:="memery[0]/memery[1]<.05" :current="memeryUsed" :total="memery[1]"></progbar>
|
|
32
31
|
<span style="color: #999;">
|
|
@@ -8,6 +8,9 @@ function main() {
|
|
|
8
8
|
filterTime,
|
|
9
9
|
memeryUsed: 0,
|
|
10
10
|
memery: [0, 1],
|
|
11
|
+
platform: '未知',
|
|
12
|
+
arch: '未知',
|
|
13
|
+
nodeVersion: "未知",
|
|
11
14
|
size,
|
|
12
15
|
progbar,
|
|
13
16
|
async run(id) {
|
|
@@ -16,12 +19,6 @@ function main() {
|
|
|
16
19
|
run: id
|
|
17
20
|
}).loading_promise;
|
|
18
21
|
if (info) alert(info, 'pass');
|
|
19
|
-
},
|
|
20
|
-
async logout() {
|
|
21
|
-
data.setSource({});
|
|
22
|
-
await user.Logout();
|
|
23
|
-
zimoli.switch();
|
|
24
|
-
zimoli();
|
|
25
22
|
}
|
|
26
23
|
};
|
|
27
24
|
renderWithDefaults(page, scope);
|
|
@@ -29,6 +26,9 @@ function main() {
|
|
|
29
26
|
var [mr, mt] = a.memery;
|
|
30
27
|
scope.memeryUsed = mt - mr;
|
|
31
28
|
scope.memery = a.memery;
|
|
29
|
+
scope.nodeVersion = a.nodeVersion;
|
|
30
|
+
scope.platform = a.platform;
|
|
31
|
+
scope.arch = a.arch;
|
|
32
32
|
console.log('status')
|
|
33
33
|
});
|
|
34
34
|
return page;
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
&{
|
|
1
|
+
& {
|
|
2
2
|
line-height: 28px;
|
|
3
3
|
}
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
progbar {
|
|
5
6
|
width: 120px;
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
+
|
|
9
|
+
btn {
|
|
8
10
|
padding: 0 16px;
|
|
9
11
|
vertical-align: top;
|
|
10
12
|
margin-left: 20px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
padding {
|
|
16
|
+
>span {
|
|
17
|
+
color: #999;
|
|
18
|
+
margin-right: 10px;
|
|
19
|
+
}
|
|
11
20
|
}
|
package/apps/pivot/link/room.js
CHANGED
|
@@ -3,7 +3,7 @@ plist.bind(null, '房间', "room", refilm`
|
|
|
3
3
|
/ $ ${[{
|
|
4
4
|
name: "连接",
|
|
5
5
|
async do(o) {
|
|
6
|
-
var linkid = await data.from("room", { id: encode62.
|
|
6
|
+
var linkid = await data.from("room", { id: encode62.packencode(o.name) });
|
|
7
7
|
popup("/link/chat", { linkid, name: o.name });
|
|
8
8
|
}
|
|
9
9
|
}]}
|
package/apps/pivot/main.js
CHANGED
|
@@ -65,14 +65,15 @@ setInterval(function () {
|
|
|
65
65
|
if (!base.base) return user.token = null;
|
|
66
66
|
var auth = data.getSource(base.base);
|
|
67
67
|
if (!auth) return user.token = null;
|
|
68
|
-
var auth1 = encode62.
|
|
68
|
+
var auth1 = encode62.packupdate(auth);
|
|
69
69
|
if (auth1 !== auth) data.setSource(base.base, auth1);
|
|
70
70
|
user.token = auth1;
|
|
71
71
|
}, 2000);
|
|
72
72
|
login();
|
|
73
73
|
var layer = layer$glance({
|
|
74
74
|
left: frame$left.bind({
|
|
75
|
-
head: await init("left-header")
|
|
75
|
+
head: await init("left-header"),
|
|
76
|
+
foot: await init('left-footer')
|
|
76
77
|
}),
|
|
77
78
|
top: frame$top
|
|
78
79
|
});
|
|
@@ -4,7 +4,7 @@ function main(a) {
|
|
|
4
4
|
drag.on(page.firstChild, page);
|
|
5
5
|
resize.on(page);
|
|
6
6
|
var fields = data.from("params", { key: a.key }, function (a) {
|
|
7
|
-
return a ? JSON.parse(encode62.
|
|
7
|
+
return a ? JSON.parse(encode62.packdecode(a)) : [];
|
|
8
8
|
});
|
|
9
9
|
var taskid = 0;
|
|
10
10
|
renderWithDefaults(page, {
|
|
@@ -23,8 +23,8 @@ function main(a) {
|
|
|
23
23
|
this.error = false;
|
|
24
24
|
var params = JSON.stringify(this.data);
|
|
25
25
|
try {
|
|
26
|
-
var res = await data.from("invoke", { key: a.key, params: encode62.
|
|
27
|
-
return a ? encode62.
|
|
26
|
+
var res = await data.from("invoke", { key: a.key, params: encode62.packencode(params) }, function (a) {
|
|
27
|
+
return a ? encode62.packdecode(a) : '完成!';
|
|
28
28
|
});
|
|
29
29
|
if (id !== taskid) return;
|
|
30
30
|
this.output = res;
|
package/apps/pivot/task/rsync.js
CHANGED
|
@@ -24,8 +24,8 @@ function main(task) {
|
|
|
24
24
|
cross.addDirect(api.base);
|
|
25
25
|
await data.from(api, {
|
|
26
26
|
type: "task",
|
|
27
|
-
key: encode62.
|
|
28
|
-
value: encode62.
|
|
27
|
+
key: encode62.packencode(task.key),
|
|
28
|
+
value: encode62.packencode(JSON.stringify(task))
|
|
29
29
|
});
|
|
30
30
|
finished[h.key] = true;
|
|
31
31
|
}
|
package/apps/pivot/wow/root.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var fields = refilm`
|
|
2
2
|
文件
|
|
3
3
|
`;
|
|
4
|
-
var passport = encode62.
|
|
4
|
+
var passport = encode62.packencode(encode62.decode62(user._passport, user.session));
|
|
5
5
|
var pending = [];
|
|
6
6
|
async function upload(f, dist, token) {
|
|
7
7
|
var api = await data.getApi("upload");
|
|
@@ -94,7 +94,7 @@ function main(path) {
|
|
|
94
94
|
var p = this.pathlist.join('/').replace(/^\/+|\/+$/g, '');
|
|
95
95
|
var bp = p ? base + p + "/" : base;
|
|
96
96
|
p = p + '/';
|
|
97
|
-
return data.from("folder", { opt: 'list', path: encode62.
|
|
97
|
+
return data.from("folder", { opt: 'list', path: encode62.packencode(p) }, files => {
|
|
98
98
|
if (files) return files.map(f => {
|
|
99
99
|
var file = new File(f);
|
|
100
100
|
file.host = base;
|
|
@@ -112,22 +112,22 @@ function main(path) {
|
|
|
112
112
|
},
|
|
113
113
|
upload,
|
|
114
114
|
async delete(path) {
|
|
115
|
-
return data.from("folder", { opt: 'del', path: encode62.
|
|
115
|
+
return data.from("folder", { opt: 'del', path: encode62.packencode(path) })
|
|
116
116
|
},
|
|
117
117
|
async rename(from, to) {
|
|
118
|
-
from = encode62.
|
|
119
|
-
to = encode62.
|
|
118
|
+
from = encode62.packencode(from);
|
|
119
|
+
to = encode62.packencode(to);
|
|
120
120
|
await data.from("folder", { opt: 'mov', path: from, to }).loading_promise;
|
|
121
121
|
},
|
|
122
122
|
async add(name) {
|
|
123
|
-
name = encode62.
|
|
123
|
+
name = encode62.packencode(name);
|
|
124
124
|
await data.from("folder", { opt: 'add', path: name }).loading_promise;
|
|
125
125
|
},
|
|
126
126
|
async mov(from, distpath) {
|
|
127
127
|
var currentHost = data.getInstance("base").base;
|
|
128
128
|
if (from.host !== currentHost) return alert("暂不支持跨服务器操作!");
|
|
129
|
-
from = encode62.
|
|
130
|
-
distpath = encode62.
|
|
129
|
+
from = encode62.packencode(from.fullpath);
|
|
130
|
+
distpath = encode62.packencode(distpath);
|
|
131
131
|
await data.from("folder", { opt: 'mov', path: from, to: distpath }).loading_promise;
|
|
132
132
|
}
|
|
133
133
|
});
|