efront 3.3.6 → 3.4.1
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/apps/pivot/api.yml +3 -0
- package/apps/pivot/auth/login.html +9 -0
- package/apps/pivot/auth/login.js +30 -0
- package/apps/pivot/auth/login.less +11 -0
- package/apps/pivot/home/short.html +1 -0
- package/apps/pivot/home/short.js +5 -0
- package/apps/pivot/home/short.less +1 -0
- package/apps/pivot/home/welcome.html +14 -0
- package/apps/pivot/home/welcome.js +24 -0
- package/apps/pivot/home/welcome.less +8 -0
- package/apps/pivot/index.html +41 -0
- package/apps/pivot/main.js +18 -0
- package/apps/pivot/menu.yml +3 -0
- package/apps/zimoli/book/main.js +1 -1
- package/apps/zimoli/broadcast/main.js +1 -1
- package/apps/zimoli/index.html +1 -0
- package/apps/zimoli/main.js +1 -1
- package/apps/zimoli/nearby/main.js +1 -1
- package/apps/zimoli/yuanfen/main.js +1 -1
- package/coms/basic/crypt.js +1 -1
- package/coms/basic/loader.js +1 -1
- package/coms/basic/refilm_decode.js +13 -2
- package/coms/basic/valid.js +10 -0
- package/coms/compile/common.js +451 -0
- package/coms/compile/scanner2.js +8 -405
- package/coms/crypt/encode62.js +23 -33
- package/coms/crypt/encode62_test.js +2 -1
- package/coms/frame/left.html +11 -6
- package/coms/frame/left.js +6 -3
- package/coms/frame/left.less +38 -36
- package/coms/frame/main.js +1 -1
- package/coms/frame/route.js +52 -4
- package/coms/frame/top.less +12 -13
- package/coms/kugou/buildList.js +1 -0
- package/coms/kugou/player.js +3 -0
- package/coms/layer/glance.less +4 -2
- package/coms/zimoli/alert.js +8 -4
- package/coms/zimoli/avatar.js +0 -1
- package/coms/zimoli/checker.html +1 -1
- package/coms/zimoli/checker.less +8 -13
- package/coms/zimoli/cross.js +1 -1
- package/coms/zimoli/css.js +1 -0
- package/coms/zimoli/data.js +8 -3
- package/coms/zimoli/encode62.js +13 -0
- package/coms/zimoli/field.html +2 -0
- package/coms/zimoli/field.js +41 -17
- package/coms/zimoli/field.less +19 -0
- package/coms/zimoli/form.js +8 -0
- package/coms/zimoli/menu.js +11 -1
- package/coms/zimoli/menu.less +1 -1
- package/coms/zimoli/menuItem.js +4 -1
- package/coms/zimoli/model.js +1 -0
- package/coms/zimoli/radio.html +1 -3
- package/coms/zimoli/radio.less +10 -22
- package/coms/zimoli/render.js +34 -63
- package/coms/zimoli/renderDefaults.js +1 -0
- package/coms/zimoli/submit.js +41 -0
- package/coms/zimoli/view.js +0 -5
- package/coms/zimoli/view.less +17 -11
- package/coms/zimoli/zimoli.js +11 -9
- package/data/mime.json +3 -0
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/coms/zimoli/beian.html +0 -1
- package/coms/zimoli/beian.js +0 -5
- package/coms/zimoli/beian.less +0 -13
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var fields = refilm`
|
|
2
|
+
密码/password* password
|
|
3
|
+
`;
|
|
4
|
+
|
|
5
|
+
function main() {
|
|
6
|
+
var page = view();
|
|
7
|
+
page.innerHTML = login;
|
|
8
|
+
drag.on(page);
|
|
9
|
+
on("append")(page, function () {
|
|
10
|
+
move.bindPosition(page, [.5, .5]);
|
|
11
|
+
});
|
|
12
|
+
renderWithDefaults(page, { fields, data: {}, pending: false });
|
|
13
|
+
on("submit")(page, async function () {
|
|
14
|
+
var { password } = submit(fields, this.$scope.data);
|
|
15
|
+
this.$scope.pending = true;
|
|
16
|
+
page.disabled = true;
|
|
17
|
+
try {
|
|
18
|
+
var info = await data.from("login", {
|
|
19
|
+
a: encode62.timeencode(encode62.geta(password))
|
|
20
|
+
}).loading_promise;
|
|
21
|
+
info = encode62.timeupdate(info);
|
|
22
|
+
data.setSource({ authorization: info });
|
|
23
|
+
user.login({})
|
|
24
|
+
go('/main')
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
this.$scope.pending = false;
|
|
28
|
+
})
|
|
29
|
+
return page;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div>短链接管理,敬请期待</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
&{}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
function main() {
|
|
2
|
+
var page = div();
|
|
3
|
+
page.innerHTML = template;
|
|
4
|
+
renderWithDefaults(page, {
|
|
5
|
+
status: [],
|
|
6
|
+
async run(id, target) {
|
|
7
|
+
target.setAttribute('pending', '')
|
|
8
|
+
try {
|
|
9
|
+
var info = await data.from("run", {
|
|
10
|
+
run: id
|
|
11
|
+
}).loading_promise;
|
|
12
|
+
if (info) alert(info, 'pass');
|
|
13
|
+
} catch { }
|
|
14
|
+
target.removeAttribute('pending');
|
|
15
|
+
},
|
|
16
|
+
logout() {
|
|
17
|
+
data.setSource('authorization', null);
|
|
18
|
+
user.logout();
|
|
19
|
+
location.reload();
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
console.log(page)
|
|
23
|
+
return page;
|
|
24
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<!--
|
|
3
|
+
http://efront.cc
|
|
4
|
+
-->
|
|
5
|
+
<html lang="zh-CN">
|
|
6
|
+
|
|
7
|
+
<head>
|
|
8
|
+
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
|
9
|
+
<meta charset="utf-8" />
|
|
10
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
11
|
+
<link rel="Shortcut Icon" href="/favicon.ico" type="image/x-icon" />
|
|
12
|
+
<meta name="viewport" content="initial-scale=1,maximum-scale=1,width=device-width" />
|
|
13
|
+
<title>Efront 服务器管控平台</title>
|
|
14
|
+
<script deleteoncompile efrontloader>
|
|
15
|
+
// 若要在开发环境使用内置组件,请保留此script标签中的代码,在编译发布时,这里的代码会自动删除
|
|
16
|
+
</script>
|
|
17
|
+
<style>
|
|
18
|
+
html {
|
|
19
|
+
height: 100%;
|
|
20
|
+
font-family: "SF Pro SC", "SF Pro Text", "SF Pro Icons", "PingFang SC", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
*,
|
|
24
|
+
::before,
|
|
25
|
+
::after {
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
body {
|
|
30
|
+
border: none;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
height: 100%;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
37
|
+
</head>
|
|
38
|
+
|
|
39
|
+
<body scroll=no menu="menu.yml"></body>
|
|
40
|
+
|
|
41
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
data.loadConfig("api.yml");
|
|
2
|
+
user.loginPath = '/auth/login';
|
|
3
|
+
// user.token = data.getSource('authorization');
|
|
4
|
+
setInterval(function () {
|
|
5
|
+
var auth = data.getSource('authorization');
|
|
6
|
+
if (!auth) return;
|
|
7
|
+
var auth1 = encode62.timeupdate(auth);
|
|
8
|
+
if (auth1 !== auth) data.setSource("authorization", auth1);
|
|
9
|
+
user.token = auth1;
|
|
10
|
+
}, 2000);
|
|
11
|
+
login();
|
|
12
|
+
var layer = layer$glance({
|
|
13
|
+
left: "frame$left",
|
|
14
|
+
top: 'frame$top'
|
|
15
|
+
});
|
|
16
|
+
function main() {
|
|
17
|
+
return layer;
|
|
18
|
+
}
|
package/apps/zimoli/book/main.js
CHANGED
package/apps/zimoli/index.html
CHANGED
package/apps/zimoli/main.js
CHANGED
|
@@ -8,7 +8,7 @@ css(qq_icon, "width:28px;height:28px;margin:-14px;top:50%;left:50%;position:abso
|
|
|
8
8
|
css(loginBtn, "display:inline-block;position:absolute;right:0;top:0;height:100%;width:60px;background-color:transparent");
|
|
9
9
|
var tbar = titlebar("EFRONT.cc", [loginBtn], false);
|
|
10
10
|
css(tbar,"text-align:left;padding-left:20px;")
|
|
11
|
-
var page = createElement(div,
|
|
11
|
+
var page = createElement(div, tbar, slider());
|
|
12
12
|
css(page, "font-size:40px;color:#fff;padding-top:50px;");
|
|
13
13
|
|
|
14
14
|
var group_sample = createElement(div);
|
package/coms/basic/crypt.js
CHANGED
package/coms/basic/loader.js
CHANGED
|
@@ -313,7 +313,7 @@ var loadModule = function (name, then, prebuilds = {}) {
|
|
|
313
313
|
readFile(name, saveModule);
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
|
-
var toRem = text => pixelDecoder && typeof text === 'string' ? text.replace(/(\:\s*)?\b((?:\d*\.)?\d+)px(\s*\))?/ig, (m, h, d, quote) => (h || "") + (d !== '1' ? h && quote ? renderPixelRatio * d + "pt" : pixelDecoder(d) : renderPixelRatio > 1 ? ".
|
|
316
|
+
var toRem = text => pixelDecoder && typeof text === 'string' ? text.replace(/(\:\s*)?\b((?:\d*\.)?\d+)px(\s*\))?/ig, (m, h, d, quote) => (h || "") + (d !== '1' ? h && quote ? renderPixelRatio * d + "pt" : pixelDecoder(d) : renderPixelRatio > 1 ? ".78pt" : 0.78 / devicePixelRatio + "pt") + (quote || "")) : text;
|
|
317
317
|
if (document.head) var efrontsign = document.head.lastElementChild.attributes[0];
|
|
318
318
|
if (efrontsign && /^compiledinfo\-/.test(efrontsign.name)) efrontsign = efrontsign.name.slice(efrontsign.name.indexOf('-') + 1);
|
|
319
319
|
else efrontsign = '';
|
|
@@ -260,8 +260,16 @@ function parse(piece) {
|
|
|
260
260
|
}
|
|
261
261
|
var [name, type, options] = piece, key, repeat;
|
|
262
262
|
if (piece.length === 1 && isObject(name)) {
|
|
263
|
-
var { name, needs, type, key, size, unit, endwith, ratio, value, repeat, comment, options } = name;
|
|
263
|
+
var { name, needs, required, checks, type, key, size, unit, endwith, ratio, value, repeat, comment, options } = name;
|
|
264
264
|
} else {
|
|
265
|
+
var is_require = a => {
|
|
266
|
+
if (/^\*|\*$/.test(a)) {
|
|
267
|
+
required = true;
|
|
268
|
+
return a.replace(/^\*|\*$/, '');
|
|
269
|
+
}
|
|
270
|
+
return a;
|
|
271
|
+
};
|
|
272
|
+
type = is_require(type);
|
|
265
273
|
if (typeof name === 'string') {
|
|
266
274
|
if (!isContainer) {
|
|
267
275
|
if (!type) {
|
|
@@ -362,14 +370,17 @@ function parse(piece) {
|
|
|
362
370
|
type = type.slice(1);
|
|
363
371
|
}
|
|
364
372
|
if (typeof options === "string") {
|
|
373
|
+
options = is_require(options);
|
|
365
374
|
var needUnfold = /^\[|\]$/.test(options);
|
|
366
375
|
options = options.replace(/^\[|\]$/g, '');
|
|
367
376
|
if (/,/.test(options)) options = scanSlant(options, ',');
|
|
368
377
|
else options = scanSlant(options, "");
|
|
369
378
|
if (needUnfold) unfoldOptions(size, options);
|
|
370
379
|
}
|
|
380
|
+
name = is_require(name);
|
|
381
|
+
key = is_require(key);
|
|
371
382
|
}
|
|
372
|
-
var field = { name, needs, type, key, size, unit, endwith, ratio, value, repeat, comment, options };
|
|
383
|
+
var field = { name, checks, required, needs, type, key, size, unit, endwith, ratio, value, repeat, comment, options };
|
|
373
384
|
var parent = piecepath[piecepath.length - 1];
|
|
374
385
|
if (parent) {
|
|
375
386
|
field.parent = parent;
|