isite 2022.8.1 → 2022.8.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/client-side/app.js +29 -17
- package/apps/client-side/site_files/css/bootstrap5-addon.css +61 -1
- package/apps/client-side/site_files/css/dropdown.css +22 -4
- package/apps/client-side/site_files/css/effect.css +283 -283
- package/apps/client-side/site_files/css/images.css +43 -39
- package/apps/client-side/site_files/css/layout.css +135 -92
- package/apps/client-side/site_files/html/directive/i-date.html +19 -0
- package/apps/client-side/site_files/html/sub/i-file.content.html +19 -0
- package/apps/client-side/site_files/html/sub/i-list2.content.html +15 -17
- package/apps/client-side/site_files/images/no.jpg +0 -0
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +701 -674
- package/apps/client-side/site_files/js/directive-core.js +7 -8
- package/isite_files/images/no.jpg +0 -0
- package/lib/cookie.js +3 -5
- package/lib/routing.js +2 -0
- package/package.json +1 -1
- package/apps/client-side/site_files/html/sub/i-date2.content.html +0 -64
package/apps/client-side/app.js
CHANGED
|
@@ -15,6 +15,12 @@ module.exports = function (site) {
|
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
+
site.get({
|
|
19
|
+
name: '/x-images',
|
|
20
|
+
path: __dirname + '/site_files/images',
|
|
21
|
+
public: true,
|
|
22
|
+
});
|
|
23
|
+
|
|
18
24
|
site.get({
|
|
19
25
|
name: '/x-js',
|
|
20
26
|
path: __dirname + '/site_files/js',
|
|
@@ -155,9 +161,12 @@ module.exports = function (site) {
|
|
|
155
161
|
__dirname + '/site_files/css/layout.css',
|
|
156
162
|
__dirname + '/site_files/css/modal.css',
|
|
157
163
|
__dirname + '/site_files/css/color.css',
|
|
164
|
+
__dirname + '/site_files/css/images.css',
|
|
165
|
+
__dirname + '/site_files/css/dropdown.css',
|
|
158
166
|
__dirname + '/site_files/css/fonts.css',
|
|
159
167
|
__dirname + '/site_files/css/font-droid.css',
|
|
160
168
|
__dirname + '/site_files/css/effect.css',
|
|
169
|
+
__dirname + '/site_files/css/scrollbar.css',
|
|
161
170
|
__dirname + '/site_files/css/table.css',
|
|
162
171
|
__dirname + '/site_files/css/tabs.css',
|
|
163
172
|
__dirname + '/site_files/css/help.css',
|
|
@@ -171,22 +180,26 @@ module.exports = function (site) {
|
|
|
171
180
|
|
|
172
181
|
site.createDir(site.dir + '/../../uploads');
|
|
173
182
|
|
|
174
|
-
site.post({ name: '/api/upload/image
|
|
175
|
-
site.createDir(site.options.upload_dir + '/' + req.
|
|
176
|
-
site.createDir(site.options.upload_dir + '/' + req.
|
|
183
|
+
site.post({ name: '/x-api/upload/image', public: true }, (req, res) => {
|
|
184
|
+
site.createDir(site.options.upload_dir + '/' + req.headers['folder'], () => {
|
|
185
|
+
site.createDir(site.options.upload_dir + '/' + req.headers['folder'] + '/images', () => {
|
|
177
186
|
let response = {
|
|
187
|
+
image: {},
|
|
178
188
|
done: !0,
|
|
179
189
|
};
|
|
180
190
|
let file = req.files.fileToUpload;
|
|
181
191
|
if (file) {
|
|
182
|
-
let newName = 'image_' + new Date().getTime().toString().
|
|
183
|
-
let newpath = site.options.upload_dir + '/' + req.
|
|
192
|
+
let newName = 'image_' + (new Date().getTime().toString() + Math.random()).replaceAll('.', '_') + site.path.extname(file.originalFilename);
|
|
193
|
+
let newpath = site.path.resolve(site.options.upload_dir + '/' + req.headers['folder'] + '/images/' + newName);
|
|
184
194
|
site.mv(file.filepath, newpath, function (err) {
|
|
185
195
|
if (err) {
|
|
186
196
|
response.error = err;
|
|
187
197
|
response.done = !1;
|
|
198
|
+
} else {
|
|
199
|
+
response.image.path = newpath;
|
|
200
|
+
response.image.url = '/x-api/image/' + req.headers['folder'] + '/' + newName;
|
|
201
|
+
response.image.size = file.size;
|
|
188
202
|
}
|
|
189
|
-
response.image_url = '/api/image/' + req.params.category + '/' + newName;
|
|
190
203
|
res.json(response);
|
|
191
204
|
});
|
|
192
205
|
} else {
|
|
@@ -198,15 +211,16 @@ module.exports = function (site) {
|
|
|
198
211
|
});
|
|
199
212
|
});
|
|
200
213
|
|
|
201
|
-
site.get({ name: '/api/image/:category/:name', public: true }, (req, res) => {
|
|
214
|
+
site.get({ name: '/x-api/image/:category/:name', public: true }, (req, res) => {
|
|
202
215
|
res.set('Cache-Control', 'public, max-age=2592000');
|
|
203
216
|
res.download(site.options.upload_dir + '/' + req.params.category + '/images/' + req.params.name);
|
|
204
217
|
});
|
|
205
218
|
|
|
206
|
-
site.post({ name: '/api/upload/file
|
|
207
|
-
site.createDir(site.options.upload_dir + '/' + req.
|
|
208
|
-
site.createDir(site.options.upload_dir + '/' + req.
|
|
219
|
+
site.post({ name: '/x-api/upload/file', public: true }, (req, res) => {
|
|
220
|
+
site.createDir(site.options.upload_dir + '/' + req.headers['folder'], () => {
|
|
221
|
+
site.createDir(site.options.upload_dir + '/' + req.headers['folder'] + '/files', () => {
|
|
209
222
|
let response = {
|
|
223
|
+
file: {},
|
|
210
224
|
done: !0,
|
|
211
225
|
};
|
|
212
226
|
let file = req.files.fileToUpload;
|
|
@@ -216,17 +230,15 @@ module.exports = function (site) {
|
|
|
216
230
|
res.json(response);
|
|
217
231
|
return;
|
|
218
232
|
}
|
|
219
|
-
let newName = 'file_' + new Date().getTime() + '.' + site.path.extname(file.
|
|
220
|
-
let newpath = site.options.upload_dir + '/' + req.
|
|
233
|
+
let newName = 'file_' + (new Date().getTime().toString() + Math.random()).replaceAll('.', '_') + site.path.extname(file.originalFilename);
|
|
234
|
+
let newpath = site.path.resolve(site.options.upload_dir + '/' + req.headers['folder'] + '/files/' + newName);
|
|
221
235
|
site.mv(file.filepath, newpath, function (err) {
|
|
222
236
|
if (err) {
|
|
223
237
|
response.error = err;
|
|
224
238
|
response.done = !1;
|
|
225
239
|
}
|
|
226
|
-
response.file =
|
|
227
|
-
response.file.url = '/api/file/' + req.
|
|
228
|
-
response.file.name = file.originalFilename;
|
|
229
|
-
response.file.mimetype = file.mimetype;
|
|
240
|
+
response.file.path = newpath;
|
|
241
|
+
response.file.url = '/x-api/file/' + req.headers['folder'] + '/' + newName;
|
|
230
242
|
response.file.size = file.size;
|
|
231
243
|
res.json(response);
|
|
232
244
|
});
|
|
@@ -234,7 +246,7 @@ module.exports = function (site) {
|
|
|
234
246
|
});
|
|
235
247
|
});
|
|
236
248
|
|
|
237
|
-
site.get({ name: '/api/file/:category/:name', public: true }, (req, res) => {
|
|
249
|
+
site.get({ name: '/x-api/file/:category/:name', public: true }, (req, res) => {
|
|
238
250
|
res.download(site.options.upload_dir + '/' + req.params.category + '/files/' + req.params.name);
|
|
239
251
|
});
|
|
240
252
|
|
|
@@ -22,16 +22,76 @@
|
|
|
22
22
|
float: right;
|
|
23
23
|
margin-right: -1.5em;
|
|
24
24
|
}
|
|
25
|
+
label {
|
|
26
|
+
float: left;
|
|
27
|
+
}
|
|
28
|
+
.ar label {
|
|
29
|
+
float: right;
|
|
30
|
+
}
|
|
31
|
+
fieldset {
|
|
32
|
+
padding: var(--fieldset-padding);
|
|
33
|
+
margin: var(--fieldset-margin);
|
|
34
|
+
background: var(--fieldset-background);
|
|
35
|
+
border: var(--fieldset-border);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
fieldset legend {
|
|
39
|
+
color: var(--legend-color);
|
|
40
|
+
font-size: var(--legend-font-size);
|
|
41
|
+
text-shadow: var(--legend-text-shadow);
|
|
42
|
+
font-weight: var(--legend-font-weight);
|
|
43
|
+
background: var(--fieldset-background);
|
|
44
|
+
border: var(--legend-border);
|
|
45
|
+
}
|
|
46
|
+
i-textarea {
|
|
47
|
+
margin: 10px;
|
|
48
|
+
}
|
|
25
49
|
i-checkbox,
|
|
26
50
|
i-radio {
|
|
27
51
|
align-self: center;
|
|
28
52
|
margin-left: 1.5em;
|
|
29
53
|
margin-right: 1.5em;
|
|
54
|
+
white-space: nowrap;
|
|
30
55
|
}
|
|
56
|
+
|
|
31
57
|
i-button {
|
|
32
58
|
display: contents;
|
|
33
59
|
}
|
|
34
|
-
|
|
60
|
+
i-button button {
|
|
61
|
+
margin: 5px;
|
|
62
|
+
}
|
|
63
|
+
i-file {
|
|
64
|
+
padding: 10px !important;
|
|
65
|
+
border: 1px dashed var(--theme-color);
|
|
66
|
+
margin: 10px;
|
|
67
|
+
height: fit-content;
|
|
68
|
+
}
|
|
69
|
+
i-file button {
|
|
70
|
+
max-width: 100px;
|
|
71
|
+
}
|
|
72
|
+
i-file .view button {
|
|
73
|
+
width: 40px;
|
|
74
|
+
height: 40px;
|
|
75
|
+
}
|
|
76
|
+
i-date .fa {
|
|
77
|
+
font-size: 24px;
|
|
78
|
+
vertical-align: middle;
|
|
79
|
+
margin-top: 5px;
|
|
80
|
+
}
|
|
81
|
+
.modal-content {
|
|
82
|
+
width: 75%;
|
|
83
|
+
}
|
|
84
|
+
.modal-body {
|
|
85
|
+
padding: 10px;
|
|
86
|
+
display: block;
|
|
87
|
+
}
|
|
88
|
+
.modal-footer {
|
|
89
|
+
display: block;
|
|
90
|
+
width: 100%;
|
|
91
|
+
}
|
|
92
|
+
.dropdown-content {
|
|
93
|
+
top: 35px;
|
|
94
|
+
}
|
|
35
95
|
.v-tabs .nav-link {
|
|
36
96
|
color: #aaa;
|
|
37
97
|
background: #fff;
|
|
@@ -49,15 +49,33 @@
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.dropdown-item {
|
|
52
|
+
display: inline-block;
|
|
52
53
|
cursor: pointer;
|
|
53
54
|
background: var(--dropdown-background);
|
|
55
|
+
padding: 0px;
|
|
56
|
+
margin: 0px;
|
|
57
|
+
transition: all .1s ease;
|
|
54
58
|
}
|
|
55
59
|
.dropdown-item p {
|
|
56
|
-
color:
|
|
57
|
-
font-size:
|
|
60
|
+
color: #055160;
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
font-weight: bold;
|
|
58
63
|
background: transparent;
|
|
64
|
+
text-align: left;
|
|
65
|
+
}
|
|
66
|
+
.ar .dropdown-item p{
|
|
67
|
+
text-align: right;
|
|
59
68
|
}
|
|
60
69
|
.dropdown-item small {
|
|
61
|
-
color:
|
|
62
|
-
font-size:
|
|
70
|
+
color: antiquewhite;
|
|
71
|
+
font-size: 9px;
|
|
72
|
+
text-align: left;
|
|
73
|
+
padding: 3px;
|
|
74
|
+
background: #198754;
|
|
75
|
+
font-weight: bold;
|
|
76
|
+
padding-right: 9px;
|
|
77
|
+
padding-left: 9px;
|
|
78
|
+
}
|
|
79
|
+
.ar .dropdown-item small{
|
|
80
|
+
text-align: right;
|
|
63
81
|
}
|