efront 3.13.3 → 3.13.4
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/menu.yml +1 -1
- package/apps/pivot/proxy/edit.js +1 -0
- package/apps/pivot/proxy/list.js +12 -0
- package/coms/basic/encodePack.js +2 -9
- package/coms/zimoli/cross.js +2 -3
- package/coms/zimoli/data.js +4 -2
- package/coms/zimoli/model.js +1 -0
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/apps/pivot/home/short.html +0 -1
- package/apps/pivot/home/short.js +0 -5
- package/apps/pivot/home/short.less +0 -1
package/apps/pivot/menu.yml
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pedit.bind(null, "短链接", "proxy");
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var fields = refilm`
|
|
2
|
+
*代理路径/url input/20
|
|
3
|
+
真实路径/realpath url/2000
|
|
4
|
+
/ - ${[{
|
|
5
|
+
name: "访问",
|
|
6
|
+
do(o) {
|
|
7
|
+
var url = o.url;
|
|
8
|
+
if (!/^\//.test(url)) url = "/" + url;
|
|
9
|
+
window.open(url,null);
|
|
10
|
+
}
|
|
11
|
+
}]}`;
|
|
12
|
+
return plist.bind(null, '短链接', "proxy", fields, "/proxy/edit");
|
package/coms/basic/encodePack.js
CHANGED
|
@@ -277,27 +277,20 @@ function pack2(buff) {
|
|
|
277
277
|
var result = [];
|
|
278
278
|
for (var cx = 0, dx = buff.length, bx = 32 * 1024 * 1024; cx < dx; cx += bx) {
|
|
279
279
|
var b = buff.slice(cx, cx + bx);
|
|
280
|
-
var
|
|
281
|
-
l = encodeRange(l);
|
|
282
|
-
p = encodeRange(p);
|
|
280
|
+
var b = scan(b);
|
|
283
281
|
var e = encodeRange(b);
|
|
284
282
|
var el = int(e.length);
|
|
285
283
|
result.push(concatTypedArray([
|
|
286
284
|
[
|
|
287
285
|
range_compress,
|
|
288
286
|
other_compress << 5 | el.length,
|
|
289
|
-
l.length >> 8,
|
|
290
|
-
l.length & 0xff,
|
|
291
|
-
p.length >> 8,
|
|
292
|
-
p.length & 0xff
|
|
293
287
|
],
|
|
294
|
-
el,
|
|
288
|
+
el, e]));
|
|
295
289
|
}
|
|
296
290
|
result = concatTypedArray(result);
|
|
297
291
|
return pack0(buff, result);
|
|
298
292
|
}
|
|
299
293
|
module.exports = function (buff, type) {
|
|
300
|
-
type = 1;
|
|
301
294
|
switch (type) {
|
|
302
295
|
case 1:
|
|
303
296
|
return pack(buff);
|
package/coms/zimoli/cross.js
CHANGED
|
@@ -17,9 +17,9 @@ if (cookiesData) {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
var digest = function () {
|
|
20
|
+
var digest = lazy(function () {
|
|
21
21
|
dispatch('render', window);
|
|
22
|
-
};
|
|
22
|
+
}, 0);
|
|
23
23
|
|
|
24
24
|
var cross = cross_.bind(function (callback, onerror) {
|
|
25
25
|
var xhr = new XMLHttpRequest;
|
|
@@ -32,7 +32,6 @@ var cross = cross_.bind(function (callback, onerror) {
|
|
|
32
32
|
|
|
33
33
|
xhr.onreadystatechange = function () {
|
|
34
34
|
if (xhr.readyState === 4) {
|
|
35
|
-
dispatch(window, 'render');
|
|
36
35
|
switch (xhr.status) {
|
|
37
36
|
case 0:
|
|
38
37
|
if (!navigator.onLine) {
|
package/coms/zimoli/data.js
CHANGED
|
@@ -569,8 +569,10 @@ var privates = {
|
|
|
569
569
|
headers = seekFromSource(headers, api.base);
|
|
570
570
|
}
|
|
571
571
|
cross(realmethod, uri, headers).send(params).done(e => {
|
|
572
|
+
updateLoadingCount();
|
|
572
573
|
ok(e.response || e.responseText);
|
|
573
574
|
}).error(xhr => {
|
|
575
|
+
updateLoadingCount();
|
|
574
576
|
try {
|
|
575
577
|
var e = getErrorMessage(parseData(xhr.response || xhr.responseText || xhr.statusText || xhr.status));
|
|
576
578
|
oh({ status: xhr.status, api, params: params1, error: e, toString: getErrorMessage })
|
|
@@ -643,7 +645,6 @@ function responseCrash(e, data) {
|
|
|
643
645
|
data.error = e;
|
|
644
646
|
}
|
|
645
647
|
error_report(e, e.status < 500 ? 'warn' : 'error');
|
|
646
|
-
updateLoadingCount();
|
|
647
648
|
}
|
|
648
649
|
var getData = function () { return this.data };
|
|
649
650
|
var updateLoadingCount = function () {
|
|
@@ -659,7 +660,6 @@ var data = {
|
|
|
659
660
|
response.is_loading = false;
|
|
660
661
|
if (response.then === LoadingArray_then) delete response.then;
|
|
661
662
|
}
|
|
662
|
-
updateLoadingCount();
|
|
663
663
|
},
|
|
664
664
|
responseCrash,
|
|
665
665
|
responseLoading(response) {
|
|
@@ -881,10 +881,12 @@ var data = {
|
|
|
881
881
|
headers = seekFromSource(headers, api.base);
|
|
882
882
|
}
|
|
883
883
|
instance.loading = cross(method, uri, headers).send(params).done(xhr => {
|
|
884
|
+
updateLoadingCount();
|
|
884
885
|
if (instance.loading !== xhr) return oh(aborted);
|
|
885
886
|
instance.loading = null;
|
|
886
887
|
ok(xhr.responseText || xhr.response);
|
|
887
888
|
}).error(xhr => {
|
|
889
|
+
updateLoadingCount();
|
|
888
890
|
if (instance.loading !== xhr) return oh(aborted);
|
|
889
891
|
instance.loading = null;
|
|
890
892
|
try {
|
package/coms/zimoli/model.js
CHANGED