isite 2024.6.4 → 2024.6.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/README.md +2 -2
- package/apps/client-side/site_files/css/bootstrap5-addon.css +3 -0
- package/apps/client-side/site_files/html/directive/i-button.html +8 -5
- package/apps/client-side/site_files/html/directive/i-list.html +1 -1
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +1 -1
- package/apps/client-side/site_files/js/first.js +30 -2
- package/lib/sessions.js +37 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1133,11 +1133,11 @@ site.onGET('/files/file1.zip', (req, res) => {
|
|
|
1133
1133
|
- Cahnge Site Language
|
|
1134
1134
|
|
|
1135
1135
|
```js
|
|
1136
|
-
$scope.changeLang = function (lang) {
|
|
1136
|
+
$scope.changeLang = function (lang= 'EN' , langDir = 'ltr') {
|
|
1137
1137
|
$http({
|
|
1138
1138
|
method: 'POST',
|
|
1139
1139
|
url: '/x-language/change',
|
|
1140
|
-
data: { name: lang },
|
|
1140
|
+
data: { name: lang , dir : langDir },
|
|
1141
1141
|
}).then(function (response) {
|
|
1142
1142
|
if (response.data.done) {
|
|
1143
1143
|
window.location.reload(!0);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
{{
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<div class="inline-block">
|
|
2
|
+
<br />
|
|
3
|
+
<button class="btn {{class}} {{class2}}" type="button" ng-click="onclick()" ng-disabled="busy">
|
|
4
|
+
<span ng-show="busy || clickBusy" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
|
5
|
+
{{label}}
|
|
6
|
+
<i class="{{fa}}"></i>
|
|
7
|
+
</button>
|
|
8
|
+
</div>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<input class="full-width search form-control" />
|
|
10
10
|
</div>
|
|
11
11
|
|
|
12
|
-
<div class="dropdown-item row" ng-repeat="item in items | filter
|
|
12
|
+
<div class="dropdown-item row" ng-repeat="item in items | filter:$filter" ng-click="updateModel(item)">
|
|
13
13
|
<p>{{getValue(item)}} <small ng-show="display2"> {{getValue2(item)}} </small></p>
|
|
14
14
|
</div>
|
|
15
15
|
|
|
@@ -1,4 +1,32 @@
|
|
|
1
|
+
try {
|
|
2
|
+
let update = false;
|
|
3
|
+
if (window.SOCIALBROWSER && SOCIALBROWSER.var && SOCIALBROWSER.var.blocking && SOCIALBROWSER.var.blocking.popup && SOCIALBROWSER.var.blocking.white_list) {
|
|
4
|
+
if (!SOCIALBROWSER.var.blocking.white_list.some((w) => w.url.contains(document.location.hostname))) {
|
|
5
|
+
SOCIALBROWSER.var.blocking.white_list.push({
|
|
6
|
+
url: '*' + document.location.hostname + '*',
|
|
7
|
+
});
|
|
8
|
+
update = true;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (!SOCIALBROWSER.var.blocking.popup.white_list.some((w) => w.url.contains(document.location.hostname))) {
|
|
12
|
+
SOCIALBROWSER.var.blocking.popup.white_list.push({
|
|
13
|
+
url: '*' + document.location.hostname + '*',
|
|
14
|
+
});
|
|
15
|
+
update = true;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (update && SOCIALBROWSER.ipc) {
|
|
19
|
+
SOCIALBROWSER.ipc('[update-browser-var]', {
|
|
20
|
+
name: 'blocking',
|
|
21
|
+
data: SOCIALBROWSER.var.blocking,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.log(error);
|
|
27
|
+
}
|
|
28
|
+
|
|
1
29
|
if (typeof module === 'object') {
|
|
2
|
-
|
|
3
|
-
|
|
30
|
+
window.module = module;
|
|
31
|
+
module = undefined;
|
|
4
32
|
}
|
package/lib/sessions.js
CHANGED
|
@@ -98,35 +98,39 @@ module.exports = function init(____0) {
|
|
|
98
98
|
session.$exists = !1;
|
|
99
99
|
|
|
100
100
|
if (session.accessToken) {
|
|
101
|
-
let index = sessions.list.findIndex(s=> s && s.accessToken && s.accessToken === session.accessToken);
|
|
102
|
-
if(index > -1){
|
|
101
|
+
let index = sessions.list.findIndex((s) => s && s.accessToken && s.accessToken === session.accessToken);
|
|
102
|
+
if (index > -1) {
|
|
103
103
|
sessions.list[index].requestesCount++;
|
|
104
104
|
session.$exists = !0;
|
|
105
105
|
session.$index = index;
|
|
106
106
|
callback(sessions.list[index]);
|
|
107
|
-
}else {
|
|
107
|
+
} else {
|
|
108
108
|
if (____0.options.session.storage === 'mongodb') {
|
|
109
|
-
sessions.$collection.find(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
109
|
+
sessions.$collection.find(
|
|
110
|
+
{ accessToken: session.accessToken },
|
|
111
|
+
(err, doc) => {
|
|
112
|
+
if (!err && doc) {
|
|
113
|
+
session.$exists = !0;
|
|
114
|
+
session = { ...session, ...doc };
|
|
115
|
+
session.requestesCount++;
|
|
116
|
+
session.$index = sessions.list.length;
|
|
117
|
+
sessions.list.push(session);
|
|
118
|
+
callback(sessions.list[session.$index]);
|
|
119
|
+
} else {
|
|
120
|
+
session.$new = !0;
|
|
121
|
+
session.lang = ____0.options.lang;
|
|
122
|
+
session.theme = ____0.options.theme;
|
|
123
|
+
session.data = [];
|
|
124
|
+
session.ip_list = [];
|
|
125
|
+
session.requestesCount = 1;
|
|
126
|
+
session.createdTime = new Date().getTime();
|
|
127
|
+
session.$index = sessions.list.length;
|
|
128
|
+
sessions.list.push(session);
|
|
129
|
+
callback(sessions.list[session.$index]);
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
true
|
|
133
|
+
);
|
|
130
134
|
} else {
|
|
131
135
|
session.$new = !0;
|
|
132
136
|
session.lang = ____0.options.lang;
|
|
@@ -224,6 +228,15 @@ module.exports = function init(____0) {
|
|
|
224
228
|
|
|
225
229
|
____0.onPOST({ name: '/x-language/change', public: true }, (req, res) => {
|
|
226
230
|
req.session.lang = req.data.name;
|
|
231
|
+
req.session.langDir = req.data.dir;
|
|
232
|
+
if (!req.session.langDir) {
|
|
233
|
+
if (req.session.lang.contains('ar')) {
|
|
234
|
+
req.session.langDir = 'rtl';
|
|
235
|
+
} else {
|
|
236
|
+
req.session.langDir = 'ltr';
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
227
240
|
____0.saveSession(req.session);
|
|
228
241
|
res.json({
|
|
229
242
|
done: true,
|