isite 2022.8.2 → 2022.8.5
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 +27 -17
- package/apps/client-side/site_files/css/bootstrap5-addon.css +76 -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 +40 -35
- package/apps/client-side/site_files/css/table.css +3 -3
- package/apps/client-side/site_files/html/directive/i-date.html +19 -0
- package/apps/client-side/site_files/html/directive/i-file.html +19 -0
- package/apps/client-side/site_files/html/directive/i-image.html +7 -0
- package/apps/client-side/site_files/html/directive/i-list.html +20 -0
- package/apps/client-side/site_files/images/no.jpg +0 -0
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +302 -966
- package/apps/client-side/site_files/js/directive-core.js +7 -8
- package/apps/client-side/site_files/js/directive.js +2 -2
- package/apps/client-side/site_files/js/site.js +18 -2
- package/index.js +280 -278
- package/isite_files/images/no.jpg +0 -0
- package/lib/cookie.js +3 -5
- package/lib/email.js +108 -0
- package/lib/integrated.js +10 -26
- package/lib/routing.js +2 -0
- package/lib/security.js +1109 -1081
- package/object-options/index.js +18 -0
- package/object-options/lib/fn.js +6 -3
- package/package.json +3 -2
- package/apps/client-side/site_files/html/sub/i-date2.content.html +0 -64
- package/apps/client-side/site_files/html/sub/i-list.content.html +0 -31
- package/apps/client-side/site_files/html/sub/i-list2.content.html +0 -22
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',
|
|
@@ -160,6 +166,7 @@ module.exports = function (site) {
|
|
|
160
166
|
__dirname + '/site_files/css/fonts.css',
|
|
161
167
|
__dirname + '/site_files/css/font-droid.css',
|
|
162
168
|
__dirname + '/site_files/css/effect.css',
|
|
169
|
+
__dirname + '/site_files/css/scrollbar.css',
|
|
163
170
|
__dirname + '/site_files/css/table.css',
|
|
164
171
|
__dirname + '/site_files/css/tabs.css',
|
|
165
172
|
__dirname + '/site_files/css/help.css',
|
|
@@ -173,22 +180,26 @@ module.exports = function (site) {
|
|
|
173
180
|
|
|
174
181
|
site.createDir(site.dir + '/../../uploads');
|
|
175
182
|
|
|
176
|
-
site.post({ name: '/api/upload/image
|
|
177
|
-
site.createDir(site.options.upload_dir + '/' + req.
|
|
178
|
-
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', () => {
|
|
179
186
|
let response = {
|
|
187
|
+
image: {},
|
|
180
188
|
done: !0,
|
|
181
189
|
};
|
|
182
190
|
let file = req.files.fileToUpload;
|
|
183
191
|
if (file) {
|
|
184
|
-
let newName = 'image_' + new Date().getTime().toString().
|
|
185
|
-
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);
|
|
186
194
|
site.mv(file.filepath, newpath, function (err) {
|
|
187
195
|
if (err) {
|
|
188
196
|
response.error = err;
|
|
189
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;
|
|
190
202
|
}
|
|
191
|
-
response.image_url = '/api/image/' + req.params.category + '/' + newName;
|
|
192
203
|
res.json(response);
|
|
193
204
|
});
|
|
194
205
|
} else {
|
|
@@ -200,15 +211,16 @@ module.exports = function (site) {
|
|
|
200
211
|
});
|
|
201
212
|
});
|
|
202
213
|
|
|
203
|
-
site.get({ name: '/api/image/:category/:name', public: true }, (req, res) => {
|
|
214
|
+
site.get({ name: '/x-api/image/:category/:name', public: true }, (req, res) => {
|
|
204
215
|
res.set('Cache-Control', 'public, max-age=2592000');
|
|
205
216
|
res.download(site.options.upload_dir + '/' + req.params.category + '/images/' + req.params.name);
|
|
206
217
|
});
|
|
207
218
|
|
|
208
|
-
site.post({ name: '/api/upload/file
|
|
209
|
-
site.createDir(site.options.upload_dir + '/' + req.
|
|
210
|
-
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', () => {
|
|
211
222
|
let response = {
|
|
223
|
+
file: {},
|
|
212
224
|
done: !0,
|
|
213
225
|
};
|
|
214
226
|
let file = req.files.fileToUpload;
|
|
@@ -218,17 +230,15 @@ module.exports = function (site) {
|
|
|
218
230
|
res.json(response);
|
|
219
231
|
return;
|
|
220
232
|
}
|
|
221
|
-
let newName = 'file_' + new Date().getTime() + '.' + site.path.extname(file.
|
|
222
|
-
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);
|
|
223
235
|
site.mv(file.filepath, newpath, function (err) {
|
|
224
236
|
if (err) {
|
|
225
237
|
response.error = err;
|
|
226
238
|
response.done = !1;
|
|
227
239
|
}
|
|
228
|
-
response.file =
|
|
229
|
-
response.file.url = '/api/file/' + req.
|
|
230
|
-
response.file.name = file.originalFilename;
|
|
231
|
-
response.file.mimetype = file.mimetype;
|
|
240
|
+
response.file.path = newpath;
|
|
241
|
+
response.file.url = '/x-api/file/' + req.headers['folder'] + '/' + newName;
|
|
232
242
|
response.file.size = file.size;
|
|
233
243
|
res.json(response);
|
|
234
244
|
});
|
|
@@ -236,7 +246,7 @@ module.exports = function (site) {
|
|
|
236
246
|
});
|
|
237
247
|
});
|
|
238
248
|
|
|
239
|
-
site.get({ name: '/api/file/:category/:name', public: true }, (req, res) => {
|
|
249
|
+
site.get({ name: '/x-api/file/:category/:name', public: true }, (req, res) => {
|
|
240
250
|
res.download(site.options.upload_dir + '/' + req.params.category + '/files/' + req.params.name);
|
|
241
251
|
});
|
|
242
252
|
|
|
@@ -8,43 +8,118 @@
|
|
|
8
8
|
|
|
9
9
|
/* Large devices (desktops, 992px and up) */
|
|
10
10
|
@media (min-width: 992px) {
|
|
11
|
+
.navbar-nav .dropdown-menu.show {
|
|
12
|
+
display: table;
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
/* X-Large devices (large desktops, 1200px and up) */
|
|
14
17
|
@media (min-width: 1200px) {
|
|
18
|
+
.navbar-nav .dropdown-menu.show {
|
|
19
|
+
display: table;
|
|
20
|
+
}
|
|
15
21
|
}
|
|
16
22
|
|
|
17
23
|
/* XX-Large devices (larger desktops, 1400px and up) */
|
|
18
24
|
@media (min-width: 1400px) {
|
|
25
|
+
.navbar-nav .dropdown-menu.show {
|
|
26
|
+
display: table;
|
|
27
|
+
}
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
.ar .form-check .form-check-input {
|
|
22
31
|
float: right;
|
|
23
32
|
margin-right: -1.5em;
|
|
24
33
|
}
|
|
34
|
+
label {
|
|
35
|
+
float: left;
|
|
36
|
+
}
|
|
37
|
+
.ar label {
|
|
38
|
+
float: right;
|
|
39
|
+
}
|
|
40
|
+
fieldset {
|
|
41
|
+
padding: var(--fieldset-padding);
|
|
42
|
+
margin: var(--fieldset-margin);
|
|
43
|
+
background: var(--fieldset-background);
|
|
44
|
+
border: var(--fieldset-border);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
fieldset legend {
|
|
48
|
+
color: var(--legend-color);
|
|
49
|
+
font-size: var(--legend-font-size);
|
|
50
|
+
text-shadow: var(--legend-text-shadow);
|
|
51
|
+
font-weight: var(--legend-font-weight);
|
|
52
|
+
background: var(--fieldset-background);
|
|
53
|
+
border: var(--legend-border);
|
|
54
|
+
}
|
|
55
|
+
i-textarea {
|
|
56
|
+
margin: 10px;
|
|
57
|
+
}
|
|
25
58
|
i-checkbox,
|
|
26
59
|
i-radio {
|
|
27
60
|
align-self: center;
|
|
28
61
|
margin-left: 1.5em;
|
|
29
62
|
margin-right: 1.5em;
|
|
63
|
+
white-space: nowrap;
|
|
30
64
|
}
|
|
65
|
+
|
|
31
66
|
i-button {
|
|
32
67
|
display: contents;
|
|
33
68
|
}
|
|
69
|
+
i-button button {
|
|
70
|
+
margin: 5px;
|
|
71
|
+
}
|
|
72
|
+
i-file {
|
|
73
|
+
display: block;
|
|
74
|
+
padding: 10px !important;
|
|
75
|
+
border: 1px dashed var(--theme-color);
|
|
76
|
+
margin: 10px;
|
|
77
|
+
height: fit-content;
|
|
78
|
+
}
|
|
79
|
+
i-file button {
|
|
80
|
+
max-width: 100px;
|
|
81
|
+
}
|
|
82
|
+
i-file .view button {
|
|
83
|
+
width: 40px;
|
|
84
|
+
height: 40px;
|
|
85
|
+
}
|
|
86
|
+
i-date .fa {
|
|
87
|
+
font-size: 24px;
|
|
88
|
+
vertical-align: middle;
|
|
89
|
+
margin-top: 5px;
|
|
90
|
+
}
|
|
91
|
+
.modal-content {
|
|
92
|
+
width: 75vw;
|
|
93
|
+
height: 100vh;
|
|
94
|
+
}
|
|
95
|
+
.modal-body {
|
|
96
|
+
padding: 10px;
|
|
97
|
+
display: block;
|
|
98
|
+
overflow: auto;
|
|
99
|
+
}
|
|
100
|
+
.modal-footer {
|
|
101
|
+
display: block;
|
|
102
|
+
width: 100%;
|
|
103
|
+
}
|
|
34
104
|
.dropdown-content {
|
|
35
|
-
top:
|
|
105
|
+
top: 35px;
|
|
36
106
|
}
|
|
37
107
|
.v-tabs .nav-link {
|
|
38
108
|
color: #aaa;
|
|
39
109
|
background: #fff;
|
|
40
110
|
position: relative;
|
|
41
111
|
cursor: pointer;
|
|
112
|
+
font-weight: bold;
|
|
113
|
+
width: auto;
|
|
42
114
|
}
|
|
43
115
|
|
|
44
116
|
.v-tabs .nav-link.active {
|
|
45
117
|
color: #45b649;
|
|
46
118
|
background: #fff;
|
|
47
119
|
}
|
|
120
|
+
.nav-link {
|
|
121
|
+
width: max-content;
|
|
122
|
+
}
|
|
48
123
|
|
|
49
124
|
@media (min-width: 992px) {
|
|
50
125
|
.v-tabs .nav-link::before {
|
|
@@ -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
|
}
|