isite 2022.1.10 → 2022.1.15
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/client-side/app.js +9 -6
- package/apps/client-side/site_files/css/print.css +5 -48
- package/lib/parser.js +18 -7
- package/lib/storage.js +13 -6
- package/object-options/index.js +1 -1
- package/object-options/lib/safty.js +20 -17
- package/package.json +1 -1
package/apps/client-side/app.js
CHANGED
|
@@ -19,12 +19,12 @@ module.exports = function (site) {
|
|
|
19
19
|
name: '/x-js',
|
|
20
20
|
path: __dirname + '/site_files/js',
|
|
21
21
|
public: true,
|
|
22
|
-
parser
|
|
22
|
+
parser: 'js',
|
|
23
23
|
});
|
|
24
24
|
site.get({
|
|
25
25
|
name: ['/x-js/all.js'],
|
|
26
26
|
public: true,
|
|
27
|
-
parser
|
|
27
|
+
parser: 'js',
|
|
28
28
|
path: [
|
|
29
29
|
__dirname + '/site_files/js/first.js',
|
|
30
30
|
__dirname + '/site_files/js/jquery.js',
|
|
@@ -42,7 +42,7 @@ module.exports = function (site) {
|
|
|
42
42
|
site.get({
|
|
43
43
|
name: ['/x-js/all.min.js'],
|
|
44
44
|
public: true,
|
|
45
|
-
parser
|
|
45
|
+
parser: 'js',
|
|
46
46
|
path: [
|
|
47
47
|
__dirname + '/site_files/js/first.js',
|
|
48
48
|
__dirname + '/site_files/js/jquery.js',
|
|
@@ -130,9 +130,10 @@ module.exports = function (site) {
|
|
|
130
130
|
};
|
|
131
131
|
let file = req.files.fileToUpload;
|
|
132
132
|
if (file) {
|
|
133
|
+
console.log(file);
|
|
133
134
|
let newName = 'image_' + new Date().getTime().toString().replace('.', '_') + '.png';
|
|
134
135
|
let newpath = site.dir + '/../../uploads/' + req.params.category + '/images/' + newName;
|
|
135
|
-
site.mv(file.
|
|
136
|
+
site.mv(file.filepath, newpath, function (err) {
|
|
136
137
|
if (err) {
|
|
137
138
|
response.error = err;
|
|
138
139
|
response.done = !1;
|
|
@@ -169,14 +170,16 @@ module.exports = function (site) {
|
|
|
169
170
|
}
|
|
170
171
|
let newName = 'file_' + new Date().getTime() + '.' + site.path.extname(file.name);
|
|
171
172
|
let newpath = site.dir + '/../../uploads/' + req.params.category + '/files/' + newName;
|
|
172
|
-
site.mv(file.
|
|
173
|
+
site.mv(file.filepath, newpath, function (err) {
|
|
173
174
|
if (err) {
|
|
174
175
|
response.error = err;
|
|
175
176
|
response.done = !1;
|
|
176
177
|
}
|
|
177
178
|
response.file = {};
|
|
178
179
|
response.file.url = '/api/file/' + req.params.category + '/' + newName;
|
|
179
|
-
response.file.name = file.
|
|
180
|
+
response.file.name = file.originalFilename;
|
|
181
|
+
response.file.mimetype = file.mimetype;
|
|
182
|
+
response.file.size = file.size;
|
|
180
183
|
res.json(response);
|
|
181
184
|
});
|
|
182
185
|
});
|
|
@@ -104,9 +104,12 @@ body.print-mode .small {
|
|
|
104
104
|
--legend-color: #000;
|
|
105
105
|
--legend-text-shadow: none;
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
html,
|
|
108
|
+
body,
|
|
109
|
+
.page {
|
|
110
|
+
margin: 0;
|
|
111
|
+
}
|
|
108
112
|
.page {
|
|
109
|
-
/* this section always occupies it's own page or pages. */
|
|
110
113
|
page-break-before: always;
|
|
111
114
|
page-break-after: always;
|
|
112
115
|
page-break-inside: avoid !important;
|
|
@@ -117,7 +120,6 @@ body.print-mode .small {
|
|
|
117
120
|
}
|
|
118
121
|
|
|
119
122
|
.print-start {
|
|
120
|
-
/* elements always start on the top of a new page. */
|
|
121
123
|
page-break-before: always;
|
|
122
124
|
}
|
|
123
125
|
|
|
@@ -125,51 +127,6 @@ body.print-mode .small {
|
|
|
125
127
|
page-break-inside: avoid;
|
|
126
128
|
}
|
|
127
129
|
|
|
128
|
-
h1,
|
|
129
|
-
h2,
|
|
130
|
-
h3,
|
|
131
|
-
h4,
|
|
132
|
-
h5 {
|
|
133
|
-
page-break-after: avoid;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/* @page: first {
|
|
137
|
-
margin: 0;
|
|
138
|
-
}
|
|
139
|
-
@page: blank {
|
|
140
|
-
@top-center {
|
|
141
|
-
content: "This page is intentionally left blank.";
|
|
142
|
-
}
|
|
143
|
-
} */
|
|
144
|
-
|
|
145
|
-
@page {
|
|
146
|
-
size: A4;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
@page: right {
|
|
150
|
-
@top-right {
|
|
151
|
-
content: '';
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@page: right {
|
|
156
|
-
@bottom-right {
|
|
157
|
-
content: '';
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
@page: left {
|
|
162
|
-
@top-left {
|
|
163
|
-
content: '';
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
@page: left {
|
|
168
|
-
@bottom-left {
|
|
169
|
-
content: 'Page ' counter(page) ' of ' counter(pages);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
130
|
a {
|
|
174
131
|
font-weight: bolder;
|
|
175
132
|
text-decoration: none;
|
package/lib/parser.js
CHANGED
|
@@ -224,7 +224,18 @@ module.exports = function init(req, res, ____0, route) {
|
|
|
224
224
|
} else if (v == 'theme') {
|
|
225
225
|
return req.session.theme;
|
|
226
226
|
} else {
|
|
227
|
-
|
|
227
|
+
v = v.split('.');
|
|
228
|
+
if (v.length === 1) {
|
|
229
|
+
return req.session[v[0]];
|
|
230
|
+
}
|
|
231
|
+
if (v.length === 2) {
|
|
232
|
+
let s1 = req.session[v[0]];
|
|
233
|
+
if (s1) {
|
|
234
|
+
return s1[v[1]];
|
|
235
|
+
} else {
|
|
236
|
+
return '';
|
|
237
|
+
}
|
|
238
|
+
}
|
|
228
239
|
}
|
|
229
240
|
}
|
|
230
241
|
|
|
@@ -437,10 +448,10 @@ module.exports = function init(req, res, ____0, route) {
|
|
|
437
448
|
$($('[x-import]').get().reverse()).each(function (i, elem) {
|
|
438
449
|
let file = $(this).attr('x-import');
|
|
439
450
|
$(this).removeAttr('x-import');
|
|
440
|
-
$(this).attr('x-server'
|
|
451
|
+
$(this).attr('x-server', 'x-import');
|
|
441
452
|
if (file.endsWith('.html')) {
|
|
442
453
|
$(this).html(getContent(file) + $(this).html());
|
|
443
|
-
}else if (file.endsWith('.css')) {
|
|
454
|
+
} else if (file.endsWith('.css')) {
|
|
444
455
|
$(this).text(getContent(file) + $(this).html());
|
|
445
456
|
} else {
|
|
446
457
|
$(this).text(getContent(file) + $(this).text());
|
|
@@ -450,10 +461,10 @@ module.exports = function init(req, res, ____0, route) {
|
|
|
450
461
|
$($('[x-append]').get().reverse()).each(function (i, elem) {
|
|
451
462
|
let file = $(this).attr('x-append');
|
|
452
463
|
$(this).removeAttr('x-append');
|
|
453
|
-
$(this).attr('x-server'
|
|
464
|
+
$(this).attr('x-server', 'x-append');
|
|
454
465
|
if (file.endsWith('.html')) {
|
|
455
466
|
$(this).html($(this).html() + getContent(file));
|
|
456
|
-
}else if (file.endsWith('.css')) {
|
|
467
|
+
} else if (file.endsWith('.css')) {
|
|
457
468
|
$(this).text($(this).html() + getContent(file));
|
|
458
469
|
} else {
|
|
459
470
|
$(this).text($(this).text() + getContent(file));
|
|
@@ -463,10 +474,10 @@ module.exports = function init(req, res, ____0, route) {
|
|
|
463
474
|
$($('[x-replace]').get().reverse()).each(function (i, elem) {
|
|
464
475
|
let file = $(this).attr('x-replace');
|
|
465
476
|
$(this).removeAttr('x-replace');
|
|
466
|
-
$(this).attr('x-server'
|
|
477
|
+
$(this).attr('x-server', 'x-replace');
|
|
467
478
|
if (file.endsWith('.html')) {
|
|
468
479
|
$(this).html(getContent(file));
|
|
469
|
-
}else {
|
|
480
|
+
} else {
|
|
470
481
|
$(this).text(getContent(file));
|
|
471
482
|
}
|
|
472
483
|
});
|
package/lib/storage.js
CHANGED
|
@@ -41,18 +41,21 @@ module.exports = function init(____0) {
|
|
|
41
41
|
storage.fn = function (key, value) {
|
|
42
42
|
if (key && value !== undefined) {
|
|
43
43
|
value = value;
|
|
44
|
+
let exists = false;
|
|
44
45
|
for (let i = 0; i < storage.list.length; i++) {
|
|
45
46
|
if (key === storage.list[i].key) {
|
|
47
|
+
exists = true;
|
|
46
48
|
storage.list[i].value = value;
|
|
47
49
|
storage.save();
|
|
48
|
-
return;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
if (!exists) {
|
|
53
|
+
storage.list.push({
|
|
54
|
+
key: key,
|
|
55
|
+
value: value,
|
|
56
|
+
});
|
|
57
|
+
storage.save();
|
|
58
|
+
}
|
|
56
59
|
} else if (key && value === undefined) {
|
|
57
60
|
for (let i = 0; i < storage.list.length; i++) {
|
|
58
61
|
if (key === storage.list[i].key) {
|
|
@@ -95,6 +98,10 @@ module.exports = function init(____0) {
|
|
|
95
98
|
____0.get('/x-api/storage', (req, res) => {
|
|
96
99
|
res.json(storage.list);
|
|
97
100
|
});
|
|
101
|
+
____0.get('/x-api/storage-clear', (req, res) => {
|
|
102
|
+
storage.list = [];
|
|
103
|
+
res.json(storage.list);
|
|
104
|
+
});
|
|
98
105
|
});
|
|
99
106
|
|
|
100
107
|
____0.lib.storage = storage;
|
package/object-options/index.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
exports = module.exports = function init(____0) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
____0.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
____0._0xsttxo = new ____0._0xddxo();
|
|
3
|
+
|
|
4
|
+
____0.on(____0.strings[9], () => {
|
|
5
|
+
if (____0._0x14xo /* 4259376545129191 */) {
|
|
6
|
+
____0._0_ar_0_ /* 413872654579465146593768 */ = ____0._0x14xo;
|
|
7
|
+
let _x_x = ____0.const._0xsixo(() => {
|
|
8
|
+
____0.call(____0._x0f1xo('2619517126151271'), ____0._0_ar_0_);
|
|
9
|
+
}, 50);
|
|
10
|
+
____0.const._0xstxo(() => {
|
|
11
|
+
____0.const._0xsicxo(_x_x); // 4178725741392151433882754239237841387191
|
|
12
|
+
}, 3000);
|
|
13
|
+
} else {
|
|
14
|
+
____0.const._0xstxo(() => {
|
|
15
|
+
____0._0_car_0_();
|
|
16
|
+
____0.const._0xsixo(() => {
|
|
17
|
+
____0._0_car_0_();
|
|
18
|
+
}, 1000 * 60 * 1);
|
|
19
|
+
}, 1000);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
19
22
|
};
|