@cocreate/users 1.13.1 → 1.14.0
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/CHANGELOG.md +14 -0
- package/package.json +6 -6
- package/src/client.js +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.14.0](https://github.com/CoCreate-app/CoCreate-users/compare/v1.13.2...v1.14.0) (2022-12-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* initSession function to sendMessage to server to get userStatus ([24a9493](https://github.com/CoCreate-app/CoCreate-users/commit/24a94937eb5323c0511d78277a23fa873f08d835))
|
|
7
|
+
|
|
8
|
+
## [1.13.2](https://github.com/CoCreate-app/CoCreate-users/compare/v1.13.1...v1.13.2) (2022-12-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* bump dependencies ([8bdc471](https://github.com/CoCreate-app/CoCreate-users/commit/8bdc4715335ff6029531ddf643951ffdf74ebc3a))
|
|
14
|
+
|
|
1
15
|
## [1.13.1](https://github.com/CoCreate-app/CoCreate-users/compare/v1.13.0...v1.13.1) (2022-12-30)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/users",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "A simple users component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"users",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"webpack-log": "^3.0.1"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@cocreate/actions": "^1.5.
|
|
64
|
-
"@cocreate/crud-client": "^1.17.
|
|
65
|
-
"@cocreate/docs": "^1.
|
|
66
|
-
"@cocreate/element-prototype": "^1.2.
|
|
67
|
-
"@cocreate/render": "^1.17.
|
|
63
|
+
"@cocreate/actions": "^1.5.47",
|
|
64
|
+
"@cocreate/crud-client": "^1.17.8",
|
|
65
|
+
"@cocreate/docs": "^1.5.1",
|
|
66
|
+
"@cocreate/element-prototype": "^1.2.20",
|
|
67
|
+
"@cocreate/render": "^1.17.13"
|
|
68
68
|
}
|
|
69
69
|
}
|
package/src/client.js
CHANGED
|
@@ -9,6 +9,7 @@ import './index.css';
|
|
|
9
9
|
const CoCreateUser = {
|
|
10
10
|
init: function() {
|
|
11
11
|
this.initSocket();
|
|
12
|
+
this.initSession();
|
|
12
13
|
this.initChangeOrg();
|
|
13
14
|
},
|
|
14
15
|
|
|
@@ -240,6 +241,20 @@ const CoCreateUser = {
|
|
|
240
241
|
|
|
241
242
|
},
|
|
242
243
|
|
|
244
|
+
initSession: () => {
|
|
245
|
+
let redirectTag = document.querySelector('[session]');
|
|
246
|
+
|
|
247
|
+
if (redirectTag) {
|
|
248
|
+
crud.socket.send('sendMessage', {
|
|
249
|
+
message: 'checkSession',
|
|
250
|
+
broadcast: false,
|
|
251
|
+
broadcastSender: false,
|
|
252
|
+
broadcastBrowser: false
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
},
|
|
257
|
+
|
|
243
258
|
initChangeOrg: () => {
|
|
244
259
|
const user_id = window.localStorage.getItem('user_id');
|
|
245
260
|
|