@live-change/user-frontend 0.8.66 → 0.8.67
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/front/src/connected/connected.js +11 -5
- package/package.json +26 -26
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useApi, live } from '@live-change/vue3-ssr'
|
|
2
|
-
import { computed } from 'vue'
|
|
2
|
+
import { computed, onUnmounted, getCurrentInstance } from 'vue'
|
|
3
3
|
|
|
4
4
|
export function getContactTypes(api = useApi()) {
|
|
5
5
|
const path = api.fetch
|
|
@@ -62,10 +62,13 @@ export function getAccountTypes(api = useApi()) {
|
|
|
62
62
|
return accountTypes
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
export async function getContacts(
|
|
65
|
+
export async function getContacts(context, onUnmountedCb) {
|
|
66
|
+
if(!context) context = getCurrentInstance().appContext
|
|
67
|
+
if(!onUnmountedCb) onUnmountedCb = onUnmounted
|
|
68
|
+
const api = useApi(context)
|
|
66
69
|
const contactsTypes = getContactTypes(api)
|
|
67
70
|
for(const contactType of contactsTypes) {
|
|
68
|
-
await contactType.fetchContacts()
|
|
71
|
+
await contactType.fetchContacts(context, onUnmountedCb)
|
|
69
72
|
}
|
|
70
73
|
const contacts = computed(() => contactsTypes.map((c,i) => c.contacts.value.map(v => ({
|
|
71
74
|
contactType: c.contactType,
|
|
@@ -75,10 +78,13 @@ export async function getContacts(api = useApi()) {
|
|
|
75
78
|
return contacts
|
|
76
79
|
}
|
|
77
80
|
|
|
78
|
-
export async function getAccounts(
|
|
81
|
+
export async function getAccounts(context, onUnmountedCb) {
|
|
82
|
+
if(!context) context = getCurrentInstance().appContext
|
|
83
|
+
if(!onUnmountedCb) onUnmountedCb = onUnmounted
|
|
84
|
+
const api = useApi(context)
|
|
79
85
|
const accountTypes = getAccountTypes(api)
|
|
80
86
|
for(const accountType of accountTypes) {
|
|
81
|
-
await accountType.fetchAccounts()
|
|
87
|
+
await accountType.fetchAccounts(context, onUnmountedCb)
|
|
82
88
|
}
|
|
83
89
|
const accounts = computed(() => accountTypes.map((c,i) => c.accounts.value.map(v => ({
|
|
84
90
|
accountType: c.contactType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/user-frontend",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.67",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "node --inspect --expose-gc server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; node server/start.js localDev --enableSessions --initScript ./init.js",
|
|
@@ -22,29 +22,29 @@
|
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@live-change/cli": "^0.8.
|
|
26
|
-
"@live-change/dao": "^0.8.
|
|
27
|
-
"@live-change/dao-vue3": "^0.8.
|
|
28
|
-
"@live-change/dao-websocket": "^0.8.
|
|
29
|
-
"@live-change/email-service": "^0.8.
|
|
30
|
-
"@live-change/framework": "^0.8.
|
|
31
|
-
"@live-change/identicon-service": "^0.8.
|
|
32
|
-
"@live-change/image-frontend": "^0.8.
|
|
33
|
-
"@live-change/message-authentication-service": "^0.8.
|
|
34
|
-
"@live-change/notification-service": "^0.8.
|
|
35
|
-
"@live-change/password-authentication-service": "^0.8.
|
|
36
|
-
"@live-change/pattern": "^0.8.
|
|
37
|
-
"@live-change/secret-code-service": "^0.8.
|
|
38
|
-
"@live-change/secret-link-service": "^0.8.
|
|
39
|
-
"@live-change/security-frontend": "^0.8.
|
|
40
|
-
"@live-change/security-service": "^0.8.
|
|
41
|
-
"@live-change/session-service": "^0.8.
|
|
42
|
-
"@live-change/timer-service": "^0.8.
|
|
43
|
-
"@live-change/upload-service": "^0.8.
|
|
44
|
-
"@live-change/user-identification-service": "^0.8.
|
|
45
|
-
"@live-change/user-service": "^0.8.
|
|
46
|
-
"@live-change/vue3-components": "^0.8.
|
|
47
|
-
"@live-change/vue3-ssr": "^0.8.
|
|
25
|
+
"@live-change/cli": "^0.8.67",
|
|
26
|
+
"@live-change/dao": "^0.8.67",
|
|
27
|
+
"@live-change/dao-vue3": "^0.8.67",
|
|
28
|
+
"@live-change/dao-websocket": "^0.8.67",
|
|
29
|
+
"@live-change/email-service": "^0.8.67",
|
|
30
|
+
"@live-change/framework": "^0.8.67",
|
|
31
|
+
"@live-change/identicon-service": "^0.8.67",
|
|
32
|
+
"@live-change/image-frontend": "^0.8.67",
|
|
33
|
+
"@live-change/message-authentication-service": "^0.8.67",
|
|
34
|
+
"@live-change/notification-service": "^0.8.67",
|
|
35
|
+
"@live-change/password-authentication-service": "^0.8.67",
|
|
36
|
+
"@live-change/pattern": "^0.8.67",
|
|
37
|
+
"@live-change/secret-code-service": "^0.8.67",
|
|
38
|
+
"@live-change/secret-link-service": "^0.8.67",
|
|
39
|
+
"@live-change/security-frontend": "^0.8.67",
|
|
40
|
+
"@live-change/security-service": "^0.8.67",
|
|
41
|
+
"@live-change/session-service": "^0.8.67",
|
|
42
|
+
"@live-change/timer-service": "^0.8.67",
|
|
43
|
+
"@live-change/upload-service": "^0.8.67",
|
|
44
|
+
"@live-change/user-identification-service": "^0.8.67",
|
|
45
|
+
"@live-change/user-service": "^0.8.67",
|
|
46
|
+
"@live-change/vue3-components": "^0.8.67",
|
|
47
|
+
"@live-change/vue3-ssr": "^0.8.67",
|
|
48
48
|
"@vueuse/core": "^10.11.0",
|
|
49
49
|
"codeceptjs-assert": "^0.0.5",
|
|
50
50
|
"codeceptjs-video-helper": "0.1.3",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"wtfnode": "^0.9.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@live-change/codeceptjs-helper": "^0.8.
|
|
68
|
+
"@live-change/codeceptjs-helper": "^0.8.67",
|
|
69
69
|
"codeceptjs": "^3.6.5",
|
|
70
70
|
"generate-password": "1.7.1",
|
|
71
71
|
"playwright": "^1.41.2",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
77
77
|
"license": "BSD-3-Clause",
|
|
78
78
|
"description": "",
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "ff74842a56f547052f0a5af26788475ca8f064e4"
|
|
80
80
|
}
|