isite 2022.8.3 → 2022.8.6
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/README.md +7 -7
- package/apps/client-side/app.js +255 -182
- package/apps/client-side/site_files/css/bootstrap5-addon.css +87 -4
- package/apps/client-side/site_files/css/bootstrap5.css +1 -1
- package/apps/client-side/site_files/css/bootstrap5.css.map +1 -0
- package/apps/client-side/site_files/css/dropdown.css +22 -4
- package/apps/client-side/site_files/css/effect.css +342 -283
- package/apps/client-side/site_files/css/images.css +10 -7
- package/apps/client-side/site_files/css/layout.css +37 -44
- package/apps/client-side/site_files/css/modal.css +1 -1
- package/apps/client-side/site_files/css/normalize.css +146 -0
- package/apps/client-side/site_files/css/scrollbar.css +9 -5
- package/apps/client-side/site_files/css/table.css +3 -3
- package/apps/client-side/site_files/html/directive/i-button.html +5 -0
- package/apps/client-side/site_files/html/directive/i-checkbox.html +4 -0
- package/apps/client-side/site_files/html/directive/i-checklist.html +6 -0
- package/apps/client-side/site_files/html/directive/i-control.html +5 -0
- package/apps/client-side/site_files/html/directive/i-date.html +24 -0
- package/apps/client-side/site_files/html/directive/i-datetime.html +31 -0
- package/apps/client-side/site_files/html/{sub/i-file.content.html → directive/i-file.html} +3 -5
- 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/html/directive/i-radio.html +4 -0
- package/apps/client-side/site_files/html/directive/i-textarea.html +4 -0
- package/apps/client-side/site_files/html/directive/i-treenode.html +20 -0
- package/apps/client-side/site_files/html/directive/i-treeview.html +13 -0
- package/apps/client-side/site_files/html/directive/i-upload.html +5 -0
- package/apps/client-side/site_files/html/directive-core/i-date.html +64 -0
- package/apps/client-side/site_files/html/directive-core/i-list.html +22 -0
- package/apps/client-side/site_files/images/no.jpg +0 -0
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +278 -998
- package/apps/client-side/site_files/js/bootstrap.js.map +1 -0
- package/apps/client-side/site_files/js/directive.js +1865 -2044
- package/apps/client-side/site_files/js/directive.min.js +2 -2
- package/apps/client-side/site_files/js/site.js +19 -3
- package/apps/security/site_files/html/login_modal.html +18 -26
- package/index.js +277 -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/parser.js +519 -509
- package/lib/routing.js +23 -15
- package/lib/security.js +1109 -1081
- package/lib/sessions.js +182 -247
- package/object-options/index.js +24 -4
- package/object-options/lib/fn.js +6 -3
- package/package.json +5 -3
- package/pull.bat +3 -0
- package/push.bat +2 -5
- 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/lib/email.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
module.exports = function init(____0) {
|
|
2
|
+
|
|
3
|
+
____0.sendFreeMail = function (mail, callback) {
|
|
4
|
+
callback =
|
|
5
|
+
callback ||
|
|
6
|
+
function (err, res) {
|
|
7
|
+
console.log(err || res);
|
|
8
|
+
};
|
|
9
|
+
if (!mail || !mail.from || !mail.to || !mail.subject || !mail.message) {
|
|
10
|
+
callback({ message: ' Check Mail All Fields [ from , to , subject , message ] ' });
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
mail.source = 'isite';
|
|
14
|
+
mail.from_email = mail.from;
|
|
15
|
+
mail.to_email = mail.to;
|
|
16
|
+
|
|
17
|
+
____0
|
|
18
|
+
.fetch(`http://emails.egytag.com/api/emails/add`, {
|
|
19
|
+
method: 'POST',
|
|
20
|
+
headers: { 'Content-Type': 'application/json' },
|
|
21
|
+
body: JSON.stringify(mail),
|
|
22
|
+
})
|
|
23
|
+
.then((res) => res.json())
|
|
24
|
+
.then((body) => {
|
|
25
|
+
callback(null, body);
|
|
26
|
+
})
|
|
27
|
+
.catch((err) => {
|
|
28
|
+
callback(err);
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
____0.sendSmptMail = function (mail, callback) {
|
|
33
|
+
callback =
|
|
34
|
+
callback ||
|
|
35
|
+
function (err, res) {
|
|
36
|
+
console.log(err || res);
|
|
37
|
+
};
|
|
38
|
+
if (!mail || !mail.from || !mail.to || !mail.subject || !mail.message) {
|
|
39
|
+
callback({ message: ' Check Mail All Fields [ from , to , subject , message ] ' });
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
mail = { ...____0.options.mail, ...mail };
|
|
43
|
+
var transporter = ____0.nodemailer.createTransport({
|
|
44
|
+
host: mail.host,
|
|
45
|
+
port: mail.port || 587,
|
|
46
|
+
secure: mail.secure, // true for 465, false for other ports
|
|
47
|
+
auth: {
|
|
48
|
+
user: mail.username, // generated ethereal user
|
|
49
|
+
pass: mail.password, // generated ethereal password
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
var mailOptions = {
|
|
54
|
+
from: mail.from,
|
|
55
|
+
to: mail.to,
|
|
56
|
+
cc: mail.cc,
|
|
57
|
+
bcc: mail.bcc,
|
|
58
|
+
subject: mail.subject,
|
|
59
|
+
html: mail.message,
|
|
60
|
+
text: mail.message.replace(/<[^>]+>/g, ''),
|
|
61
|
+
headers: {
|
|
62
|
+
'x-lib': 'isite',
|
|
63
|
+
},
|
|
64
|
+
date: new Date(),
|
|
65
|
+
attachments: [{ filename: 'isite.txt', content: 'test attachment', contentType: 'text/plain' }],
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
transporter.sendMail(mailOptions, function (err, info) {
|
|
69
|
+
callback(err, info);
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
____0.checkMailConfig = function (mail, callback) {
|
|
74
|
+
callback =
|
|
75
|
+
callback ||
|
|
76
|
+
function (err, res) {
|
|
77
|
+
console.log(err || res);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
mail = { ...____0.options.mail, ...mail };
|
|
81
|
+
var transporter = ____0.nodemailer.createTransport({
|
|
82
|
+
host: mail.host,
|
|
83
|
+
port: mail.port || 587,
|
|
84
|
+
secure: mail.secure, // true for 465, false for other ports
|
|
85
|
+
auth: {
|
|
86
|
+
user: mail.username, // generated ethereal user
|
|
87
|
+
pass: mail.password, // generated ethereal password
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
transporter.verify(function (err, success) {
|
|
92
|
+
callback(err, success);
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
// let transporter = nodemailer.createTransport({
|
|
97
|
+
// host: "smtp.gmail.com",
|
|
98
|
+
// port: 465,
|
|
99
|
+
// secure: true,
|
|
100
|
+
// auth: {
|
|
101
|
+
// type: "OAuth2",
|
|
102
|
+
// user: "user@example.com",
|
|
103
|
+
// accessToken: "ya29.Xx_XX0xxxxx-xX0X0XxXXxXxXXXxX0x",
|
|
104
|
+
// },
|
|
105
|
+
// });
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
};
|
package/lib/integrated.js
CHANGED
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
module.exports = function init(____0) {
|
|
2
|
-
____0.sendEmail = function (mail, callback) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
____0.sendEmail =____0.sendMail = function (mail, callback) {
|
|
3
|
+
mail = { ...____0.options.mail, ...mail };
|
|
4
|
+
if (mail.enabled) {
|
|
5
|
+
if (mail.type === 'smpt') {
|
|
6
|
+
____0.sendSmptMail(mail, callback);
|
|
7
|
+
} else {
|
|
8
|
+
____0.sendFreeMail(mail, callback);
|
|
9
|
+
}
|
|
10
|
+
} else {
|
|
11
|
+
callback({ message: 'mail not enabled in site options' });
|
|
11
12
|
}
|
|
12
|
-
mail.source = 'isite';
|
|
13
|
-
mail.from_email = mail.from;
|
|
14
|
-
mail.to_email = mail.to;
|
|
15
|
-
|
|
16
|
-
____0
|
|
17
|
-
.fetch(`http://emails.egytag.com/api/emails/add`, {
|
|
18
|
-
method: 'POST',
|
|
19
|
-
headers: { 'Content-Type': 'application/json' },
|
|
20
|
-
body: JSON.stringify(mail),
|
|
21
|
-
})
|
|
22
|
-
.then((res) => res.json())
|
|
23
|
-
.then((body) => {
|
|
24
|
-
callback(null, body);
|
|
25
|
-
})
|
|
26
|
-
.catch((err) => {
|
|
27
|
-
callback(err);
|
|
28
|
-
});
|
|
29
13
|
};
|
|
30
14
|
};
|